diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-04-28 14:24:04 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-04-28 14:24:04 +0100 |
commit | 1a7b43c875227527bf180066354f6c3d6515d5cb (patch) | |
tree | 7d9364adb554b2bd5f1ea5701be82923e04e0793 /project2/common/variables | |
parent | Fix throw in destructors (diff) | |
download | project2-1a7b43c875227527bf180066354f6c3d6515d5cb.tar.bz2 project2-1a7b43c875227527bf180066354f6c3d6515d5cb.tar.xz project2-1a7b43c875227527bf180066354f6c3d6515d5cb.zip |
C++17 and Ice 3.7project2-1.3.0
Updates all code to work with C++17 and Ice 3.7 and related updates in
used libraries.
Diffstat (limited to 'project2/common/variables')
-rw-r--r-- | project2/common/variables/config.cpp | 8 | ||||
-rw-r--r-- | project2/common/variables/literal.cpp | 2 | ||||
-rw-r--r-- | project2/common/variables/literal.h | 4 | ||||
-rw-r--r-- | project2/common/variables/lookup.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/project2/common/variables/config.cpp b/project2/common/variables/config.cpp index 9ac3dd0..ebb184d 100644 --- a/project2/common/variables/config.cpp +++ b/project2/common/variables/config.cpp @@ -69,9 +69,9 @@ class VariableConfigFactory : public VariableFactory::For<VariableConfig> { } }; VariableConfigFactory() : - opts(new Options("Variables - ModConfig options")) + opts(std::make_shared<Options>("Variables - ModConfig options")) { - (*opts)(new AppSettings()); + (*opts)(std::make_shared<AppSettings>()); AdHoc::PluginManager::getDefault()->add<Options>(opts, typeid(AppSettings).name(), __FILE__, __LINE__); } @@ -80,12 +80,12 @@ class VariableConfigFactory : public VariableFactory::For<VariableConfig> { AdHoc::PluginManager::getDefault()->remove<Options>(typeid(AppSettings).name()); } - const Options * options() const { + std::shared_ptr<const Options> options() const { return opts; } private: - Options * opts; + std::shared_ptr<Options> opts; }; NAMEDPLUGIN("config", VariableConfigFactory, VariableFactory); diff --git a/project2/common/variables/literal.cpp b/project2/common/variables/literal.cpp index 4f8e029..06e01cf 100644 --- a/project2/common/variables/literal.cpp +++ b/project2/common/variables/literal.cpp @@ -13,7 +13,7 @@ static void append(VariableLiteral::Vals * vals, const Y & y) { - vals->push_back(new X(y)); + vals->push_back(std::make_shared<X>(y)); } VariableLiteral::VariableLiteral(ScriptNodePtr s) { diff --git a/project2/common/variables/literal.h b/project2/common/variables/literal.h index 0f743e8..a70ee7b 100644 --- a/project2/common/variables/literal.h +++ b/project2/common/variables/literal.h @@ -11,10 +11,10 @@ class DLL_PUBLIC VariableLiteral : public VariableImpl { VariableLiteral(ScriptNodePtr); virtual VariableType value(ExecContext * ec) const; class Part; - typedef boost::intrusive_ptr<Part> PartCPtr; + typedef std::shared_ptr<Part> PartCPtr; typedef std::list<PartCPtr> Vals; - class Part : public IntrusivePtrBase { + class Part { public: virtual void appendTo(ExecContext *, Glib::ustring & str) const = 0; virtual VariableType value(ExecContext *) const = 0; diff --git a/project2/common/variables/lookup.cpp b/project2/common/variables/lookup.cpp index 6c6ca55..7aa1328 100644 --- a/project2/common/variables/lookup.cpp +++ b/project2/common/variables/lookup.cpp @@ -34,7 +34,7 @@ class VariableLookup : public VariableImplDyn, public RowProcessor { RowProcessor(e), name(e->value("name", NULL).as<Glib::ustring>()) { - e->script->loader.addLoadTarget(e, Storer::into<RowSetFactory>(&rowSets)); + e->script.lock()->loader.addLoadTarget(e, Storer::into<RowSetFactory>(&rowSets)); } VariableType value(ExecContext * ec) const { |