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

Method getNextLineCommentAdjustment

astyle/src/ASFormatter.cpp:5136–5145  ·  view source on GitHub ↗

* get the next line comment adjustment that results from breaking a closing bracket. * the bracket must be on the same line as the closing header. * i.e "} else" changed to "} \n else". */

Source from the content-addressed store, hash-verified

5134 * i.e "} else" changed to "} \n else".
5135 */
5136int ASFormatter::getNextLineCommentAdjustment()
5137{
5138 assert(foundClosingHeader && previousNonWSChar == '}');
5139 if (charNum < 1) // "else" is in column 1
5140 return 0;
5141 size_t lastBracket = currentLine.rfind('}', charNum - 1);
5142 if (lastBracket != string::npos)
5143 return (lastBracket - charNum); // return a negative number
5144 return 0;
5145}
5146
5147// for console build only
5148LineEndFormat ASFormatter::getLineEndFormat() const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected