Skip to content

Commit

Permalink
Reduce the scope of a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Sep 9, 2015
1 parent 0c111a2 commit 6133eeb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions shared_realm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@ bool Realm::refresh()

uint64_t Realm::get_schema_version(const realm::Realm::Config &config)
{
auto existing_realm = s_global_cache.get_any_realm(config.path);
if (existing_realm) {
if (auto existing_realm = s_global_cache.get_any_realm(config.path)) {
return existing_realm->config().schema_version;
}

Expand Down

0 comments on commit 6133eeb

Please sign in to comment.