Fix the coding style of the pull request #1115

This commit is contained in:
Felipe Zimmerle 2016-04-05 09:56:08 -03:00
parent 8b3b014062
commit 1539a8c3ef

View File

@ -39,15 +39,14 @@ RemoveWhitespace::RemoveWhitespace(std::string action)
std::string RemoveWhitespace::evaluate(std::string value, std::string RemoveWhitespace::evaluate(std::string value,
Transaction *transaction) { Transaction *transaction) {
long int i = 0; int64_t i = 0;
// loop through all the chars // loop through all the chars
while (i < value.size()) { while (i < value.size()) {
// remove whitespaces and non breaking spaces (NBSP) // remove whitespaces and non breaking spaces (NBSP)
if (isspace(value[i]) || (value[i] == NBSP)) { if (isspace(value[i]) || (value[i] == NBSP)) {
value.erase(i, 1); value.erase(i, 1);
} } else {
else {
/* if the space is not a whitespace char, increment counter /* if the space is not a whitespace char, increment counter
counter should not be incremented if a character is erased because counter should not be incremented if a character is erased because
the index erased will be replaced by the following character */ the index erased will be replaced by the following character */