[core] Put ignore in util namespace
This commit is contained in:
@@ -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)... });
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
@@ -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)... });
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user