diff --git a/src/js_sync.hpp b/src/js_sync.hpp index 6fd0ac28..5b0cdf01 100644 --- a/src/js_sync.hpp +++ b/src/js_sync.hpp @@ -302,8 +302,7 @@ void SyncClass::populate_sync_config(ContextType ctx, ObjectType realm_constr std::string raw_realm_url = Object::validated_get_string(ctx, sync_config_object, "url"); // FIXME - use make_shared - config.sync_config = std::shared_ptr( - new SyncConfig({shared_user, raw_realm_url, SyncSessionStopPolicy::AfterChangesUploaded, handler, [=](int error_code, std::string message, SyncSessionError) {}}) + config.sync_config = std::shared_ptr(new SyncConfig{shared_user, raw_realm_url, SyncSessionStopPolicy::AfterChangesUploaded, handler, [=](int error_code, std::string message, SyncSessionError) {}} ); config.schema_mode = SchemaMode::Additive; config.path = realm::SyncManager::shared().path_for_realm(shared_user->identity(), raw_realm_url);