From 6e374de9ae2f2978f2fca3390aba4ea3f72bfade Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Nov 2017 10:37:53 +0200 Subject: Switch to C++11, get rid of auto_ptr use --- odb/generator.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'odb/generator.cxx') diff --git a/odb/generator.cxx b/odb/generator.cxx index 74de7d1..bb8e12f 100644 --- a/odb/generator.cxx +++ b/odb/generator.cxx @@ -4,7 +4,7 @@ #include // std::toupper, std::is{alpha,upper,lower} #include -#include // std::auto_ptr +#include // std::unique_ptr #include #include #include @@ -166,7 +166,7 @@ generate (options const& ops, if (gen_schema) { - auto_ptr ctx (create_context (cerr, unit, ops, fts, 0)); + unique_ptr ctx (create_context (cerr, unit, ops, fts, 0)); switch (db) { @@ -496,7 +496,7 @@ generate (options const& ops, // if (gen_cxx) { - auto_ptr ctx ( + unique_ptr ctx ( create_context (hxx, unit, ops, fts, model.get ())); sloc_filter sloc (ctx->os); @@ -606,7 +606,7 @@ generate (options const& ops, // if (gen_cxx) { - auto_ptr ctx ( + unique_ptr ctx ( create_context (ixx, unit, ops, fts, model.get ())); sloc_filter sloc (ctx->os); @@ -666,7 +666,7 @@ generate (options const& ops, // if (gen_cxx && (db != database::common || md == multi_database::dynamic)) { - auto_ptr ctx ( + unique_ptr ctx ( create_context (cxx, unit, ops, fts, model.get ())); sloc_filter sloc (ctx->os); @@ -759,7 +759,7 @@ generate (options const& ops, // if (gen_sep_schema) { - auto_ptr ctx ( + unique_ptr ctx ( create_context (sch, unit, ops, fts, model.get ())); sloc_filter sloc (ctx->os); @@ -824,7 +824,7 @@ generate (options const& ops, // if (gen_sql_schema) { - auto_ptr ctx ( + unique_ptr ctx ( create_context (sql, unit, ops, fts, model.get ())); switch (db) @@ -890,7 +890,7 @@ generate (options const& ops, // { ofstream& mig (*mig_pre[i]); - auto_ptr ctx (create_context (mig, unit, ops, fts, 0)); + unique_ptr ctx (create_context (mig, unit, ops, fts, 0)); switch (db) { @@ -933,7 +933,7 @@ generate (options const& ops, // { ofstream& mig (*mig_post[i]); - auto_ptr ctx (create_context (mig, unit, ops, fts, 0)); + unique_ptr ctx (create_context (mig, unit, ops, fts, 0)); switch (db) { -- cgit v1.1