diff --git a/src/mbgl/gl/attribute.hpp b/src/mbgl/gl/attribute.hpp index 47f93f31f..df469fc6a 100644 --- a/src/mbgl/gl/attribute.hpp +++ b/src/mbgl/gl/attribute.hpp @@ -154,12 +154,12 @@ public: static std::function binder(const State& state) { return [&state] (std::size_t vertexOffset) { - ignore({ (bindAttribute(state.template get().location, - state.template get().count, - state.template get().type, - sizeof(Vertex), - vertexOffset, - Vertex::attributeOffsets[Index]), 0)... }); + util::ignore({ (bindAttribute(state.template get().location, + state.template get().count, + state.template get().type, + sizeof(Vertex), + vertexOffset, + Vertex::attributeOffsets[Index]), 0)... }); }; } }; diff --git a/src/mbgl/gl/index_buffer.hpp b/src/mbgl/gl/index_buffer.hpp index 8b40bf68c..b3610f415 100644 --- a/src/mbgl/gl/index_buffer.hpp +++ b/src/mbgl/gl/index_buffer.hpp @@ -17,7 +17,7 @@ public: template void emplace_back(Args&&... args) { static_assert(sizeof...(args) == groupSize, "wrong buffer element count"); - ignore({(v.emplace_back(std::forward(args)), 0)...}); + util::ignore({(v.emplace_back(std::forward(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 0b303e9d6..726cd4fe1 100644 --- a/src/mbgl/gl/uniform.hpp +++ b/src/mbgl/gl/uniform.hpp @@ -72,7 +72,7 @@ public: static std::function binder(State& state, Values&& values_) { return [&state, values = std::move(values_)] () mutable { - ignore({ (state.template get() = values.template get(), 0)... }); + util::ignore({ (state.template get() = values.template get(), 0)... }); }; } }; diff --git a/src/mbgl/gl/vertex_buffer.hpp b/src/mbgl/gl/vertex_buffer.hpp index 9d5532bea..c9bc01f3e 100644 --- a/src/mbgl/gl/vertex_buffer.hpp +++ b/src/mbgl/gl/vertex_buffer.hpp @@ -19,7 +19,7 @@ public: template void emplace_back(Args&&... args) { static_assert(sizeof...(args) == groupSize, "wrong buffer element count"); - ignore({(v.emplace_back(std::forward(args)), 0)...}); + util::ignore({(v.emplace_back(std::forward(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 31cd092c0..955b1de2f 100644 --- a/src/mbgl/util/ignore.hpp +++ b/src/mbgl/util/ignore.hpp @@ -3,6 +3,7 @@ #include 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 void ignore(Ts&&...) {} // template void ignore(const std::initializer_list&) {} +} // namespace util } // namespace mbgl