From e759b61b07783c18aa82ec5aea29bd080110e696 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Wed, 1 Oct 2014 02:12:19 +0100 Subject: [PATCH] Fix compiler warning about uninitialised variable. --- .../renderer_common/process_point_symbolizer.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/include/mapnik/renderer_common/process_point_symbolizer.hpp b/include/mapnik/renderer_common/process_point_symbolizer.hpp index 22778a312..d48e1862d 100644 --- a/include/mapnik/renderer_common/process_point_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_point_symbolizer.hpp @@ -41,15 +41,10 @@ void render_point_symbolizer(point_symbolizer const &sym, F render_marker) { std::string filename = get(sym, keys::file, feature, common.vars_); - boost::optional marker; - if (!filename.empty()) - { - marker = marker_cache::instance().find(filename, true); - } - else - { - marker.reset(std::make_shared()); - } + boost::optional marker = filename.empty() + ? std::make_shared() + : marker_cache::instance().find(filename, true); + if (marker) { double opacity = get(sym,keys::opacity,feature, common.vars_, 1.0);