From c967f8e43496973b667c4a962a62b9a04e7c987b Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Wed, 16 Dec 2020 20:07:56 -0800 Subject: Use std::string::find(char c) when searching for a single character. Signed-off-by: Tim Callahan --- ice40/pcf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ice40/pcf.cc b/ice40/pcf.cc index 8cf5db39..867f6165 100644 --- a/ice40/pcf.cc +++ b/ice40/pcf.cc @@ -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); -- cgit v1.2.3