Skip to content

Commit 8e9d3e6

Browse files
committed
more efficient code
1 parent c8c1efd commit 8e9d3e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/include/cpp-json/json.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ class reader {
908908

909909
bool match(std::string_view s) noexcept {
910910

911-
if (str_.substr(index_, s.size()) != s) {
911+
if (str_.compare(index_, s.size(), s) != 0) {
912912
return false;
913913
}
914914

0 commit comments

Comments
 (0)