Skip to content

Commit efffdcf

Browse files
committed
MCDecoder: partly revert recent cleanup to reestablish c++17 support
std::string_view::starts_with was introduced in c++20 :-/.
1 parent f910c54 commit efffdcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/maxicode/MCDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ DecoderResult Decode(ByteArray&& bytes, const int mode)
276276
auto country = ToString(GetCountry(bytes), 3);
277277
auto service = ToString(GetServiceClass(bytes), 3);
278278
GetMessage(bytes, 10, 84, result, sai);
279-
result.insert(result.bytes.asString().starts_with("[)>\u001E01\u001D") ? 9 : 0, // "[)>" + RS + "01" + GS
279+
result.insert(result.bytes.asString().compare(0, 7, "[)>\u001E01\u001D") == 0 ? 9 : 0, // "[)>" + RS + "01" + GS
280280
postcode + GS + country + GS + service + GS);
281281
break;
282282
}

0 commit comments

Comments
 (0)