Skip to content

Commit 43c789c

Browse files
committed
spatialdb/spatial_db.cc: use !empty() instead of 'size() > 0'
Use empty() since it should be prefered as it has, following the standard, a constant time complexity regardless of the containter type. The same is not guaranteed for size(). Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
1 parent 0de452e commit 43c789c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utilities/spatialdb/spatial_db.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ class SpatialIndexCursor : public Cursor {
369369
}
370370
delete spatial_iterator;
371371

372-
valid_ = valid_ && primary_key_ids_.size() > 0;
372+
valid_ = valid_ && !primary_key_ids_.empty();
373373

374374
if (valid_) {
375375
primary_keys_iterator_ = primary_key_ids_.begin();

0 commit comments

Comments
 (0)