summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-10-17 12:33:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-10-17 12:33:42 +0100
commit6b273c1f31f4c60adcb120009d9255876b906c0d (patch)
tree9d492b2c69d6eed6c75ead19538038ffe251a607
parentCustom enummap type (diff)
downloadslicer-6b273c1f31f4c60adcb120009d9255876b906c0d.tar.bz2
slicer-6b273c1f31f4c60adcb120009d9255876b906c0d.tar.xz
slicer-6b273c1f31f4c60adcb120009d9255876b906c0d.zip
Remove use of Ice::optional for std::optional
-rw-r--r--slicer/db/sqlSelectDeserializer.cpp2
-rw-r--r--slicer/db/sqlSelectDeserializer.h6
-rw-r--r--slicer/slicer/modelParts.cpp4
-rw-r--r--slicer/slicer/modelParts.h6
-rw-r--r--slicer/slicer/modelPartsTypes.h2
-rw-r--r--slicer/slicer/modelPartsTypes.impl.h2
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 <sqlExceptions.h>
namespace Slicer {
- SqlSelectDeserializer::SqlSelectDeserializer(DB::SelectCommand * c, Ice::optional<std::string> tc) :
+ SqlSelectDeserializer::SqlSelectDeserializer(DB::SelectCommand * c, std::optional<std::string> 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<std::string> typeIdCol = Ice::optional<std::string>());
+ DB::SelectCommand *, std::optional<std::string> typeIdCol = std::optional<std::string>());
void Deserialize(Slicer::ModelPartForRootPtr) override;
@@ -21,8 +21,8 @@ namespace Slicer {
DB::SelectCommand * cmd;
unsigned int columnCount;
- Ice::optional<std::string> typeIdColName;
- Ice::optional<unsigned int> typeIdColIdx;
+ std::optional<std::string> typeIdColName;
+ std::optional<unsigned int> 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::string>
+ std::optional<std::string>
ModelPart::GetTypeIdProperty() const
{
- return Ice::optional<std::string>();
+ 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 <Ice/InputStream.h>
-#include <Ice/Optional.h>
#include <Ice/OutputStream.h>
#include <functional>
#include <list>
+#include <optional>
#include <stdexcept>
#include <vector>
#include <visibility.h>
@@ -66,7 +66,7 @@ namespace Slicer {
using ModelPartPtr = std::shared_ptr<ModelPart>;
using ModelPartForRootPtr = std::shared_ptr<ModelPartForRootBase>;
using HookCommonPtr = std::unique_ptr<HookCommon>;
- using TypeId = Ice::optional<std::string>;
+ using TypeId = std::optional<std::string>;
using ChildHandler = std::function<void(const std::string &, ModelPartPtr, const HookCommon *)>;
using ClassRef = std::function<ModelPartPtr(void *)>;
using HookFilter = std::function<bool(const HookCommon *)>;
@@ -148,7 +148,7 @@ namespace Slicer {
= 0;
virtual ModelPartPtr GetSubclassModelPart(const std::string &);
virtual TypeId GetTypeId() const;
- virtual Ice::optional<std::string> GetTypeIdProperty() const;
+ virtual std::optional<std::string> 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<!std::is_base_of<Ice::Object, dummy>::value>::type * = nullptr) const;
- [[nodiscard]] Ice::optional<std::string> GetTypeIdProperty() const override;
+ [[nodiscard]] std::optional<std::string> 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<typename T>
- Ice::optional<std::string>
+ std::optional<std::string>
ModelPartForClass<T>::GetTypeIdProperty() const
{
return typeIdProperty;