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

Method appendOperator

astyle/src/ASFormatter.cpp:2346–2359  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2344 * @param canBreakLine if true, a registered line-break
2345 */
2346void ASFormatter::appendOperator(const string &sequence, bool canBreakLine)
2347{
2348 if (canBreakLine && isInLineBreak)
2349 breakLine();
2350 formattedLine.append(sequence);
2351 if (maxCodeLength != string::npos)
2352 {
2353 // These compares reduce the frequency of function calls.
2354 if (isOkToSplitFormattedLine())
2355 updateFormattedLineSplitPointsOperator(sequence);
2356 if (formattedLine.length() > maxCodeLength)
2357 testForTimeToSplitFormattedLine();
2358 }
2359}
2360
2361/**
2362 * append a space to the current formattedline, UNLESS the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected