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>
main
Danny Al-Gaaf 10 years ago
parent 0de452ee9f
commit 43c789c8f2
  1. 2
      utilities/spatialdb/spatial_db.cc

@ -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…
Cancel
Save