remove redundant unique_ptr usage for local variable

This commit is contained in:
artemp 2016-02-18 10:53:12 +01:00
parent 6557394dc8
commit 4c0781dbe9

View file

@ -98,11 +98,11 @@ shape_datasource::shape_datasource(parameters const& params)
mapnik::progress_timer __stats2__(std::clog, "shape_datasource::init(get_column_description)"); mapnik::progress_timer __stats2__(std::clog, "shape_datasource::init(get_column_description)");
#endif #endif
std::unique_ptr<shape_io> shape_ref = std::make_unique<shape_io>(shape_name_); shape_io shape(shape_name_);
init(*shape_ref); init(shape);
for (int i=0;i<shape_ref->dbf().num_fields();++i) for (int i = 0; i < shape.dbf().num_fields(); ++i)
{ {
field_descriptor const& fd = shape_ref->dbf().descriptor(i); field_descriptor const& fd = shape.dbf().descriptor(i);
std::string fld_name=fd.name_; std::string fld_name=fd.name_;
switch (fd.type_) switch (fd.type_)
{ {