Skip to content

feat: canonical type aliases over legacy RakNet names (#14)#32

Merged
Segfaultd merged 1 commit into
masterfrom
feature/canonical-type-aliases
Jun 15, 2026
Merged

feat: canonical type aliases over legacy RakNet names (#14)#32
Segfaultd merged 1 commit into
masterfrom
feature/canonical-type-aliases

Conversation

@Segfaultd

Copy link
Copy Markdown
Member

Closes #14.

What

Introduces a new header Source/include/mafianet/aliases.h with canonical MafiaNet aliases over the existing RakNet-named public types, and pulls it into the umbrella header (mafianet.h). Behavior unchanged.

Legacy Canonical
RakPeerInterface PeerInterface
RakNetGUID Guid
RakNetStatistics Statistics
UNASSIGNED_RAKNET_GUID UnassignedGuid

Design

  • using aliases (not subclasses): each canonical name denotes the exact same type as its legacy counterpart, so the two interoperate freely.
  • UnassignedGuid is an inline const Guid& bound to the legacy sentinel, so it refers to the same object (&UnassignedGuid == &UNASSIGNED_RAKNET_GUID).
  • Aliases only — no edits to the legacy declarations. Legacy names stay un-deprecated; a [[deprecated]] pass is a separate later task.
  • The new header #includes the three sources it aliases, so it is self-contained.

Verification

All checked with c++ -std=c++17.

Acceptance criteria

  • MafiaNet::PeerInterface::GetInstance() compiles and is the same type as RakPeerInterface.
  • Existing samples still build unchanged (additive header + one umbrella include; no legacy edits).

Add Source/include/mafianet/aliases.h introducing canonical MafiaNet
aliases over the existing RakNet-named public types:

  RakPeerInterface       -> PeerInterface
  RakNetGUID             -> Guid
  RakNetStatistics       -> Statistics
  UNASSIGNED_RAKNET_GUID -> UnassignedGuid

These are 'using' aliases (and a reference for the sentinel), so each
canonical name denotes the exact same type/object as its legacy
counterpart and the two interoperate freely. The legacy declarations are
left untouched and un-deprecated. The new header is pulled into the
umbrella header (mafianet.h).
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Segfaultd, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 46 minutes and 48 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6eaa33bd-f49f-4201-9594-b994f4004c9f

📥 Commits

Reviewing files that changed from the base of the PR and between fefaf15 and c879e42.

📒 Files selected for processing (2)
  • Source/include/mafianet/aliases.h
  • Source/include/mafianet/mafianet.h
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/canonical-type-aliases

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Segfaultd Segfaultd merged commit 3714c07 into master Jun 15, 2026
6 of 7 checks passed
@Segfaultd Segfaultd deleted the feature/canonical-type-aliases branch June 15, 2026 13:15
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.

[DX L0] Canonical type aliases over legacy RakNet names

1 participant