[core] Fix readability-* errors

As reported by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 18:30:35 +02:00
parent 2ca3fc24a1
commit 94d1c10727
63 changed files with 477 additions and 422 deletions

View File

@@ -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();