Skip to content

Commit

Permalink
COMP: Fix -Wint-in-bool-context warning in ctkErrorLogModelTerminalOu…
Browse files Browse the repository at this point in the history
…tputTest1

This fixes the following warning:

/path/to/CTK/Libs/Widgets/Testing/Cpp/ctkErrorLogModelTerminalOutputTest1.cpp:127:87: warning: enum constant in boolean context [-Wint-in-bool-context]
  127 |                           currentTerminalOutputEnabled, ctkErrorLogTerminalOutput::All);
      |                                                                                       ^

It is a following of fc9a964 (Add multi-thread support to ErrorLog model)
where the boolean check was originally introduced.
  • Loading branch information
jcfr committed Jun 15, 2023
1 parent ae4cfd3 commit aa4a717
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Libs/Widgets/Testing/Cpp/ctkErrorLogModelTerminalOutputTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ int ctkErrorLogModelTerminalOutputTest1(int argc, char * argv [])
QString errorMsg;

ctkErrorLogModel model;
ctkErrorLogTerminalOutput::TerminalOutputs currentTerminalOutputEnabled = model.terminalOutputs();
errorMsg = checkBoolean(__LINE__, "TerminalOutputEnabled",
currentTerminalOutputEnabled, ctkErrorLogTerminalOutput::None);
ctkErrorLogTerminalOutput::TerminalOutputs currentTerminalOutput = model.terminalOutputs();
errorMsg = checkInteger(__LINE__, "TerminalOutput",
currentTerminalOutput, ctkErrorLogTerminalOutput::None);
if (!errorMsg.isEmpty())
{
model.disableAllMsgHandler();
Expand All @@ -122,9 +122,9 @@ int ctkErrorLogModelTerminalOutputTest1(int argc, char * argv [])

model.setTerminalOutputs(ctkErrorLogTerminalOutput::All);

currentTerminalOutputEnabled = model.terminalOutputs();
errorMsg = checkBoolean(__LINE__, "TerminalOutputEnabled",
currentTerminalOutputEnabled, ctkErrorLogTerminalOutput::All);
currentTerminalOutput = model.terminalOutputs();
errorMsg = checkInteger(__LINE__, "TerminalOutput",
currentTerminalOutput, ctkErrorLogTerminalOutput::All);
if (!errorMsg.isEmpty())
{
model.disableAllMsgHandler();
Expand Down

0 comments on commit aa4a717

Please sign in to comment.