summaryrefslogtreecommitdiff
path: root/src/mbgl/map
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-27 18:30:35 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-30 23:37:44 +0300
commit94d1c10727ceb2c0e245aeb3c255102da185440c (patch)
tree2f93534ca3dac24b3d3f566faa0b11fbf72177b9 /src/mbgl/map
parent2ca3fc24a1eedda8fb6fed1fa56033717376e0d7 (diff)
downloadqtlocation-mapboxgl-94d1c10727ceb2c0e245aeb3c255102da185440c.tar.gz
[core] Fix readability-* errors
As reported by clang-tidy-8.
Diffstat (limited to 'src/mbgl/map')
-rw-r--r--src/mbgl/map/transform_state.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp
index 8e297ae8cf..b5513f3d83 100644
--- a/src/mbgl/map/transform_state.cpp
+++ b/src/mbgl/map/transform_state.cpp
@@ -131,7 +131,8 @@ void TransformState::getProjMatrix(mat4& projMatrix, uint16_t nearZ, bool aligne
matrix::rotate_z(projMatrix, projMatrix, getBearing() + getNorthOrientationAngle());
- const double dx = pixel_x() - size.width / 2.0f, dy = pixel_y() - size.height / 2.0f;
+ const double dx = pixel_x() - size.width / 2.0f;
+ const double dy = pixel_y() - size.height / 2.0f;
matrix::translate(projMatrix, projMatrix, dx, dy, 0);
if (axonometric) {
@@ -153,8 +154,10 @@ void TransformState::getProjMatrix(mat4& projMatrix, uint16_t nearZ, bool aligne
// of the transformation so that 0°, 90°, 180°, and 270° rasters are crisp, and adjust the shift so that
// it is always <= 0.5 pixels.
if (aligned) {
- const float xShift = float(size.width % 2) / 2, yShift = float(size.height % 2) / 2;
- const double bearingCos = std::cos(bearing), bearingSin = std::sin(bearing);
+ const float xShift = float(size.width % 2) / 2;
+ const float yShift = float(size.height % 2) / 2;
+ const double bearingCos = std::cos(bearing);
+ const double bearingSin = std::sin(bearing);
double devNull;
const float dxa = -std::modf(dx, &devNull) + bearingCos * xShift + bearingSin * yShift;
const float dya = -std::modf(dy, &devNull) + bearingCos * yShift + bearingSin * xShift;