Skip to content

fix(network): Move TransportMessageHeader to before it is used in NetworkDefs.h#2382

Merged
xezon merged 1 commit intoTheSuperHackers:mainfrom
Mauller:Mauller/fix-nonretail-networking
Mar 2, 2026
Merged

fix(network): Move TransportMessageHeader to before it is used in NetworkDefs.h#2382
xezon merged 1 commit intoTheSuperHackers:mainfrom
Mauller:Mauller/fix-nonretail-networking

Conversation

@Mauller
Copy link

@Mauller Mauller commented Mar 2, 2026

This PR fixes a compilation error due to the struct TransportMessageHeader being defined after code attempts to obtain it's size.

Moved TransportMessageHeader before the block of static varaibles where it is first used.

@Mauller Mauller self-assigned this Mar 2, 2026
@Mauller Mauller added Major Severity: Minor < Major < Critical < Blocker ThisProject The issue was introduced by this project, or this task is specific to this project NoRetail This fix or change is not applicable with Retail game compatibility labels Mar 2, 2026
@greptile-apps
Copy link

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Fixed compilation error by moving the TransportMessageHeader struct definition before its usage in sizeof() on line 77.

  • Relocated struct definition from after line 97 to after line 49, before the static constant declarations
  • The MAX_PACKET_SIZE constant calculation requires the complete struct definition to determine its size
  • No functional changes, only reordering of declarations to satisfy C++ forward declaration requirements

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Simple struct relocation to fix forward declaration order - no logic changes, no functional impact beyond fixing compilation
  • No files require special attention

Important Files Changed

Filename Overview
Core/GameEngine/Include/GameNetwork/NetworkDefs.h Moved TransportMessageHeader struct definition before sizeof() usage to fix compilation error

Last reviewed commit: f31ceca

@xezon xezon added CompileBug Bug at compile time and removed NoRetail This fix or change is not applicable with Retail game compatibility labels Mar 2, 2026
@xezon xezon changed the title fix(network): Moved TransportMessageHeader before it is used in NetworkDefs.h fix(network): Move TransportMessageHeader before it is used in NetworkDefs.h Mar 2, 2026
@xezon xezon added the Fix Is fixing something, but is not user facing label Mar 2, 2026
@xezon xezon changed the title fix(network): Move TransportMessageHeader before it is used in NetworkDefs.h fix(network): Move TransportMessageHeader to before it is used in NetworkDefs.h Mar 2, 2026
@xezon xezon merged commit 05af998 into TheSuperHackers:main Mar 2, 2026
26 checks passed
@xezon xezon deleted the Mauller/fix-nonretail-networking branch March 2, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CompileBug Bug at compile time Fix Is fixing something, but is not user facing Major Severity: Minor < Major < Critical < Blocker ThisProject The issue was introduced by this project, or this task is specific to this project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants