MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetNumLines

Function GetNumLines

Source/Scripting/scriptfile.cpp:90–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90unsigned GetNumLines(std::string& script) {
91 unsigned line_number = 1;
92 for (char i : script) {
93 if (i == '\n') {
94 line_number++;
95 }
96 }
97 return line_number;
98}
99
100FileRangeList::iterator GetFileRange(FileRangeList& ranges, unsigned line) {
101 FileRangeList::iterator iter = ranges.begin();

Callers 1

ExpandIncludePathsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected