Skip to content

Commit

Permalink
Don't use keywords and and not for variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
tqh committed Jul 23, 2015
1 parent 2fb7433 commit 8a9464f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/servers/launch/Conditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,15 @@ Conditions::FromMessage(const BMessage& message)
/*static*/ Condition*
Conditions::AddNotSafeMode(Condition* condition)
{
AndCondition* and = dynamic_cast<AndCondition*>(condition);
if (and == NULL)
and = new AndCondition();
if (and != condition && condition != NULL)
and->AddCondition(condition);
AndCondition* andCondition = dynamic_cast<AndCondition*>(condition);
if (andCondition == NULL)
andCondition = new AndCondition();
if (andCondition != condition && condition != NULL)
andCondition->AddCondition(condition);

NotCondition* not = new NotCondition();
not->AddCondition(new SafeModeCondition());
NotCondition* notCondition = new NotCondition();
notCondition->AddCondition(new SafeModeCondition());

and->AddCondition(not);
return and;
andCondition->AddCondition(notCondtion);
return andCondition;
}

0 comments on commit 8a9464f

Please sign in to comment.