From 06697af081d8724a02fa89a1bf6b11da100b6598 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Mon, 5 Aug 2024 13:19:13 -0400 Subject: [PATCH] Cleanup return --- src/c_bindings/c_wrapper.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/c_bindings/c_wrapper.cpp b/src/c_bindings/c_wrapper.cpp index d44518ab..c9ce08a3 100644 --- a/src/c_bindings/c_wrapper.cpp +++ b/src/c_bindings/c_wrapper.cpp @@ -28,12 +28,9 @@ extern "C" { uint8_t* resultData = new uint8_t[result.size()]; std::copy(result.begin(), result.end(), resultData); - // Create and return a ByteArray struct - ByteArray resultArray = { resultData, result.size() }; - return resultArray; + return ByteArray { resultData, result.size() }; } catch (const runtime_error& e) { - ByteArray resultArray = { nullptr, 0 }; - return resultArray; + return ByteArray { nullptr, 0 }; } }