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

Method isBeforeAnyComment

astyle/src/ASFormatter.cpp:1959–1971  ·  view source on GitHub ↗

* check if current placement is before a comment or line-comment * * @return is before a comment or line-comment. */

Source from the content-addressed store, hash-verified

1957 * @return is before a comment or line-comment.
1958 */
1959bool ASFormatter::isBeforeAnyComment() const
1960{
1961 bool foundComment = false;
1962 size_t peekNum = currentLine.find_first_not_of(" \t", charNum + 1);
1963
1964 if (peekNum == string::npos)
1965 return foundComment;
1966
1967 foundComment = (currentLine.compare(peekNum, 2, "/*") == 0
1968 || currentLine.compare(peekNum, 2, "//") == 0);
1969
1970 return foundComment;
1971}
1972
1973/**
1974 * check if current placement is before a comment or line-comment

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected