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

Refactor codebase for clarity, portability, and consistency improvements. #256

Merged
merged 7 commits into from
Nov 13, 2024

Commits on Nov 12, 2024

  1. Rename N3 namespace to n3std for clarity and standardization.

    This change highlights that the namespace contains utility functions
    intended to standardize the codebase, similar to the `std` namespace.
    stevewgr committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    95b0190 View commit details
    Browse the repository at this point in the history
  2. Refactor and relocate GetProgPath and LogFileWrite to N3Utils.h.

    Centralized these functions to reduce code duplication across the
    project. The refactored implementation ensures compatibility across all
    platforms.
    stevewgr committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    ec0ec98 View commit details
    Browse the repository at this point in the history
  3. Remove redundant unused code from Launcher.

    Seems like they copied this code from somewhere to use it as a custom
    button control for the Launcher but it was never used. Hence there is no
    reason to maintain this anymore.
    stevewgr committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    0e0dcef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6622068 View commit details
    Browse the repository at this point in the history
  5. Replace custom DlgBrowsePath implementation with CFolderPickerDialog.

    The previous DlgBrowsePath dialog stored recent paths by updating
    registry values but was difficult to use for deeply nested folders and
    lacked copy-paste support for paths.
    
    Switching to CFolderPickerDialog leverages Windows Explorer’s modern
    file dialog, simplifying path selection. This update provides a more
    user-friendly and modern approach, available in VS12 / MFC11 and later.
    stevewgr committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    c85184a View commit details
    Browse the repository at this point in the history
  6. Fix warnings by replacing large stack buffers with dynamic allocation.

    Replaced `char buff[size]` with `std::vector<char>`, enabling dynamic
    memory allocation for large buffers used in multi-file selection dialogs
    via `dlg.m_ofn.lpstrFile`.
    
    A 512 KB buffer size is used, which should accommodate even very long
    file paths.
    stevewgr committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    aa8cf34 View commit details
    Browse the repository at this point in the history
  7. Fix inconsistent header includes for better portability and consistency.

    Standardized header includes to address inconsistencies in case usage
    (some were lower-case, others upper-case), which impacts portability
    across platforms.
    
    Also corrected cases where system headers were included with quotes ("")
    instead of angle brackets (<>).
    
    Long-term, this issue could be further addressed by integrating tools
    like clang-tidy or include-what-you-use (iwyu).
    stevewgr committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    dc0412d View commit details
    Browse the repository at this point in the history