From 60f819dbe74ed84ce7f97c71281f9bd1f6f32004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 2 Aug 2017 08:00:52 +0200 Subject: [PATCH] Refactoring, use continue in loop --- lib/importproject.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/importproject.cpp b/lib/importproject.cpp index 7f8da4bbf..b02145be9 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -267,18 +267,18 @@ namespace { if (a) name = a; for (const tinyxml2::XMLElement *e = cfg->FirstChildElement(); e; e = e->NextSiblingElement()) { - if (e->GetText()) { - if (std::strcmp(e->Name(),"Configuration")==0) - configuration = e->GetText(); - else if (std::strcmp(e->Name(),"Platform")==0) { - platformStr = e->GetText(); - if (platformStr == "Win32") - platform = Win32; - else if (platformStr == "x64") - platform = x64; - else - platform = Unknown; - } + if (!e->GetText()) + continue; + if (std::strcmp(e->Name(),"Configuration")==0) + configuration = e->GetText(); + else if (std::strcmp(e->Name(),"Platform")==0) { + platformStr = e->GetText(); + if (platformStr == "Win32") + platform = Win32; + else if (platformStr == "x64") + platform = x64; + else + platform = Unknown; } } }