summaryrefslogtreecommitdiff
path: root/odb/plugin.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-07 10:37:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-07 10:37:53 +0200
commit6e374de9ae2f2978f2fca3390aba4ea3f72bfade (patch)
treea603c240f79494e0139445c20f63f32db04d5277 /odb/plugin.cxx
parentfde4431ec608b467de6ab205e3f73848fe9efbdf (diff)
Switch to C++11, get rid of auto_ptr use
Diffstat (limited to 'odb/plugin.cxx')
-rw-r--r--odb/plugin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/odb/plugin.cxx b/odb/plugin.cxx
index 6c78d11..c046c2f 100644
--- a/odb/plugin.cxx
+++ b/odb/plugin.cxx
@@ -8,7 +8,7 @@
#include <sys/types.h> // stat
#include <sys/stat.h> // stat
-#include <memory> // std::auto_ptr
+#include <memory> // std::unique_ptr
#include <string>
#include <vector>
#include <cstring> // std::strcpy, std::strstr
@@ -39,7 +39,7 @@ using cutl::fs::invalid_path;
typedef vector<path> paths;
int plugin_is_GPL_compatible;
-auto_ptr<options const> options_;
+unique_ptr<options const> options_;
paths profile_paths_;
path file_; // File being compiled.
paths inputs_; // List of input files in at-once mode or just file_.
@@ -222,7 +222,7 @@ gate_callback (void*, void*)
// Parse the GCC tree to semantic graph.
//
parser p (*options_, loc_pragmas_, ns_loc_pragmas_, decl_pragmas_);
- auto_ptr<unit> u (p.parse (global_namespace, file_));
+ unique_ptr<unit> u (p.parse (global_namespace, file_));
features f;
@@ -381,14 +381,14 @@ plugin_init (plugin_name_args* plugin_info, plugin_gcc_version*)
oi[2].arg = &pd;
cli::argv_file_scanner scan (argc, &argv[0], oi, 3);
- auto_ptr<options> ops (
+ unique_ptr<options> ops (
new options (scan, cli::unknown_mode::fail, cli::unknown_mode::fail));
// Process options.
//
process_options (*ops);
- options_ = ops;
+ options_ = move (ops);
pragma_db_ = db;
pragma_multi_ = options_->multi_database ();
}