Hey, I noticed I introduced a bug in PR #113 . Specifically, the pointer returned by return &citytiles.back(); can become invalid if you add a bunch more citytiles to a city, and vector has to resize the underlying memory. The fix is to lookup the memory addresses after the vector is done being modified.
Let me know if there's anything you'd like me to change.
To test this PR, I manually added some assertions. Is there a place for automated API tests, or are we sticking to manual testing for now?
Hey, I noticed I introduced a bug in PR #113 . Specifically, the pointer returned by
return &citytiles.back();
can become invalid if you add a bunch more citytiles to a city, and vector has to resize the underlying memory. The fix is to lookup the memory addresses after the vector is done being modified.Let me know if there's anything you'd like me to change.