diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index 644e60135..56d7a6aae 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -98,11 +98,11 @@ shape_datasource::shape_datasource(parameters const& params) mapnik::progress_timer __stats2__(std::clog, "shape_datasource::init(get_column_description)"); #endif - std::unique_ptr shape_ref = std::make_unique(shape_name_); - init(*shape_ref); - for (int i=0;idbf().num_fields();++i) + shape_io shape(shape_name_); + init(shape); + 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_; switch (fd.type_) {