Skip to content

Enhance Writer class with GetEndianness, improve type safety, and in-memory swaps - #4

Merged
lammmab merged 3 commits into
masterfrom
feat/get-endianness
Aug 29, 2026
Merged

Enhance Writer class with GetEndianness, improve type safety, and in-memory swaps#4
lammmab merged 3 commits into
masterfrom
feat/get-endianness

Conversation

@lammmab

@lammmab lammmab commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Introduces several improvements and fixes focused on code safety, maintainability, and API flexibility.

Changes

Build System and Code Safety Enhancements:

  • Added strict compiler warning flags for both MSVC and non-MSVC compilers in CMakeLists.txt to enforce higher code quality and catch more potential issues at compile time. These flags are applied to all main targets (processing, interface, esfa). [1] [2] [3]

API Improvements and Flexibility:

  • Added overloaded ParseAsset and ExportAsset methods to the Processor class, allowing direct parsing from and exporting to arbitrary streams, not just files. This increases flexibility for asset handling. [1] [2] [3] [4]

Type Safety and Consistency:

  • Updated the BitConverter methods to use size_t for offsets instead of int32_t, and replaced C-style casts with static_cast for improved type safety and clarity. Also made the floating-point conversion static assertions more accurate.
  • Updated Reader methods to use static_cast and reinterpret_cast for type conversions, and ensured consistent use of buffer sizes and types, reducing the risk of undefined behavior. [1] [2] [3] [4] [5] [6]

Minor Refactoring and Cleanups:

  • Added default initialization and constructors to AssetMeta for safer and more convenient usage.
  • Removed an unused member variable from FileStream for code cleanliness.
  • Added a GetEndianness method to Writer for symmetry with Reader.

@lammmab

lammmab commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator Author

merging. changes all look good

@lammmab
lammmab merged commit d698880 into master Aug 29, 2026
0 of 3 checks passed
@lammmab
lammmab deleted the feat/get-endianness branch August 29, 2026 14:47
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