From 310011a8b9c83154c972499633781710ab5a7c7e Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Tue, 10 Feb 2015 12:16:04 +0000 Subject: [PATCH] prefer stl over boost --- src/load_map.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/load_map.cpp b/src/load_map.cpp index c2d7fa4a1..25cf3f34b 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -65,10 +65,9 @@ #include #include #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-local-typedef" -#include -#pragma GCC diagnostic pop + +// stl +#include // agg #include "agg_trans_affine.h" @@ -1271,10 +1270,10 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & node) if (mode) { std::string mode_string = *mode; - if (boost::algorithm::find_first(mode_string,"_")) + if (mode_string.find('_') != std::string::npos) { MAPNIK_LOG_ERROR(raster_symbolizer) << "'mode' values using \"_\" are deprecated and will be removed in Mapnik 3.x, use \"-\"instead"; - boost::algorithm::replace_all(mode_string,"_","-"); + std::replace(mode_string.begin(), mode_string.end(), '_', '-'); } put(raster_sym, keys::mode, mode_string); } @@ -1603,7 +1602,7 @@ void map_parser::ensure_exists(std::string const& file_path) if (marker_cache::instance().is_uri(file_path)) return; // validate that the filename exists if it is not a dynamic PathExpression - if (!boost::algorithm::find_first(file_path,"[") && !boost::algorithm::find_first(file_path,"]")) + if (file_path.find('[') == std::string::npos && file_path.find(']') == std::string::npos) { if (!mapnik::util::exists(file_path)) {