summaryrefslogtreecommitdiff
path: root/include/mbgl/util/geo.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-11 13:40:17 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-04-11 14:50:22 -0700
commit62576e24a0e98a73c1396150f1f09acb838080e6 (patch)
tree0a322ed0db5965071e9f78ef6e12bf83056b8421 /include/mbgl/util/geo.hpp
parentb71d86599d5e7c265b320300b18cfc0ea082c6d2 (diff)
downloadqtlocation-mapboxgl-62576e24a0e98a73c1396150f1f09acb838080e6.tar.gz
[core] Revert use of optional<EdgeInsets>, because EdgeInsets has a natural "empty" state
Diffstat (limited to 'include/mbgl/util/geo.hpp')
-rw-r--r--include/mbgl/util/geo.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 04aa1e1bfa..edd40e73ca 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -221,6 +221,9 @@ public:
EdgeInsets(const double t, const double l, const double b, const double r)
: top(t), left(l), bottom(b), right(r) {}
+ bool isFlush() const {
+ return top == 0 && left == 0 && bottom == 0 && right == 0;
+ }
void operator+=(const EdgeInsets& o) {
top += o.top;