Reduce the scope of a variable

This commit is contained in:
Thomas Goyne 2015-09-04 11:30:00 -07:00
parent 0c111a2035
commit 6133eebf8b
1 changed files with 1 additions and 2 deletions

View File

@ -355,8 +355,7 @@ bool Realm::refresh()
uint64_t Realm::get_schema_version(const realm::Realm::Config &config) uint64_t Realm::get_schema_version(const realm::Realm::Config &config)
{ {
auto existing_realm = s_global_cache.get_any_realm(config.path); if (auto existing_realm = s_global_cache.get_any_realm(config.path)) {
if (existing_realm) {
return existing_realm->config().schema_version; return existing_realm->config().schema_version;
} }