Use NSDMIs for Realm

This commit is contained in:
Thomas Goyne 2015-08-24 13:16:31 -07:00 committed by Ari Lazier
parent 938668904e
commit e61833c26e
2 changed files with 5 additions and 6 deletions

View File

@ -40,7 +40,7 @@ Realm::Config::Config(const Config& c) : path(c.path), read_only(c.read_only), i
}
}
Realm::Realm(Config &config) : m_config(config), m_thread_id(std::this_thread::get_id()), m_auto_refresh(true), m_in_transaction(false)
Realm::Realm(Config &config) : m_config(config)
{
try {
if (config.read_only) {
@ -52,7 +52,6 @@ Realm::Realm(Config &config) : m_config(config), m_thread_id(std::this_thread::g
SharedGroup::DurabilityLevel durability = config.in_memory ? SharedGroup::durability_MemOnly :
SharedGroup::durability_Full;
m_shared_group = std::make_unique<SharedGroup>(*m_history, durability, config.encryption_key.get());
m_group = nullptr;
}
}
catch (util::File::PermissionDenied const& ex) {

View File

@ -100,9 +100,9 @@ namespace realm {
Realm(Config &config);
Config m_config;
std::thread::id m_thread_id;
bool m_in_transaction;
bool m_auto_refresh;
std::thread::id m_thread_id = std::this_thread::get_id();
bool m_in_transaction = false;
bool m_auto_refresh = true;
std::set<NotificationFunction> m_notifications;
void send_local_notifications(const std::string &notification);
@ -114,7 +114,7 @@ namespace realm {
std::unique_ptr<SharedGroup> m_shared_group;
std::unique_ptr<Group> m_read_only_group;
Group *m_group;
Group *m_group = nullptr;
public:
ExternalNotificationFunction m_external_notifier;