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

Method appendSpacePad

astyle/src/ASFormatter.cpp:2365–2381  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2363 * last character is already a white-space character.
2364 */
2365void ASFormatter::appendSpacePad()
2366{
2367 int len = formattedLine.length();
2368 if (len > 0 && !isWhiteSpace(formattedLine[len - 1]))
2369 {
2370 formattedLine.append(1, ' ');
2371 spacePadNum++;
2372 if (maxCodeLength != string::npos)
2373 {
2374 // These compares reduce the frequency of function calls.
2375 if (isOkToSplitFormattedLine())
2376 updateFormattedLineSplitPoints(' ');
2377 if (formattedLine.length() > maxCodeLength)
2378 testForTimeToSplitFormattedLine();
2379 }
2380 }
2381}
2382
2383/**
2384 * append a space to the current formattedline, UNLESS the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected