From 9bac911fe1929228af883b6d5a948bbfdcc05835 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Thu, 17 Dec 2020 16:08:06 -0600 Subject: [PATCH] Maintenance: Use empty instead of size==0 --- simgear/scene/tgdb/ReaderWriterSTG.cxx | 2 +- simgear/scene/util/OrthophotoManager.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/tgdb/ReaderWriterSTG.cxx b/simgear/scene/tgdb/ReaderWriterSTG.cxx index 273a3232..36816ed3 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.cxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.cxx @@ -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 { diff --git a/simgear/scene/util/OrthophotoManager.cxx b/simgear/scene/util/OrthophotoManager.cxx index 51db95db..65ad02d3 100644 --- a/simgear/scene/util/OrthophotoManager.cxx +++ b/simgear/scene/util/OrthophotoManager.cxx @@ -350,7 +350,7 @@ namespace simgear { } } - if (orthophotos.size() == 0) { + if (orthophotos.empty()) { return nullptr; } else if (orthophotos.size() == 1) { return orthophotos[0];