Skip to content

Commit

Permalink
Initialize next_id
Browse files Browse the repository at this point in the history
  • Loading branch information
igorcanadi committed Jul 25, 2014
1 parent c8e70e6 commit 28b367d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utilities/spatialdb/spatial_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ Status SpatialDB::Open(const SpatialDBOptions& options, const std::string& name,
}
index_cf.emplace_back(index_options, handles[i + 2]);
}
uint64_t next_id;
uint64_t next_id = 1;
if (s.ok()) {
// find next_id
Iterator* iter = base_db->NewIterator(ReadOptions(), handles[0]);
Expand All @@ -690,8 +690,6 @@ Status SpatialDB::Open(const SpatialDBOptions& options, const std::string& name,
} else {
next_id = last_id + 1;
}
} else {
next_id = 1;
}
delete iter;
}
Expand Down

0 comments on commit 28b367d

Please sign in to comment.