Skip to content

Fix issues that break MSVC strict compilation#294

Open
oznogon wants to merge 1 commit intodaid:masterfrom
oznogon:fix-strict-compilation
Open

Fix issues that break MSVC strict compilation#294
oznogon wants to merge 1 commit intodaid:masterfrom
oznogon:fix-strict-compilation

Conversation

@oznogon
Copy link
Copy Markdown
Contributor

@oznogon oznogon commented Feb 19, 2026

The /permissive- flag that appears in CMakeLists.txt seems to be ignored, discarded, or no-op on MSVC builds. The resulting errors block compilation.

  • Add an explicit public default constructor to ComponentStorage to avoid no appropriate default constructor available errors
  • Explicitly define the static inline ComponentStorage member named storage, instead of only declaring it, to avoid use of undefined type 'sp::ecs::ComponentStorage<...>' errors
  • Use _WIN32 instead of WIN32 in preprocessor ifdefs; MSVC 18 doesn't appear to define WIN32
  • Explicitly instantiate multiplayerReplicationFunctions templates
  • Explicitly cast sparseset data to uint32_t

These changes should have no impact on non-MSVC builds, and would contribute toward unblocking MSVC as a compiler.

@oznogon oznogon force-pushed the fix-strict-compilation branch from 81c6783 to 50b63c6 Compare March 4, 2026 00:41
@oznogon oznogon force-pushed the fix-strict-compilation branch from 50b63c6 to 859a8ee Compare March 20, 2026 16:32
@oznogon oznogon force-pushed the fix-strict-compilation branch from 859a8ee to 2d6746e Compare March 30, 2026 15:12
- Add an explicit public default constructor to ComponentStorage
  to avoid "no appropriate default constructor available" errors
- Explicitly define the static inline ComponentStorage member
  named storage, instead of only declaring it, to avoid
  "use of undefined type 'sp::ecs::ComponentStorage<...>'" errors
- Use _WIN32 instead of WIN32 in preprocessor ifdefs; MSVC 18
  doesn't appear to define WIN32.
- Explicitly instantiate multiplayerReplicationFunctions templates.
@oznogon oznogon force-pushed the fix-strict-compilation branch from 2d6746e to 660f64c Compare April 13, 2026 14:59
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.

1 participant