Fix compiler warning about uninitialised variable.

This commit is contained in:
Matt Amos 2014-10-01 02:12:19 +01:00
parent e392feeec2
commit e759b61b07

View file

@ -41,15 +41,10 @@ void render_point_symbolizer(point_symbolizer const &sym,
F render_marker)
{
std::string filename = get<std::string>(sym, keys::file, feature, common.vars_);
boost::optional<mapnik::marker_ptr> marker;
if (!filename.empty())
{
marker = marker_cache::instance().find(filename, true);
}
else
{
marker.reset(std::make_shared<mapnik::marker>());
}
boost::optional<mapnik::marker_ptr> marker = filename.empty()
? std::make_shared<mapnik::marker>()
: marker_cache::instance().find(filename, true);
if (marker)
{
double opacity = get<double>(sym,keys::opacity,feature, common.vars_, 1.0);