From 214f99673f6f7480f9cc3bf9d6fa32ef8dd2ede5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 22 Oct 2014 18:06:11 +0200 Subject: fix variable shadowing --- include/mbgl/util/enum.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/mbgl/util/enum.hpp') 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 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 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 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 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)) {} -- cgit v1.2.1