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

Method isLineEndComment

astyle/src/ASBeautifier.cpp:1567–1580  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1565 * @return is before a line-end comment.
1566 */
1567bool ASBeautifier::isLineEndComment(const string &line, int startPos) const
1568{
1569 assert(line.compare(startPos, 2, "/*") == 0);
1570
1571 // comment must be closed on this line with nothing after it
1572 size_t endNum = line.find("*/", startPos + 2);
1573 if (endNum != string::npos)
1574 {
1575 size_t nextChar = line.find_first_not_of(" \t", endNum + 2);
1576 if (nextChar == string::npos)
1577 return true;
1578 }
1579 return false;
1580}
1581
1582/**
1583 * get the previous word index for an assignment operator

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected