Closed stevewgr closed 1 week ago
Build passing: https://github.com/ko4life-net/ko/actions/runs/11790164397/job/32840149101
Also worth mentioning that build time almost reduced by 2 minutes 🤯 🎉 🚀
You're an antworker.
Build passing: https://github.com/ko4life-net/ko/actions/runs/11807325401
Merging.
Description
This pull request introduces a series of codebase improvements to enhance clarity, portability, and maintainability. Key changes include namespace renaming, function refactoring, unused code removal, and consistency adjustments.
Details
Namespace Renaming: Renamed the
N3
namespace ton3std
to emphasize its role as a utility namespace for standardizing the codebase, akin to thestd
namespace.Function Refactoring: Refactored and relocated
GetProgPath
andLogFileWrite
toN3Utils.h
. This centralization reduces code duplication and ensures compatibility across all platforms.Redundant Code Removal: Removed unused and redundant code from the Launcher, which included a custom button control that was never used. Additionally, removed an unused Windows-based
ShellTree
implementation to streamline the codebase.Improved Dialog Functionality: Replaced the custom
DlgBrowsePath
dialog withCFolderPickerDialog
. The previous implementation had limitations with deeply nested folders and lacked path copy-paste functionality. UsingCFolderPickerDialog
offers a modern, user-friendly folder selection approach, leveraging Windows Explorer’s capabilities.Memory Allocation Warning Fix: Fixed warnings associated with large stack buffers by replacing
char buff[size]
withstd::vector<char>
. This change enables dynamic memory allocation for large buffers, specifically in multi-file selection dialogs, using a 512 KB buffer to support long file paths.Consistent Header Includes: Standardized header includes to improve portability and consistency. This involved addressing inconsistent casing and correcting system headers to use angle brackets (
<>
) instead of quotes (""
). Future enhancements may involve integrating tools like clang-tidy or include-what-you-use (iwyu) for further consistency.Benefits
These updates enhance the overall quality of the codebase by improving portability, reducing redundancy, ensuring compatibility, and simplifying functionality. They lay the groundwork for a more standardized, maintainable, and user-friendly application.