summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2020-05-26 17:59:26 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2020-05-26 20:37:08 +0300
commite953a9c4cb401bc9aaeb135525f9dbefc3ca5687 (patch)
tree56dcb33f4a5a37f82ae3b1ea95c8f5428959f90f /src
parentb99121ff0f4309e1e9fe5a38c010419d606e9b9b (diff)
downloadqtlocation-mapboxgl-e953a9c4cb401bc9aaeb135525f9dbefc3ca5687.tar.gz
[core] Fix clang-tidy errorsupstream/tmpsantos-release_branch
Mostly "modernize", "readability" and "performance".
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/programs/fill_extrusion_program.cpp2
-rw-r--r--src/mbgl/style/layer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/programs/fill_extrusion_program.cpp b/src/mbgl/programs/fill_extrusion_program.cpp
index 7209072b02..eb8d58a6e5 100644
--- a/src/mbgl/programs/fill_extrusion_program.cpp
+++ b/src/mbgl/programs/fill_extrusion_program.cpp
@@ -12,7 +12,7 @@ using namespace style;
static_assert(sizeof(FillExtrusionLayoutVertex) == 12, "expected FillExtrusionLayoutVertex size");
std::array<float, 3> lightColor(const EvaluatedLight& light) {
- const auto color = light.get<LightColor>();
+ const auto& color = light.get<LightColor>();
return {{ color.r, color.g, color.b }};
}
diff --git a/src/mbgl/style/layer.cpp b/src/mbgl/style/layer.cpp
index da048ad2fa..cb8b16bc51 100644
--- a/src/mbgl/style/layer.cpp
+++ b/src/mbgl/style/layer.cpp
@@ -169,7 +169,7 @@ Value Layer::serialize() const {
mapbox::base::ValueObject result;
result.emplace(std::make_pair("id", getID()));
for (const auto& pair : layerProperties) {
- Property property = static_cast<Property>(pair.second);
+ auto property = static_cast<Property>(pair.second);
std::string key = pair.first.c_str();
auto styleProperty = getLayerProperty(this, property);
if (styleProperty != getLayerPropertyDefaultValue(property)) {