From b9c048a6ac629aa19a62d827bbb4a000dfba3c8a Mon Sep 17 00:00:00 2001 From: Hummeltech <6109326+hummeltech@users.noreply.github.com> Date: Tue, 4 Jun 2024 13:24:04 -0700 Subject: [PATCH] Support for Mapnik >= 4 no longer using boost:optional (#436) --- src/parameterize_style.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/parameterize_style.cpp b/src/parameterize_style.cpp index 892e432..732a454 100644 --- a/src/parameterize_style.cpp +++ b/src/parameterize_style.cpp @@ -15,7 +15,9 @@ * along with this program; If not, see http://www.gnu.org/licenses/. */ +#if MAPNIK_MAJOR_VERSION < 4 #include +#endif #include #include #include @@ -65,7 +67,11 @@ static void parameterize_map_language(mapnik::Map &m, char *parameter) mapnik::parameters params = l.datasource()->params(); if (params.find("table") != params.end()) { +#if MAPNIK_MAJOR_VERSION >= 4 + std::optional table = params.get("table"); +#else boost::optional table = params.get("table"); +#endif if (table && table->find(",name") != std::string::npos) { std::string str = *table;