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

Method computeObjCColonAlignment

astyle/src/ASBeautifier.cpp:2124–2130  ·  view source on GitHub ↗

* Compute the spaceIndentCount necessary to align the current line colon * with the colon position in the argument. * If it cannot be aligned indentLength is returned and a new colon * position is calculated. */

Source from the content-addressed store, hash-verified

2122 * position is calculated.
2123 */
2124int ASBeautifier::computeObjCColonAlignment(string &line, int colonAlignPosition) const
2125{
2126 int colonPosition = line.find(':');
2127 if (colonPosition < 0 || colonPosition > colonAlignPosition)
2128 return indentLength;
2129 return (colonAlignPosition - colonPosition);
2130}
2131
2132/**
2133 * Parse the current line to update indentCount and spaceIndentCount.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected