* 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 */
| 2344 | * @param canBreakLine if true, a registered line-break |
| 2345 | */ |
| 2346 | void 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 |
nothing calls this directly
no outgoing calls
no test coverage detected