Compare commits
1 commit
master
...
simplify-p
Author | SHA1 | Date | |
---|---|---|---|
|
6582908d10 |
7 changed files with 19 additions and 18 deletions
|
@ -110,12 +110,13 @@ public:
|
|||
|
||||
inline mapnik::value_integer id() const { return id_;}
|
||||
inline void set_id(mapnik::value_integer id) { id_ = id;}
|
||||
/*
|
||||
template <typename T>
|
||||
inline void put(context_type::key_type const& key, T const& val)
|
||||
{
|
||||
put(key, value(val));
|
||||
}
|
||||
|
||||
*/
|
||||
template <typename T>
|
||||
inline void put_new(context_type::key_type const& key, T const& val)
|
||||
{
|
||||
|
|
|
@ -305,14 +305,14 @@ void render_group_symbolizer(group_symbolizer const& sym,
|
|||
{
|
||||
std::string col_idx_name = col_name;
|
||||
boost::replace_all(col_idx_name, "%", col_idx_str);
|
||||
sub_feature->put(col_name, feature.get(col_idx_name));
|
||||
sub_feature->put(col_name, mapnik::value(feature.get(col_idx_name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// non-indexed column
|
||||
sub_feature->put(col_name, feature.get(col_name));
|
||||
sub_feature->put(col_name, mapnik::value(feature.get(col_name)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,13 +126,13 @@ feature_ptr ogr_featureset::next()
|
|||
{
|
||||
case OFTInteger:
|
||||
{
|
||||
feature->put<mapnik::value_integer>( fld_name, poFeature->GetFieldAsInteger(i));
|
||||
feature->put( fld_name, poFeature->GetFieldAsInteger(i));
|
||||
break;
|
||||
}
|
||||
#if GDAL_VERSION_MAJOR >= 2
|
||||
case OFTInteger64:
|
||||
{
|
||||
feature->put<mapnik::value_integer>( fld_name, poFeature->GetFieldAsInteger64(i));
|
||||
feature->put( fld_name, poFeature->GetFieldAsInteger64(i));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -149,13 +149,13 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
{
|
||||
case OFTInteger:
|
||||
{
|
||||
feature->put<mapnik::value_integer>(fld_name,poFeature->GetFieldAsInteger (i));
|
||||
feature->put(fld_name,poFeature->GetFieldAsInteger (i));
|
||||
break;
|
||||
}
|
||||
#if GDAL_VERSION_MAJOR >= 2
|
||||
case OFTInteger64:
|
||||
{
|
||||
feature->put<mapnik::value_integer>( fld_name, poFeature->GetFieldAsInteger64(i));
|
||||
feature->put( fld_name, poFeature->GetFieldAsInteger64(i));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -107,7 +107,7 @@ feature_ptr pgraster_featureset::next()
|
|||
// TODO - extend feature class to know
|
||||
// that its id is also an attribute to avoid
|
||||
// this duplication
|
||||
feature->put<mapnik::value_integer>(name,val);
|
||||
feature->put(name,val);
|
||||
++pos;
|
||||
}
|
||||
else
|
||||
|
@ -161,19 +161,19 @@ feature_ptr pgraster_featureset::next()
|
|||
|
||||
case 23: //int4
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name, int4net(buf));
|
||||
feature->put(name, int4net(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
case 21: //int2
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name, int2net(buf));
|
||||
feature->put(name, int2net(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
case 20: //int8/BigInt
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name, int8net(buf));
|
||||
feature->put(name, int8net(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ feature_ptr postgis_featureset::next()
|
|||
feature = feature_factory::create(ctx_, val);
|
||||
if (key_field_as_attribute_)
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name,val);
|
||||
feature->put(name,val);
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
|
@ -152,19 +152,19 @@ feature_ptr postgis_featureset::next()
|
|||
|
||||
case 23: //int4
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name, int4net(buf));
|
||||
feature->put(name, int4net(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
case 21: //int2
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name, int2net(buf));
|
||||
feature->put(name, int2net(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
case 20: //int8/BigInt
|
||||
{
|
||||
feature->put<mapnik::value_integer>(name, int8net(buf));
|
||||
feature->put(name, int8net(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -188,14 +188,14 @@ feature_ptr postgis_featureset::next()
|
|||
case 1043: //varchar
|
||||
case 705: //literal
|
||||
{
|
||||
feature->put(name, tr_->transcode(buf));
|
||||
feature->put(name, std::move(tr_->transcode(buf)));
|
||||
break;
|
||||
}
|
||||
|
||||
case 1042: //bpchar
|
||||
{
|
||||
std::string str = mapnik::util::trim_copy(buf);
|
||||
feature->put(name, tr_->transcode(str.c_str()));
|
||||
feature->put(name, std::move(tr_->transcode(str.c_str())));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ feature_ptr sqlite_featureset::next()
|
|||
{
|
||||
case SQLITE_INTEGER:
|
||||
{
|
||||
feature->put<mapnik::value_integer>(fld_name_str, rs_->column_integer64(i));
|
||||
feature->put(fld_name_str, rs_->column_integer64(i));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue