diff options
| author | 2016-01-08 20:54:21 +0100 | |
|---|---|---|
| committer | 2016-01-08 20:54:21 +0100 | |
| commit | db15e41502743d1124062eddb8d2bb3617e2593c (patch) | |
| tree | 259d73b1be7b10efbfd125c118fc7d956a9b1aac /parsingtoolbox.cpp | |
| parent | 6a1a9f1c7f3c50d04d89cc54e93d08ed6f2c4cc2 (diff) | |
| download | OneRoll-db15e41502743d1124062eddb8d2bb3617e2593c.tar.gz OneRoll-db15e41502743d1124062eddb8d2bb3617e2593c.zip | |
fix cppcheck errors
Diffstat (limited to 'parsingtoolbox.cpp')
| -rw-r--r-- | parsingtoolbox.cpp | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp index d511e44..495ae6e 100644 --- a/parsingtoolbox.cpp +++ b/parsingtoolbox.cpp @@ -80,10 +80,6 @@ ParsingToolBox::~ParsingToolBox() Validator* ParsingToolBox::readValidator(QString& str) { Validator* returnVal=NULL; - - bool isOk = true; - - BooleanCondition::LogicOperator myLogicOp = BooleanCondition::Equal; bool hasReadLogicOperator = readLogicOperator(str,myLogicOp); qint64 value=0; @@ -96,41 +92,18 @@ Validator* ParsingToolBox::readValidator(QString& str) qint64 end=0; if(readNumber(str,end)) { - /* if(expectSquareBrasket) - { - if(str.startsWith("]")) - { - str=str.remove(0,1); - isOk=true; - } - else - { - isOk=false; - } - }*/ - if(isOk) - { - str=str.remove(0,1); - Range* range = new Range(); - range->setValue(value,end); - returnVal = range; - } + str=str.remove(0,1); + Range* range = new Range(); + range->setValue(value,end); + returnVal = range; } } else { - /* if((expectSquareBrasket)&&(str.startsWith("]"))) - { - str=str.remove(0,1); - isOk=true; - }*/ - //if(isOk) - { - BooleanCondition* condition = new BooleanCondition(); - condition->setValue(value); - condition->setOperator(myLogicOp); - returnVal = condition; - } + BooleanCondition* condition = new BooleanCondition(); + condition->setValue(value); + condition->setOperator(myLogicOp); + returnVal = condition; } } return returnVal; |