diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-07-01 11:51:54 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-07-01 12:38:33 +0200 |
commit | 77e784675687d13439a8104c97c5bb0a9ccd8b01 (patch) | |
tree | ac5fe39c7c1d0db0923fec2b00b56291ef0f548e /include/mbgl/util/geo.hpp | |
parent | da863c6e52f656bd35c3d3346093a24d747d0bbd (diff) | |
download | qtlocation-mapboxgl-77e784675687d13439a8104c97c5bb0a9ccd8b01.tar.gz |
[core] code style cleanups
- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
Diffstat (limited to 'include/mbgl/util/geo.hpp')
-rw-r--r-- | include/mbgl/util/geo.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp index a68058048d..9dca10eb84 100644 --- a/include/mbgl/util/geo.hpp +++ b/include/mbgl/util/geo.hpp @@ -191,12 +191,12 @@ public: double left = 0; ///< Number of pixels inset from the left edge. double bottom = 0; ///< Number of pixels inset from the bottom edge. double right = 0; ///< Number of pixels inset from the right edge. - + EdgeInsets() {} - + EdgeInsets(const double t, const double l, const double b, const double r) : top(t), left(l), bottom(b), right(r) {} - + explicit operator bool() const { return !(std::isnan(top) || std::isnan(left) || std::isnan(bottom) || std::isnan(right)) && (top || left || bottom || right); @@ -214,7 +214,7 @@ public: top + o.top, left + o.left, bottom + o.bottom, right + o.right, }; } - + ScreenCoordinate getCenter(uint16_t width, uint16_t height) const; }; |