Skip to content

Commit

Permalink
chore: fix compilation pre-C++17 (#5)
Browse files Browse the repository at this point in the history
`.data()` returns `const char*` rather than `char*` before C++17.
It's also not needed in this particular case.
  • Loading branch information
addaleax authored Oct 30, 2024
1 parent d070709 commit b8ad898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/certs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b8ad898

Please sign in to comment.