summaryrefslogtreecommitdiff
path: root/include/mbgl/util/enum.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-22 18:06:11 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-22 18:19:01 +0200
commit214f99673f6f7480f9cc3bf9d6fa32ef8dd2ede5 (patch)
treef06145cf70bf7860abd2c6edf88e2294d4ecb830 /include/mbgl/util/enum.hpp
parent74387c54e35e0f8f6bf1dcc7b7b171a3ec6db212 (diff)
downloadqtlocation-mapboxgl-214f99673f6f7480f9cc3bf9d6fa32ef8dd2ede5.tar.gz
fix variable shadowing
Diffstat (limited to 'include/mbgl/util/enum.hpp')
-rw-r--r--include/mbgl/util/enum.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/util/enum.hpp b/include/mbgl/util/enum.hpp
index 195aaab5a5..3c3e4a5c4e 100644
--- a/include/mbgl/util/enum.hpp
+++ b/include/mbgl/util/enum.hpp
@@ -21,11 +21,11 @@ private:
static constexpr inline bool compare(const char *a, const char *b) {
return *a == *b && (*a == '\0' || compare(a + 1, b + 1));
}
- static constexpr inline const char *lookup_type(Type e, EnumValue<Type> const * const l, size_t r) {
- return r == 0 ? "" : l->value == e ? l->name : lookup_type(e, l + 1, r - 1);
+ static constexpr inline const char *lookup_type(Type e, EnumValue<Type> const * const list, size_t r) {
+ return r == 0 ? "" : list->value == e ? list->name : lookup_type(e, list + 1, r - 1);
}
- static constexpr inline Type lookup_name(const char *n, EnumValue<Type> const * const l, size_t r) {
- return r == 0 ? Type(-1) : compare(l->name, n) ? l->value : lookup_name(n, l + 1, r - 1);
+ static constexpr inline Type lookup_name(const char *n, EnumValue<Type> const * const list, size_t r) {
+ return r == 0 ? Type(-1) : compare(list->name, n) ? list->value : lookup_name(n, list + 1, r - 1);
}
public:
inline constexpr Enum(const char *n) : value(lookup_name(n, names, length)) {}