Skip to content

Conversation

Godzilla675
Copy link

This pull request refactors internal string parsing logic in the Enchantum library to improve code clarity and maintainability across all supported compilers (Clang, GCC, and MSVC). The main changes involve introducing named constants for skip lengths after commas, and simplifying string copying logic in data structures. These changes are applied consistently in both the main library and the single-header distribution.

String parsing and copying improvements:

  • Introduced named constants (skip_after_comma, skip_comma) to replace repeated inline expressions for skipping over commas in string parsing logic, making the code clearer and reducing the risk of mistakes. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

  • Refactored string copying in data structures to use a source pointer (src_string) and a single for-loop with an explicit size variable, improving readability and consistency. [1] [2] [3] [4]

These changes are mirrored in the single-header version to ensure consistency between the header-only and multi-file builds.

Copilot AI and others added 4 commits October 12, 2025 23:23
Co-authored-by: Godzilla675 <131464726+Godzilla675@users.noreply.github.com>
Co-authored-by: Godzilla675 <131464726+Godzilla675@users.noreply.github.com>
…le-speed

Optimize compile-time performance with loop constant hoisting and improved memory access patterns
@ZXShady
Copy link
Owner

ZXShady commented Oct 16, 2025

I am not a fan of this

@Godzilla675
Copy link
Author

Why

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