diff --git a/src/impl/realm_coordinator.cpp b/src/impl/realm_coordinator.cpp index 931416b8..42f8aba9 100644 --- a/src/impl/realm_coordinator.cpp +++ b/src/impl/realm_coordinator.cpp @@ -102,7 +102,7 @@ std::shared_ptr RealmCoordinator::get_realm(Realm::Config config) } } } - + auto realm = std::make_shared(std::move(config)); realm->init(shared_from_this()); diff --git a/src/object_store.hpp b/src/object_store.hpp index 0b9f05f8..670cbf53 100644 --- a/src/object_store.hpp +++ b/src/object_store.hpp @@ -157,7 +157,7 @@ namespace realm { private: std::vector m_validation_errors; }; - + class SchemaMismatchException : public ObjectStoreException { public: SchemaMismatchException(std::vector const& errors); diff --git a/src/shared_realm.cpp b/src/shared_realm.cpp index c5d50b8e..056bc9e7 100644 --- a/src/shared_realm.cpp +++ b/src/shared_realm.cpp @@ -463,10 +463,10 @@ void Realm::close() m_coordinator = nullptr; } -int Realm::file_format_upgraded_from_version() const +util::Optional Realm::file_format_upgraded_from_version() const { if (upgrade_initial_version != upgrade_final_version) { return upgrade_initial_version; } - return 0; + return util::Optional(); } diff --git a/src/shared_realm.hpp b/src/shared_realm.hpp index d01bfdb1..1536fa76 100644 --- a/src/shared_realm.hpp +++ b/src/shared_realm.hpp @@ -133,7 +133,7 @@ namespace realm { void close(); // returns the file format version upgraded from, or 0 if not upgraded - int file_format_upgraded_from_version() const; + util::Optional file_format_upgraded_from_version() const; ~Realm();