Skip to content

v0.6.1

Choose a tag to compare

@Segfaultd Segfaultd released this 02 Jun 18:48
· 32 commits to master since this release

ReplicaManager3: const-qualify GetReplicaAtIndex

GetReplicaAtIndex was the only one of the four ReplicaManager3 read accessors that was non-const, even though its sibling GetConnectionAtIndex (same pattern, returns an internal pointer by index) is const. This forced const methods on derived managers to const_cast away constness just to iterate replicas.

Replica3 *GetReplicaAtIndex(unsigned index, WorldId worldId=0) const;

The method only reads the world's replica list and returns an existing pointer — no mutation — so the const qualifier is accurate. The returned Replica3* stays non-const, consistent with GetConnectionAtIndex returning a non-const Connection_RM3* from a const method.

Compatibility: Source-compatible — adding const to a read accessor doesn't break existing non-const call sites, and lets const iterators drop their const_cast. No ABI-sensitive layout change.

Closes #8 (via #9).

Full Changelog: v0.6.0...v0.6.1