[core] Fix readability-* errors
As reported by clang-tidy-8.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user