backport warnings fix from master for enumeration

This commit is contained in:
Dane Springmeyer 2016-12-15 11:33:23 -08:00
parent fdd542a3c4
commit 283481b347

View file

@ -28,7 +28,6 @@
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
// stl // stl
#include <bitset>
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <algorithm> #include <algorithm>
@ -190,6 +189,8 @@ public:
for (unsigned i = 0; i < THE_MAX; ++i) for (unsigned i = 0; i < THE_MAX; ++i)
{ {
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc
#pragma GCC diagnostic ignored "-Wpragmas" // gcc
#pragma GCC diagnostic ignored "-Wundefined-var-template" #pragma GCC diagnostic ignored "-Wundefined-var-template"
if (str_copy == our_strings_[i]) if (str_copy == our_strings_[i])
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
@ -203,6 +204,8 @@ public:
} }
} }
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc
#pragma GCC diagnostic ignored "-Wpragmas" // gcc
#pragma GCC diagnostic ignored "-Wundefined-var-template" #pragma GCC diagnostic ignored "-Wundefined-var-template"
throw illegal_enum_value(std::string("Illegal enumeration value '") + throw illegal_enum_value(std::string("Illegal enumeration value '") +
str + "' for enum " + our_name_); str + "' for enum " + our_name_);
@ -213,6 +216,8 @@ public:
std::string as_string() const std::string as_string() const
{ {
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc
#pragma GCC diagnostic ignored "-Wpragmas" // gcc
#pragma GCC diagnostic ignored "-Wundefined-var-template" #pragma GCC diagnostic ignored "-Wundefined-var-template"
return our_strings_[value_]; return our_strings_[value_];
#pragma GCC diagnostic pop #pragma GCC diagnostic pop