Skip to content

Commit b8ad898

Browse files
authored
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.
1 parent d070709 commit b8ad898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/certs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void failOnError(OSStatus status, const char* error) {
5353
CFStringGetLength(str.get()),
5454
kCFStringEncodingUTF8) +
5555
1);
56-
CFStringGetCString(str.get(), &msg.data()[offset], msg.size() - offset, kCFStringEncodingUTF8);
56+
CFStringGetCString(str.get(), &msg[offset], msg.size() - offset, kCFStringEncodingUTF8);
5757
msg.resize(strlen(msg.data()));
5858
throw std::runtime_error(msg);
5959
}

0 commit comments

Comments
 (0)