Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the code a bit using more C++ facilities #5

Merged
merged 2 commits into from
Dec 15, 2024

Conversation

WallaceIT
Copy link
Contributor

Simplify the code a bit, mainly in error management during writing, using the try-catch and std::string facilities provided by C++.

Instead of using a C-style buffer, rely on std:string to host the
calculated sha256 hash and to compare it with the expected one.

Signed-off-by: Francesco Valla <[email protected]>
To avoid code duplication and have a simpler error path, use try-catch
instead of multiple return points.

Signed-off-by: Francesco Valla <[email protected]>
@embetrix embetrix merged commit 1525385 into embetrix:master Dec 15, 2024
2 checks passed
@embetrix
Copy link
Owner

@WallaceIT : thank you

@WallaceIT WallaceIT deleted the err_cleanup branch December 15, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants