MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / appendSpaceAfter

Method appendSpaceAfter

astyle/src/ASFormatter.cpp:2387–2403  ·  view source on GitHub ↗

* append a space to the current formattedline, UNLESS the * next character is already a white-space character. */

Source from the content-addressed store, hash-verified

2385 * next character is already a white-space character.
2386 */
2387void 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected