1
0
Fork 0

Fix some warnings from Xcode 12

This commit is contained in:
Automatic Release Builder 2020-09-29 22:19:20 +01:00 committed by James Turner
parent b727806bee
commit c7f66ecf1c
4 changed files with 5 additions and 5 deletions

View file

@ -146,7 +146,7 @@ void RunwayList::set(const std::string & tp, const std::string & lst)
// timeOffsetInDays = weekday - currTimeDate->getGmt()->tm_wday;
// timeCopy = timeCopy.substr(2,timeCopy.length());
type = tp;
for (const auto s : strutils::split(lst, ",")) {
for (const auto& s : strutils::split(lst, ",")) {
auto ident = strutils::strip(s);
// http://code.google.com/p/flightgear-bugs/issues/detail?id=1137
if ((ident.size() < 2) || !isdigit(ident[1])) {

View file

@ -345,7 +345,7 @@ FGIO::init()
// port onto the port list copies the structure and destroys the
// original, which closes the port and frees up the fd ... doh!!!
for (const auto config : *(globals->get_channel_options_list())) {
for (const auto& config : *(globals->get_channel_options_list())) {
FGProtocol* p = add_channel(config);
if (p) {
addToPropertyTree(p->get_name(), config);

View file

@ -38,7 +38,7 @@ FGLogger::init ()
std::vector<SGPropertyNode_ptr> children = logging->getChildren("log");
_logs.reserve(children.size());
for (const auto child: children) {
for (const auto& child: children) {
if (!child->getBoolValue("enabled", false))
continue;

View file

@ -210,7 +210,7 @@ void executeNasalTestsInDir(const SGPath& path)
{
simgear::Dir d(path);
for (const auto testFile : d.children(simgear::Dir::TYPE_FILE, "*.nut")) {
for (const auto& testFile : d.children(simgear::Dir::TYPE_FILE, "*.nut")) {
SG_LOG(SG_NASAL, SG_INFO, "Processing test file " << testFile);
} // of test files iteration
@ -266,7 +266,7 @@ bool executeNasalTest(const SGPath& path)
auto setUpFunc = localNS.get("setUp");
auto tearDown = localNS.get("tearDown");
for (const auto& value : localNS) {
for (const auto value : localNS) {
if (value.getKey().find("test_") == 0) {
static_activeTest.reset(new ActiveTest);