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

Method computePreprocessorIndent

astyle/src/ASBeautifier.cpp:1170–1182  ·  view source on GitHub ↗

* Compute indentation for a preprocessor #if statement. * This may be called for the activeBeautiferStack * instead of the active ASBeautifier object. */

Source from the content-addressed store, hash-verified

1168 * instead of the active ASBeautifier object.
1169 */
1170pair<int, int> ASBeautifier::computePreprocessorIndent()
1171{
1172 computePreliminaryIndentation();
1173 pair<int, int> entry (indentCount, spaceIndentCount);
1174 if (!headerStack->empty()
1175 && entry.first > 0
1176 && (headerStack->back() == &AS_IF
1177 || headerStack->back() == &AS_ELSE
1178 || headerStack->back() == &AS_FOR
1179 || headerStack->back() == &AS_WHILE))
1180 --entry.first;
1181 return entry;
1182}
1183
1184/**
1185 * get distance to the next non-white space, non-comment character in the line.

Callers 1

beautifyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected