From 6b273c1f31f4c60adcb120009d9255876b906c0d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 17 Oct 2020 12:33:42 +0100 Subject: Remove use of Ice::optional for std::optional --- slicer/db/sqlSelectDeserializer.cpp | 2 +- slicer/db/sqlSelectDeserializer.h | 6 +++--- slicer/slicer/modelParts.cpp | 4 ++-- slicer/slicer/modelParts.h | 6 +++--- slicer/slicer/modelPartsTypes.h | 2 +- slicer/slicer/modelPartsTypes.impl.h | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/slicer/db/sqlSelectDeserializer.cpp b/slicer/db/sqlSelectDeserializer.cpp index 8982958..4ecf410 100644 --- a/slicer/db/sqlSelectDeserializer.cpp +++ b/slicer/db/sqlSelectDeserializer.cpp @@ -4,7 +4,7 @@ #include namespace Slicer { - SqlSelectDeserializer::SqlSelectDeserializer(DB::SelectCommand * c, Ice::optional tc) : + SqlSelectDeserializer::SqlSelectDeserializer(DB::SelectCommand * c, std::optional tc) : cmd(c), columnCount(0), typeIdColName(std::move(tc)) { } diff --git a/slicer/db/sqlSelectDeserializer.h b/slicer/db/sqlSelectDeserializer.h index 32961e9..05f1c06 100644 --- a/slicer/db/sqlSelectDeserializer.h +++ b/slicer/db/sqlSelectDeserializer.h @@ -9,7 +9,7 @@ namespace Slicer { class DLL_PUBLIC SqlSelectDeserializer : public Slicer::Deserializer { public: explicit SqlSelectDeserializer( - DB::SelectCommand *, Ice::optional typeIdCol = Ice::optional()); + DB::SelectCommand *, std::optional typeIdCol = std::optional()); void Deserialize(Slicer::ModelPartForRootPtr) override; @@ -21,8 +21,8 @@ namespace Slicer { DB::SelectCommand * cmd; unsigned int columnCount; - Ice::optional typeIdColName; - Ice::optional typeIdColIdx; + std::optional typeIdColName; + std::optional typeIdColIdx; }; } diff --git a/slicer/slicer/modelParts.cpp b/slicer/slicer/modelParts.cpp index a6e191a..2dd8df5 100644 --- a/slicer/slicer/modelParts.cpp +++ b/slicer/slicer/modelParts.cpp @@ -24,10 +24,10 @@ namespace Slicer { return TypeId(); } - Ice::optional + std::optional ModelPart::GetTypeIdProperty() const { - return Ice::optional(); + return {}; } void diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h index 50ae427..305e073 100644 --- a/slicer/slicer/modelParts.h +++ b/slicer/slicer/modelParts.h @@ -2,10 +2,10 @@ #define SLICER_MODELPARTS_H #include -#include #include #include #include +#include #include #include #include @@ -66,7 +66,7 @@ namespace Slicer { using ModelPartPtr = std::shared_ptr; using ModelPartForRootPtr = std::shared_ptr; using HookCommonPtr = std::unique_ptr; - using TypeId = Ice::optional; + using TypeId = std::optional; using ChildHandler = std::function; using ClassRef = std::function; using HookFilter = std::function; @@ -148,7 +148,7 @@ namespace Slicer { = 0; virtual ModelPartPtr GetSubclassModelPart(const std::string &); virtual TypeId GetTypeId() const; - virtual Ice::optional GetTypeIdProperty() const; + virtual std::optional GetTypeIdProperty() const; virtual ModelPartType GetType() const = 0; virtual void Create(); virtual void Complete(); diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h index 062d9c2..06458d1 100644 --- a/slicer/slicer/modelPartsTypes.h +++ b/slicer/slicer/modelPartsTypes.h @@ -189,7 +189,7 @@ namespace Slicer { std::string getTypeId( typename std::enable_if::value>::type * = nullptr) const; - [[nodiscard]] Ice::optional GetTypeIdProperty() const override; + [[nodiscard]] std::optional GetTypeIdProperty() const override; static const std::string typeIdProperty; static const std::string * className; diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index b79a141..eaab54b 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -577,7 +577,7 @@ namespace Slicer { } template - Ice::optional + std::optional ModelPartForClass::GetTypeIdProperty() const { return typeIdProperty; -- cgit v1.2.3