Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to understand how it is desirable to improve the code of the tools that do not directly depend on the engine code, or at least wrapper code that does not touch the engine code itself.
A proposal is also made for documenting and log the changes as can be seen in the file.
These changes are not compatible with VC6.
This PR updates the
assetcull
tool to use modern C++ features, improving both performance and code readability. The key changes include:Replaced
findfirst
andfindnext
withstd::filesystem
: Transitioned to a more modern, cross-platform way of handling directory iteration, making the code more maintainable and compatible with different operating systems.Switched from
fopen
tostd::ifstream
: Improved file reading by usingstd::ifstream
, which is safer and more efficient for binary file comparisons.Changed from fixed-size buffers (16384 bytes) to iterators: Refactored the code to use iterators instead of hard-coded buffers, leading to cleaner and more efficient file comparison.
Permissions handling with
std::filesystem::permissions
: Enhanced the code to ensure proper file permissions before attempting deletion, preventing errors related to file access restrictions.Code readability improvements: Made the code easier to read and maintain by using
std::string
and range-basedfor
loops where appropriate.Bug Fixes:
Other Improvements: