diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-25 23:56:52 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-26 19:36:52 +0300 |
commit | c111250fcccaf5e57154852606ee740f0db242c1 (patch) | |
tree | 82636cda8fa90be2c0e760daf806d5226331c5e0 /src/mbgl/gl/gl_object_store.hpp | |
parent | b2b2797c2a30b8085683935d760c45284c639e96 (diff) | |
download | qtlocation-mapboxgl-c111250fcccaf5e57154852606ee740f0db242c1.tar.gz |
[core] s/operator bool/created()/ in {GL,TexturePool}Holder
Prevents confusing usage of GL holder objects.
Diffstat (limited to 'src/mbgl/gl/gl_object_store.hpp')
-rw-r--r-- | src/mbgl/gl/gl_object_store.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/gl/gl_object_store.hpp b/src/mbgl/gl/gl_object_store.hpp index 9e0575046a..2527bbf332 100644 --- a/src/mbgl/gl/gl_object_store.hpp +++ b/src/mbgl/gl/gl_object_store.hpp @@ -41,7 +41,7 @@ public: GLHolder(GLHolder&& o) noexcept : id(o.id), objectStore(o.objectStore) { o.id = 0; } GLHolder& operator=(GLHolder&& o) noexcept { id = o.id; objectStore = o.objectStore; o.id = 0; return *this; } - explicit operator bool() const { return id; } + bool created() const { return id; } GLuint getID() const { return id; } protected: @@ -110,7 +110,7 @@ public: TexturePoolHolder(TexturePoolHolder&& o) noexcept : ids(std::move(o.ids)), objectStore(o.objectStore) { o.ids.fill(0); } TexturePoolHolder& operator=(TexturePoolHolder&& o) noexcept { ids = std::move(o.ids); objectStore = o.objectStore; o.ids.fill(0); return *this; } - explicit operator bool() const { return std::any_of(ids.begin(), ids.end(), [](int id) { return id; }); } + bool created() const { return std::any_of(ids.begin(), ids.end(), [](int id) { return id; }); } const std::array<GLuint, TextureMax>& getIDs() const { return ids; } const GLuint& operator[](size_t pos) { return ids[pos]; } |