Skip to content

Commit

Permalink
Cleanup return
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Aug 5, 2024
1 parent b160860 commit 06697af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/c_bindings/c_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
}

Expand Down

0 comments on commit 06697af

Please sign in to comment.