Use std::string::find(char c) when searching for a single character.

Signed-off-by: Tim Callahan <tcal@google.com>
This commit is contained in:
Tim Callahan 2020-12-16 20:07:56 -08:00
parent c8cb9895a3
commit c967f8e434

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);