Page MenuHomeWildfire Games

Switch range manager from unsigned integers to a proper data structure
Needs ReviewPublic

Authored by wraitii on Jun 4 2020, 9:40 AM.
This revision needs review, but there are no reviewers specified.



This is 'the' diff that enables D2667 down the line.

It replaces the various u16 and u32 with a proper data structure, quite similarly to @nani's playerData1b, but with a more generic structure.
It's designed to handle up to 64 bits right now, but the design should be transparently extendible (with some work) to an arbitrarily high number.

(On top of D2784)

Test Plan

Needs to be play tested, serialisation-tested, and most importantly perf-tested because this really relies on smart compilers.

Event Timeline

wraitii created this revision.Jun 4 2020, 9:40 AM
Owners added a subscriber: Restricted Owners Package.Jun 4 2020, 9:40 AM
Vulcan added a comment.Jun 4 2020, 9:42 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build:

Vulcan added a comment.Jun 4 2020, 9:47 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build:

Stan added a subscriber: Stan.Jun 4 2020, 9:58 AM

Makes the code more readable to me, but I can't tell if that's the right way ^^


Still accurate?


I wonder if something like boost doesn't provide such an array?

wraitii added inline comments.Jun 4 2020, 10:08 AM

Yup'. We're creating a custom version with ones everywhere so that other code can transparently use this.
TBH it's not a huge amount of memory...


Probably, but I'd rather not depend on boost.

I think ICU actually has a rather similar "EnumSet" class.