C++: Optimize condition

Change-Id: Ifc48b9c89d6399636aed3693a0736ad6d58f0cff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Orgad Shaneh
2014-05-05 17:03:54 +03:00
committed by Orgad Shaneh
parent 87d8202c00
commit c3b7dc0ac1

View File

@@ -87,12 +87,10 @@ public:
protected:
bool preVisit(Symbol *s)
{
if (s->asBlock()) {
if (s->line() < line || (s->line() == line && s->column() <= column))
return true;
if (s->line() < line || (s->line() == line && s->column() <= column)) {
// skip blocks
} if (s->line() < line || (s->line() == line && s->column() <= column)) {
symbol = s;
if (!s->asBlock())
symbol = s;
return true;
}