Maintenance: Use empty instead of size==0
This commit is contained in:
@@ -699,7 +699,7 @@ struct ReaderWriterSTG::_ModelBin {
|
|||||||
i->_elev += elevation(*terrainGroup, SGGeod::fromDeg(i->_lon, i->_lat));
|
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
|
// The simple case, just return the terrain group
|
||||||
return terrainGroup.release();
|
return terrainGroup.release();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ namespace simgear {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (orthophotos.size() == 0) {
|
if (orthophotos.empty()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else if (orthophotos.size() == 1) {
|
} else if (orthophotos.size() == 1) {
|
||||||
return orthophotos[0];
|
return orthophotos[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user