Skip to content

Commit 1539a8c

Browse files
committed
Fix the coding style of the pull request #1115
1 parent 8b3b014 commit 1539a8c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/actions/transformations/remove_whitespace.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@ RemoveWhitespace::RemoveWhitespace(std::string action)
3939
std::string RemoveWhitespace::evaluate(std::string value,
4040
Transaction *transaction) {
4141

42-
long int i = 0;
42+
int64_t i = 0;
4343

4444
// loop through all the chars
45-
while(i < value.size()) {
45+
while (i < value.size()) {
4646
// remove whitespaces and non breaking spaces (NBSP)
47-
if (isspace(value[i])||(value[i] == NBSP)) {
48-
value.erase(i, 1);
49-
}
50-
else {
47+
if (isspace(value[i]) || (value[i] == NBSP)) {
48+
value.erase(i, 1);
49+
} else {
5150
/* if the space is not a whitespace char, increment counter
5251
counter should not be incremented if a character is erased because
5352
the index erased will be replaced by the following character */

0 commit comments

Comments
 (0)