Remove inner identical condition
This commit is contained in:
parent
90983303f0
commit
541e255159
|
@ -1230,19 +1230,15 @@ void CheckIO::checkFormatString(const Token * const tok,
|
||||||
// If the next character is the same (which makes 'hh' or 'll') then expect another alphabetical character
|
// If the next character is the same (which makes 'hh' or 'll') then expect another alphabetical character
|
||||||
const bool isSecondCharAvailable = ((i + 1) != formatString.end());
|
const bool isSecondCharAvailable = ((i + 1) != formatString.end());
|
||||||
if (i != formatString.end() && isSecondCharAvailable && *(i + 1) == *i) {
|
if (i != formatString.end() && isSecondCharAvailable && *(i + 1) == *i) {
|
||||||
if (isSecondCharAvailable) {
|
if (!isalpha(*(i + 2))) {
|
||||||
if (!isalpha(*(i + 2))) {
|
std::string modifier;
|
||||||
std::string modifier;
|
modifier += *i;
|
||||||
modifier += *i;
|
modifier += *(i + 1);
|
||||||
modifier += *(i + 1);
|
invalidLengthModifierError(tok, numFormat, modifier);
|
||||||
invalidLengthModifierError(tok, numFormat, modifier);
|
|
||||||
done = true;
|
|
||||||
} else {
|
|
||||||
specifier = *i++;
|
|
||||||
specifier += *i++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
done = true;
|
done = true;
|
||||||
|
} else {
|
||||||
|
specifier = *i++;
|
||||||
|
specifier += *i++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (i != formatString.end()) {
|
if (i != formatString.end()) {
|
||||||
|
|
Loading…
Reference in New Issue