Skip to content

Commit 5606793

Browse files
pjungkampstv0g
authored andcommitted
fix(cppcheck): Replace string::find with string::starts_with
Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
1 parent ba6bd7f commit 5606793

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ json_t *Config::expandIncludes(json_t *in) {
327327
std::string text = json_string_value(str);
328328
static const std::string kw = "@include ";
329329

330-
if (text.find(kw) != 0)
330+
if (!text.starts_with(kw))
331331
return json_incref(str);
332332
else {
333333
std::string pattern = text.substr(kw.size());

0 commit comments

Comments
 (0)