Refactoring (compiler warnings and a typo)

This commit is contained in:
amai2012 2015-05-25 23:15:59 +02:00
parent d4550c763d
commit 729b240d9c
3 changed files with 3 additions and 3 deletions

View File

@ -2221,7 +2221,7 @@ void CheckOther::checkDuplicateExpression()
if (assignment)
selfAssignmentError(tok, tok->astOperand1()->expressionString());
else {
if (_tokenizer->isCPP() && _settings->standards.CPP11 && tok->str() == "==") {
if (_tokenizer->isCPP() && _settings->standards.cpp==Standards::CPP11 && tok->str() == "==") {
const Token* parent = tok->astParent();
while (parent && parent->astParent()) {
parent = parent->astParent();

View File

@ -871,7 +871,7 @@ static bool valueFlowForward(Token * const startToken,
// Should scope be skipped because variable value is checked?
std::list<ValueFlow::Value> truevalues;
for (std::list<ValueFlow::Value>::iterator it = values.begin(); it != values.end(); ++it) {
for (std::list<ValueFlow::Value>::const_iterator it = values.begin(); it != values.end(); ++it) {
if (!conditionIsFalse(tok2->next()->astOperand2(), getProgramMemory(tok2, varid, *it)))
truevalues.push_back(*it);
}

View File

@ -140,7 +140,7 @@ private:
void longCastAssign() {
Settings settings;
settings.addEnabled("style");
settings.platform(Settings::PlatformType::Unix64);
settings.platform(Settings::Unix64);
check("long f(int x, int y) {\n"
" const long ret = x * y;\n"