summaryrefslogtreecommitdiff
path: root/lib/persistence.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-11-26 20:21:12 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-26 20:21:12 +0000
commit239b3ab10b460da34c490a7e06a21c984e21ffb6 (patch)
tree4ce09f5d091ffbcf063a9d0fc076659dfe9e3142 /lib/persistence.h
parentDon't run the app by default (diff)
downloadilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.tar.bz2
ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.tar.xz
ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.zip
Enable all Jason Turner recommended warnings
Diffstat (limited to 'lib/persistence.h')
-rw-r--r--lib/persistence.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/persistence.h b/lib/persistence.h
index 252afde..0faa24d 100644
--- a/lib/persistence.h
+++ b/lib/persistence.h
@@ -26,6 +26,10 @@ namespace Persistence {
using Stack = std::stack<SelectionPtr>;
struct Writer {
+ Writer() = default;
+ virtual ~Writer() = default;
+ DEFAULT_MOVE_COPY(Writer);
+
virtual void beginObject() const = 0;
virtual void beginArray() const = 0;
virtual void pushValue(bool value) const = 0;
@@ -85,6 +89,7 @@ namespace Persistence {
template<typename T> struct SelectionT : public SelectionV<T> {
using SelectionV<T>::SelectionV;
+ using Selection::setValue;
using P = std::conditional_t<std::is_scalar_v<T>, T, T &&>;
void
@@ -102,6 +107,8 @@ namespace Persistence {
struct Persistable;
struct PersistenceStore {
+ virtual ~PersistenceStore() = default;
+
template<typename T> [[nodiscard]] inline bool persistType(const T * const, const std::type_info & ti);
enum class NameAction { Push, HandleAndContinue, Ignore };
@@ -292,6 +299,7 @@ namespace Persistence {
struct SelectionObj : public SelectionV<Ptr> {
struct MakeObjectByTypeName : public SelectionV<Ptr> {
using SelectionV<Ptr>::SelectionV;
+ using Selection::setValue;
void
setValue(std::string && type) override
@@ -316,6 +324,7 @@ namespace Persistence {
struct RememberObjectById : public SelectionV<Ptr> {
using SelectionV<Ptr>::SelectionV;
+ using Selection::setValue;
void
setValue(std::string && id) override
@@ -383,8 +392,10 @@ namespace Persistence {
}
using SelectionV<Ptr>::SelectionV;
+ using Selection::setValue;
- void setValue(std::nullptr_t) override
+ void
+ setValue(std::nullptr_t) override
{
this->v.reset();
}