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>
This commit is contained in:
parent
0de452ee9f
commit
43c789c8f2
@ -369,7 +369,7 @@ class SpatialIndexCursor : public Cursor {
|
||||
}
|
||||
delete spatial_iterator;
|
||||
|
||||
valid_ = valid_ && primary_key_ids_.size() > 0;
|
||||
valid_ = valid_ && !primary_key_ids_.empty();
|
||||
|
||||
if (valid_) {
|
||||
primary_keys_iterator_ = primary_key_ids_.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user