Maintenance: Use empty instead of size==0

This commit is contained in:
Scott Giese
2020-12-17 16:08:06 -06:00
parent cdd5cf8cd5
commit 9bac911fe1
2 changed files with 2 additions and 2 deletions

View File

@@ -699,7 +699,7 @@ struct ReaderWriterSTG::_ModelBin {
i->_elev += elevation(*terrainGroup, SGGeod::fromDeg(i->_lon, i->_lat));
}
if (_objectStaticList.empty() && _signList.empty() && (_buildingListList.size() == 0) && (_treeListList.size() == 0)) {
if (_objectStaticList.empty() && _signList.empty() && _buildingListList.empty() && _treeListList.empty()) {
// The simple case, just return the terrain group
return terrainGroup.release();
} else {

View File

@@ -350,7 +350,7 @@ namespace simgear {
}
}
if (orthophotos.size() == 0) {
if (orthophotos.empty()) {
return nullptr;
} else if (orthophotos.size() == 1) {
return orthophotos[0];