From fdc67777bb4b74e3ca15d072be284f612837e08f Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 3 Feb 2016 17:58:17 -0800 Subject: [PATCH] Make List default constructable --- src/list.cpp | 5 +++-- src/list.hpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/list.cpp b/src/list.cpp index 348c603e..bd1fb43b 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -24,6 +24,9 @@ using namespace realm; +List::List() noexcept = default; +List::~List() = default; + List::List(std::shared_ptr r, const ObjectSchema& s, LinkViewRef l) noexcept : m_realm(std::move(r)) , m_object_schema(&s) @@ -31,8 +34,6 @@ List::List(std::shared_ptr r, const ObjectSchema& s, LinkViewRef l) noexc { } -List::~List() = default; - size_t List::size() const { verify_attached(); diff --git a/src/list.hpp b/src/list.hpp index 18165e6d..c15c6eb9 100644 --- a/src/list.hpp +++ b/src/list.hpp @@ -32,6 +32,7 @@ class Realm; class List { public: + List() noexcept; List(std::shared_ptr r, const ObjectSchema& s, LinkViewRef l) noexcept; ~List(); @@ -61,7 +62,7 @@ public: private: std::shared_ptr m_realm; - const ObjectSchema* m_object_schema; + const ObjectSchema* m_object_schema = nullptr; LinkViewRef m_link_view; void verify_valid_row(size_t row_ndx, bool insertion = false) const;