Skip to content

Commit

Permalink
Merge pull request YosysHQ#543 from tcal-x/use-single-char-find
Browse files Browse the repository at this point in the history
Use std::string::find(char c) when searching for a single character.
  • Loading branch information
gatecat authored Dec 17, 2020
2 parents c667c56 + c967f8e commit 84c55f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ice40/pcf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 84c55f8

Please sign in to comment.