diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-02 23:24:32 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-03 10:02:25 -0800 |
commit | 235210c64864e1bbccceb2a551a521ce72cbdadd (patch) | |
tree | 26ab9bc847a06b364c39be79466c166a77bc9374 /test | |
parent | 9beb6629b68f2c07ff3f778d9bf4acfbcb3b6598 (diff) | |
download | qtlocation-mapboxgl-235210c64864e1bbccceb2a551a521ce72cbdadd.tar.gz |
[core] Make bool conversions explicit
Implicit bool conversions are bad; they'll be used e.g. for a == b and a != b if those operators are not defined. This was happening at https://github.com/mapbox/mapbox-gl-native/blob/032c8fba3c8e3c122dd399b5c9341d92ad9d286f/src/mbgl/map/transform.cpp#L132-L132, for example.
Diffstat (limited to 'test')
-rw-r--r-- | test/map/transform.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/map/transform.cpp b/test/map/transform.cpp index 8325e60ebf..3eb1c1bee1 100644 --- a/test/map/transform.cpp +++ b/test/map/transform.cpp @@ -198,7 +198,6 @@ TEST(Transform, Anchor) { ASSERT_NEAR(M_PI_4, transform.getAngle(), 0.000001); ASSERT_NE(anchorLatLng, transform.getLatLng()); - ASSERT_DOUBLE_EQ(anchorLatLng, transform.getState().pointToLatLng(anchorPoint)); } TEST(Transform, Padding) { @@ -224,7 +223,7 @@ TEST(Transform, Padding) { EdgeInsets padding; padding.top = 1000.0 / 2.0; ASSERT_GT(padding.top, 0); - ASSERT_TRUE(padding); + ASSERT_TRUE(bool(padding)); const LatLng shiftedCenter = transform.getLatLng(padding); ASSERT_NE(trueCenter.latitude, shiftedCenter.latitude); |