Replaced std::auto_ptr by std::unique_ptr because the latter is deprecated

This commit is contained in:
Matthias Koefferlein
2021-01-23 21:55:51 +01:00
parent a1ace443f7
commit d1e6845ae4
131 changed files with 626 additions and 624 deletions
@@ -817,7 +817,7 @@ NetTracerLayerExpression::make_l2n_region (db::LayoutToNetlist &l2n, std::map <u
rhb = make_l2n_region_for_org (l2n, region_cache, m_b, std::string ());
}
std::auto_ptr<db::Region> res (new db::Region (*rha->get ()));
std::unique_ptr<db::Region> res (new db::Region (*rha->get ()));
if (m_op == OPAnd) {
*res &= *rhb->get ();
@@ -254,7 +254,7 @@ NetTracerConnectionInfo::NetTracerConnectionInfo (const NetTracerLayerExpression
static int get_layer_id (const NetTracerLayerExpressionInfo &e, const db::Layout &layout, const NetTracerTechnologyComponent &tech, NetTracerData *data)
{
std::auto_ptr<NetTracerLayerExpression> expr_in (NetTracerLayerExpressionInfo::compile (e.to_string ()).get (layout, tech));
std::unique_ptr<NetTracerLayerExpression> expr_in (NetTracerLayerExpressionInfo::compile (e.to_string ()).get (layout, tech));
int l = expr_in->alias_for ();
if (l < 0 && data) {
l = data->find_symbol (e.to_string ());
@@ -531,7 +531,7 @@ NetTracerTechnologyComponent::get_tracer_data (const db::Layout &layout) const
throw tl::Exception (tl::to_string (tr ("Missing expression on symbol specification #%d")), n);
}
try {
std::auto_ptr<NetTracerLayerExpression> expr_in (NetTracerLayerExpressionInfo::compile (s->expression ()).get (layout, *this));
std::unique_ptr<NetTracerLayerExpression> expr_in (NetTracerLayerExpressionInfo::compile (s->expression ()).get (layout, *this));
} catch (tl::Exception &ex) {
throw tl::Exception (tl::to_string (tr ("Error compiling expression '%s' (symbol #%d): %s")), s->expression (), n, ex.msg ());
}
@@ -573,7 +573,7 @@ NetTracerDialog::menu_activated (const std::string &symbol)
const lay::CellView &cv = view ()->cellview (view ()->active_cellview_index ());
if (cv.is_valid ()) {
db::RecursiveShapeIterator si (cv->layout (), *cv.cell (), std::vector<unsigned int> ());
std::auto_ptr <db::LayoutToNetlist> l2ndb (new db::LayoutToNetlist (si));
std::unique_ptr <db::LayoutToNetlist> l2ndb (new db::LayoutToNetlist (si));
trace_all_nets (l2ndb.get (), cv, flat);
unsigned int l2ndb_index = view ()->add_l2ndb (l2ndb.release ());
view ()->open_l2ndb_browser (l2ndb_index, view ()->index_of_cellview (&cv));
@@ -123,7 +123,7 @@ public slots:
private:
typedef lay::mem_chunks<GLfloat, 1024 * 18> chunks_type;
std::auto_ptr<D25InteractionMode> mp_mode;
std::unique_ptr<D25InteractionMode> mp_mode;
QOpenGLShaderProgram *m_shapes_program, *m_gridplane_program;
std::string m_error;
double m_scale_factor;