Merge pull request #543 from tcal-x/use-single-char-find

Use std::string::find(char c) when searching for a single character.
This commit is contained in:
David Shah 2020-12-17 21:19:05 +00:00 committed by GitHub
commit 84c55f8931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ bool apply_pcf(Context *ctx, std::string filename, std::istream &in)
int lineno = 0;
while (std::getline(in, line)) {
lineno++;
size_t cstart = line.find("#");
size_t cstart = line.find('#');
if (cstart != std::string::npos)
line = line.substr(0, cstart);
std::stringstream ss(line);