[core] remove some uses of <iostream> and <sstream>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "constant.hpp"
|
||||
#include "collection.hpp"
|
||||
|
||||
#include <sstream>
|
||||
#include <mbgl/util/string.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace android {
|
||||
@@ -24,9 +24,18 @@ Result<jni::Local<jni::Object<>>> Converter<jni::Local<jni::Object<>>, std::stri
|
||||
}
|
||||
|
||||
Result<jni::Local<jni::Object<>>> Converter<jni::Local<jni::Object<>>, Color>::operator()(jni::JNIEnv& env, const Color& value) const {
|
||||
std::stringstream sstream;
|
||||
sstream << "rgba(" << value.r << ", " << value.g << ", " << value.b << ", " << value.a << ")";
|
||||
return jni::Make<jni::String>(env, sstream.str());
|
||||
std::string result;
|
||||
result.reserve(32);
|
||||
result += "rgba(";
|
||||
result += util::toString(value.r);
|
||||
result += ", ";
|
||||
result += util::toString(value.g);
|
||||
result += ", ";
|
||||
result += util::toString(value.b);
|
||||
result += ", ";
|
||||
result += util::toString(value.a);
|
||||
result += ")";
|
||||
return jni::Make<jni::String>(env, result);
|
||||
}
|
||||
|
||||
Result<jni::Local<jni::Object<>>> Converter<jni::Local<jni::Object<>>, style::expression::Formatted>::operator()(jni::JNIEnv& env, const style::expression::Formatted& value) const {
|
||||
|
||||
Reference in New Issue
Block a user