summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-11-04 14:38:05 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-11-08 08:09:29 -0800
commit52be5d480d6fa0eabe51e2b66498f59c5d1f3edf (patch)
treeec9bd967d09a122e3a6a5b7911ec11117435acb4 /src
parentd1e2fe511ebf6d4aebbb08b2f0aba32e26c6edeb (diff)
downloadqtlocation-mapboxgl-52be5d480d6fa0eabe51e2b66498f59c5d1f3edf.tar.gz
[core] Put ignore in util namespace
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/gl/attribute.hpp12
-rw-r--r--src/mbgl/gl/index_buffer.hpp2
-rw-r--r--src/mbgl/gl/uniform.hpp2
-rw-r--r--src/mbgl/gl/vertex_buffer.hpp2
-rw-r--r--src/mbgl/util/ignore.hpp2
5 files changed, 11 insertions, 9 deletions
diff --git a/src/mbgl/gl/attribute.hpp b/src/mbgl/gl/attribute.hpp
index 47f93f31f9..df469fc6a2 100644
--- a/src/mbgl/gl/attribute.hpp
+++ b/src/mbgl/gl/attribute.hpp
@@ -154,12 +154,12 @@ public:
static std::function<void (std::size_t)> binder(const State& state) {
return [&state] (std::size_t vertexOffset) {
- ignore({ (bindAttribute(state.template get<As>().location,
- state.template get<As>().count,
- state.template get<As>().type,
- sizeof(Vertex),
- vertexOffset,
- Vertex::attributeOffsets[Index<As>]), 0)... });
+ util::ignore({ (bindAttribute(state.template get<As>().location,
+ state.template get<As>().count,
+ state.template get<As>().type,
+ sizeof(Vertex),
+ vertexOffset,
+ Vertex::attributeOffsets[Index<As>]), 0)... });
};
}
};
diff --git a/src/mbgl/gl/index_buffer.hpp b/src/mbgl/gl/index_buffer.hpp
index 8b40bf68c3..b3610f4154 100644
--- a/src/mbgl/gl/index_buffer.hpp
+++ b/src/mbgl/gl/index_buffer.hpp
@@ -17,7 +17,7 @@ public:
template <class... Args>
void emplace_back(Args&&... args) {
static_assert(sizeof...(args) == groupSize, "wrong buffer element count");
- ignore({(v.emplace_back(std::forward<Args>(args)), 0)...});
+ util::ignore({(v.emplace_back(std::forward<Args>(args)), 0)...});
}
std::size_t indexSize() const { return v.size(); }
diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp
index 0b303e9d6f..726cd4fe10 100644
--- a/src/mbgl/gl/uniform.hpp
+++ b/src/mbgl/gl/uniform.hpp
@@ -72,7 +72,7 @@ public:
static std::function<void ()> binder(State& state, Values&& values_) {
return [&state, values = std::move(values_)] () mutable {
- ignore({ (state.template get<Us>() = values.template get<Us>(), 0)... });
+ util::ignore({ (state.template get<Us>() = values.template get<Us>(), 0)... });
};
}
};
diff --git a/src/mbgl/gl/vertex_buffer.hpp b/src/mbgl/gl/vertex_buffer.hpp
index 9d5532beab..c9bc01f3e8 100644
--- a/src/mbgl/gl/vertex_buffer.hpp
+++ b/src/mbgl/gl/vertex_buffer.hpp
@@ -19,7 +19,7 @@ public:
template <class... Args>
void emplace_back(Args&&... args) {
static_assert(sizeof...(args) == groupSize, "wrong buffer element count");
- ignore({(v.emplace_back(std::forward<Args>(args)), 0)...});
+ util::ignore({(v.emplace_back(std::forward<Args>(args)), 0)...});
}
std::size_t vertexSize() const { return v.size(); }
diff --git a/src/mbgl/util/ignore.hpp b/src/mbgl/util/ignore.hpp
index 31cd092c0e..955b1de2fa 100644
--- a/src/mbgl/util/ignore.hpp
+++ b/src/mbgl/util/ignore.hpp
@@ -3,6 +3,7 @@
#include <initializer_list>
namespace mbgl {
+namespace util {
// Accept any number of parameters of any types, and do nothing with them.
// Useful for providing a context for parameter pack expansion where a legal
@@ -18,4 +19,5 @@ template <class... Ts> void ignore(Ts&&...) {}
//
template <class T> void ignore(const std::initializer_list<T>&) {}
+} // namespace util
} // namespace mbgl