From 246b79a7a7fdeeee0a9b4b60893226a8770943e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Stoj=C5=A1in?= Date: Wed, 21 Aug 2024 23:41:55 +0200 Subject: [PATCH] Cleanup --- include/libevp/evp.hpp | 18 +++++++++--------- source/libevp/format/format_v2.cpp | 4 +--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/include/libevp/evp.hpp b/include/libevp/evp.hpp index 48e4832..f071247 100644 --- a/include/libevp/evp.hpp +++ b/include/libevp/evp.hpp @@ -45,7 +45,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok packed successfully; - * status == evp_result_status::error an error occurred during packing, message contains details; + * status == evp_result_status::failure an error occurred during packing, message contains details; */ LIBEVP_API evp_result pack(const dir_path_t& input_dir, const file_path_t& evp, evp_filter filter = evp_filter::none); @@ -58,7 +58,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok unpacked successfully; - * status == evp_result_status::error an error occurred during unpacking, message contains details; + * status == evp_result_status::failure an error occurred during unpacking, message contains details; */ LIBEVP_API evp_result unpack(const file_path_t& evp, const dir_path_t& output_dir); @@ -94,7 +94,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok all files successfully validated; - * status == evp_result_status::error an error occurred, message contains details; + * status == evp_result_status::failure an error occurred, message contains details; */ LIBEVP_API evp_result validate_files(const file_path_t& evp, std::vector* failed_fds = nullptr); @@ -106,7 +106,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok got files successfully; - * status == evp_result_status::error an error occurred, message contains details; + * status == evp_result_status::failure an error occurred, message contains details; */ LIBEVP_API evp_result get_files(const file_path_t& evp, std::vector& files); @@ -119,7 +119,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok unpacked successfully; - * status == evp_result_status::error an error occurred during unpacking, message contains details; + * status == evp_result_status::failure an error occurred during unpacking, message contains details; */ LIBEVP_API evp_result get_file(const file_path_t& evp, const evp_fd& fd, std::vector& buffer); @@ -132,7 +132,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok unpacked successfully; - * status == evp_result_status::error an error occurred during unpacking, message contains details; + * status == evp_result_status::failure an error occurred during unpacking, message contains details; */ LIBEVP_API evp_result get_file(const file_path_t& evp, const evp_fd& fd, std::stringstream& stream); @@ -145,7 +145,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok unpacked successfully; - * status == evp_result_status::error an error occurred during unpacking, message contains details; + * status == evp_result_status::failure an error occurred during unpacking, message contains details; */ LIBEVP_API evp_result get_file(const file_path_t& evp, const file_path_t& file, std::vector& buffer); @@ -158,7 +158,7 @@ namespace libevp { * * @returns evp_result * status == evp_result_status::ok unpacked successfully; - * status == evp_result_status::error an error occurred during unpacking, message contains details; + * status == evp_result_status::failure an error occurred during unpacking, message contains details; */ LIBEVP_API evp_result get_file(const file_path_t& evp, const file_path_t& file, std::stringstream& stream); @@ -172,4 +172,4 @@ namespace libevp { */ LIBEVP_API std::vector get_filtered_files(const dir_path_t& input, evp_filter filter); }; -} \ No newline at end of file +} diff --git a/source/libevp/format/format_v2.cpp b/source/libevp/format/format_v2.cpp index ea79111..1a7807b 100644 --- a/source/libevp/format/format_v2.cpp +++ b/source/libevp/format/format_v2.cpp @@ -175,8 +175,6 @@ void libevp::format::v2::format::read_file_desc_block(libevp::fstream_read& stre block->files.push_back(fd); } - - return; } void libevp::format::v2::format::read_file_data(libevp::fstream_read& stream, evp_fd& fd, data_read_cb_t cb) { @@ -287,7 +285,7 @@ void decode_block(uint8_t* block, uint32_t block_size) { uint32_t key[4] = {}; memcpy(key, &KEY, 16); - for (int i = 0; i < decode_size / 8; i++) { + for (uint32_t i = 0; i < decode_size / 8; i++) { TEA_decode(block + (i * 8), block + (i * 8), key); } }