Skip to content

Commit

Permalink
move log null check out of for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwhite1193 committed Sep 8, 2020
1 parent 42aea9e commit dd3160a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions six/modules/c++/six/source/XMLControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ void XMLControl::validate(const xml::lite::Document* doc,
// log any error found and throw
if (!errors.empty())
{
for (size_t i = 0; i < errors.size(); ++i)
if (log)
{
if (log)
for (size_t i = 0; i < errors.size(); ++i)
{
log->critical(errors[i].toString());
}
Expand Down

0 comments on commit dd3160a

Please sign in to comment.