From 5ea6de69afcf11f2d2e59258cb055a5b1fdb5f82 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 1 Mar 2025 23:56:06 +0100 Subject: C++: Use `free()` instead of `delete` for C things --- src/Data.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Data.cpp') diff --git a/src/Data.cpp b/src/Data.cpp index a96fc50..b06a144 100644 --- a/src/Data.cpp +++ b/src/Data.cpp @@ -66,14 +66,10 @@ void Data::SetValue(const std::vector& buff) std::vector Data::GetValue() const { - char* buff = NULL; uint64_t length = 0; - plist_get_data_val(_node, &buff, &length); + const char* buff = plist_get_data_ptr(_node, &length); std::vector ret(buff, buff + length); - delete buff; return ret; } - - } // namespace PList -- cgit v1.1-32-gdbae