From b8ad898250a16ef681af0238cb8d6acc91af84a4 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 30 Oct 2024 11:33:42 +0100 Subject: [PATCH] chore: fix compilation pre-C++17 (#5) `.data()` returns `const char*` rather than `char*` before C++17. It's also not needed in this particular case. --- src/certs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/certs.cc b/src/certs.cc index 9179edb..1ad3089 100644 --- a/src/certs.cc +++ b/src/certs.cc @@ -53,7 +53,7 @@ void failOnError(OSStatus status, const char* error) { CFStringGetLength(str.get()), kCFStringEncodingUTF8) + 1); - CFStringGetCString(str.get(), &msg.data()[offset], msg.size() - offset, kCFStringEncodingUTF8); + CFStringGetCString(str.get(), &msg[offset], msg.size() - offset, kCFStringEncodingUTF8); msg.resize(strlen(msg.data())); throw std::runtime_error(msg); }