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

Method appendChar

astyle/src/ASFormatter.cpp:2305–2320  ·  view source on GitHub ↗

* Append a character to the current formatted line. * The formattedLine split points are updated. * * @param char the character to append. * @param canBreakLine if true, a registered line-break */

Source from the content-addressed store, hash-verified

2303 * @param canBreakLine if true, a registered line-break
2304 */
2305void ASFormatter::appendChar(char ch, bool canBreakLine)
2306{
2307 if (canBreakLine && isInLineBreak)
2308 breakLine();
2309
2310 formattedLine.append(1, ch);
2311 isImmediatelyPostCommentOnly = false;
2312 if (maxCodeLength != string::npos)
2313 {
2314 // These compares reduce the frequency of function calls.
2315 if (isOkToSplitFormattedLine())
2316 updateFormattedLineSplitPoints(ch);
2317 if (formattedLine.length() > maxCodeLength)
2318 testForTimeToSplitFormattedLine();
2319 }
2320}
2321
2322/**
2323 * Append a string sequence to the current formatted line.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected