diff --git a/src/data/set.hpp b/src/data/set.hpp index a7b95a57..dfe7c52c 100644 --- a/src/data/set.hpp +++ b/src/data/set.hpp @@ -15,7 +15,6 @@ #include #include // for Set::value #include -#include DECLARE_POINTER_TYPE(Card); DECLARE_POINTER_TYPE(Set); @@ -132,9 +131,9 @@ class Set : public Packaged { void reflect_cards (Tag& tag); /// Object for managing and executing scripts - scoped_ptr script_manager; + unique_ptr script_manager; /// Object for executing scripts from the thumbnail thread - scoped_ptr thumbnail_script_context; + unique_ptr thumbnail_script_context; /// Cache of cards ordered by some criterion map,OrderCacheP> order_cache; map filter_cache; diff --git a/src/gui/package_update_list.cpp b/src/gui/package_update_list.cpp index db4f4dde..f4213d9c 100644 --- a/src/gui/package_update_list.cpp +++ b/src/gui/package_update_list.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include DECLARE_TYPEOF_COLLECTION(InstallablePackageP); @@ -172,7 +171,7 @@ class PackageIconRequest : public ThumbnailRequest { virtual Image generate() { wxURL url(ti->package->description->icon_url); - scoped_ptr isP(url.GetInputStream()); + unique_ptr isP(url.GetInputStream()); if (!isP) return wxImage(); SeekAtStartInputStream is2(*isP); Image result(is2); diff --git a/src/script/context.cpp b/src/script/context.cpp index 7ec9e57a..71a7d730 100644 --- a/src/script/context.cpp +++ b/src/script/context.cpp @@ -51,7 +51,7 @@ ScriptValueP Context::eval(const Script& script, bool useScope) { // Evaluate the current instruction Instruction i = *instr++; // If a scope is created, destroy it at end of block. - scoped_ptr new_scope; + unique_ptr new_scope; switch (i.instr) { case I_NOP: break; diff --git a/src/script/value.cpp b/src/script/value.cpp index 21dae2e9..b7c2b526 100644 --- a/src/script/value.cpp +++ b/src/script/value.cpp @@ -511,7 +511,7 @@ ScriptValueP ScriptClosure::simplify() { } ScriptValueP ScriptClosure::do_eval(Context& ctx, bool openScope) const { - scoped_ptr scope(openScope ? new LocalScope(ctx) : nullptr); + unique_ptr scope = openScope ? make_unique(ctx) : nullptr; applyBindings(ctx); return fun->eval(ctx, openScope); } diff --git a/src/util/io/package.cpp b/src/util/io/package.cpp index 093130e6..0dd56fe8 100644 --- a/src/util/io/package.cpp +++ b/src/util/io/package.cpp @@ -15,7 +15,6 @@ #include #include #include -#include DECLARE_TYPEOF(Package::FileInfos); DECLARE_TYPEOF_COLLECTION(PackageDependencyP); @@ -401,9 +400,9 @@ void Package::saveToZipfile(const String& saveAs, bool remove_unused, bool is_co wxRemoveFile(tempFile); // open zip file try { - scoped_ptr newFile(new wxFileOutputStream(tempFile)); + unique_ptr newFile(new wxFileOutputStream(tempFile)); if (!newFile->IsOk()) throw PackageError(_ERROR_("unable to open output file")); - scoped_ptr newZip(new wxZipOutputStream(*newFile)); + unique_ptr newZip(new wxZipOutputStream(*newFile)); if (!newZip->IsOk()) throw PackageError(_ERROR_("unable to open output file")); // copy everything to a new zip file, unless it's updated or removed if (zipStream) newZip->CopyArchiveMetaData(*zipStream); diff --git a/src/util/smart_ptr.hpp b/src/util/smart_ptr.hpp index 4eea25e3..2a9e85fe 100644 --- a/src/util/smart_ptr.hpp +++ b/src/util/smart_ptr.hpp @@ -23,9 +23,6 @@ using std::dynamic_pointer_cast; using std::make_shared; using std::make_unique; -// TODO: remove scoped_ptr -template using scoped_ptr = unique_ptr; - // ----------------------------------------------------------------------------- : Declaring /// Declares the type TypeP as a shared_ptr