From 526d5d8bb9e167b69e3e329a108fa9292f3a4322 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Sat, 8 Oct 2022 06:18:29 +0200 Subject: [PATCH] Mother of god; do not require C++20 --- tests/ChunkedEncoding.cpp | 2 +- tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ChunkedEncoding.cpp b/tests/ChunkedEncoding.cpp index 1e70d25..4fdb4b4 100644 --- a/tests/ChunkedEncoding.cpp +++ b/tests/ChunkedEncoding.cpp @@ -60,7 +60,7 @@ void runTest(unsigned int maxConsume) { std::abort(); } - if (chunks[chunkOffset].starts_with(chunk)) { + if (chunks[chunkOffset].substr(0, chunk.length()) == chunk /*starts_with(chunk)*/) { chunks[chunkOffset].remove_prefix(chunk.length()); if (!chunks[chunkOffset].length()) { chunkOffset++; diff --git a/tests/Makefile b/tests/Makefile index 6e5655a..f34b68d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,5 @@ default: - $(CXX) -std=c++20 -fsanitize=address -g ChunkedEncoding.cpp -o ChunkedEncoding + $(CXX) -std=c++17 -fsanitize=address ChunkedEncoding.cpp -o ChunkedEncoding ./ChunkedEncoding $(CXX) -std=c++17 -fsanitize=address TopicTree.cpp -o TopicTree ./TopicTree