Make List default constructable

This commit is contained in:
Thomas Goyne 2016-02-03 17:58:17 -08:00
parent 4c5389dbac
commit fdc67777bb
2 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,9 @@
using namespace realm;
List::List() noexcept = default;
List::~List() = default;
List::List(std::shared_ptr<Realm> 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<Realm> r, const ObjectSchema& s, LinkViewRef l) noexc
{
}
List::~List() = default;
size_t List::size() const
{
verify_attached();

View File

@ -32,6 +32,7 @@ class Realm;
class List {
public:
List() noexcept;
List(std::shared_ptr<Realm> r, const ObjectSchema& s, LinkViewRef l) noexcept;
~List();
@ -61,7 +62,7 @@ public:
private:
std::shared_ptr<Realm> 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;