* append a space to the current formattedline, UNLESS the * next character is already a white-space character. */
| 2385 | * next character is already a white-space character. |
| 2386 | */ |
| 2387 | void ASFormatter::appendSpaceAfter() |
| 2388 | { |
| 2389 | int len = currentLine.length(); |
| 2390 | if (charNum + 1 < len && !isWhiteSpace(currentLine[charNum + 1])) |
| 2391 | { |
| 2392 | formattedLine.append(1, ' '); |
| 2393 | spacePadNum++; |
| 2394 | if (maxCodeLength != string::npos) |
| 2395 | { |
| 2396 | // These compares reduce the frequency of function calls. |
| 2397 | if (isOkToSplitFormattedLine()) |
| 2398 | updateFormattedLineSplitPoints(' '); |
| 2399 | if (formattedLine.length() > maxCodeLength) |
| 2400 | testForTimeToSplitFormattedLine(); |
| 2401 | } |
| 2402 | } |
| 2403 | } |
| 2404 | |
| 2405 | /** |
| 2406 | * register a line break for the formatted line. |
nothing calls this directly
no outgoing calls
no test coverage detected