summaryrefslogtreecommitdiff
path: root/platform/node/src/node_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/node/src/node_map.cpp')
-rw-r--r--platform/node/src/node_map.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 5732484e60..bbd8bcfa05 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -1086,7 +1086,8 @@ void NodeMap::SetFeatureState(const Nan::FunctionCallbackInfo<v8::Value>& info)
return Nan::ThrowTypeError("Both arguments must be objects");
}
- std::string sourceID, featureID;
+ std::string sourceID;
+ std::string featureID;
mbgl::optional<std::string> sourceLayerID;
auto feature = Nan::To<v8::Object>(info[0]).ToLocalChecked();
if (Nan::Has(feature, Nan::New("source").ToLocalChecked()).FromJust()) {
@@ -1186,7 +1187,8 @@ void NodeMap::GetFeatureState(const Nan::FunctionCallbackInfo<v8::Value>& info)
return Nan::ThrowTypeError("Argument must be object");
}
- std::string sourceID, featureID;
+ std::string sourceID;
+ std::string featureID;
mbgl::optional<std::string> sourceLayerID;
auto feature = Nan::To<v8::Object>(info[0]).ToLocalChecked();
if (Nan::Has(feature, Nan::New("source").ToLocalChecked()).FromJust()) {
@@ -1244,7 +1246,9 @@ void NodeMap::RemoveFeatureState(const Nan::FunctionCallbackInfo<v8::Value>& inf
}
std::string sourceID;
- mbgl::optional<std::string> sourceLayerID, featureID, stateKey;
+ mbgl::optional<std::string> sourceLayerID;
+ mbgl::optional<std::string> featureID;
+ mbgl::optional<std::string> stateKey;
auto feature = Nan::To<v8::Object>(info[0]).ToLocalChecked();
if (Nan::Has(feature, Nan::New("source").ToLocalChecked()).FromJust()) {
auto sourceOption = Nan::Get(feature, Nan::New("source").ToLocalChecked()).ToLocalChecked();