feat: canonical type aliases over legacy RakNet names (#14)#32
Conversation
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).
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Closes #14.
What
Introduces a new header
Source/include/mafianet/aliases.hwith canonicalMafiaNetaliases over the existing RakNet-named public types, and pulls it into the umbrella header (mafianet.h). Behavior unchanged.RakPeerInterfacePeerInterfaceRakNetGUIDGuidRakNetStatisticsStatisticsUNASSIGNED_RAKNET_GUIDUnassignedGuidDesign
usingaliases (not subclasses): each canonical name denotes the exact same type as its legacy counterpart, so the two interoperate freely.UnassignedGuidis aninline const Guid&bound to the legacy sentinel, so it refers to the same object (&UnassignedGuid == &UNASSIGNED_RAKNET_GUID).[[deprecated]]pass is a separate later task.#includes the three sources it aliases, so it is self-contained.Verification
static_assert(std::is_same<...>)confirmsPeerInterface/Guid/Statisticsare identical types to their legacy counterparts.MafiaNet::PeerInterface::GetInstance()compiles (acceptance criterion chore(deps): update miniupnpc 2.2.8→2.3.3 & Opus 1.5.2→1.6.1 (+ test-suite fixes) #1).mafianet.hstill parses cleanly.All checked with
c++ -std=c++17.Acceptance criteria
MafiaNet::PeerInterface::GetInstance()compiles and is the same type asRakPeerInterface.