Tighten lambda captures, make small rendering and stats refactors, and improve safety, const-correctness, and debug-only checks across map, UI, OpenGL, and storage code. - #505
Merged
Conversation
Reviewer's GuideRefactors numerous lambdas and small helpers across the codebase to capture only what they use, improve const‑correctness and static storage, replace custom/hand‑rolled utilities with library functions (e.g., glm::lerp), and introduces a small stats struct in World::printStats for better encapsulation, while keeping behaviour essentially unchanged. Class diagram for new Stats struct used in World::printStatsclassDiagram
class World {
+void printStats(ProgressCounter pc, AnsiOstream os) const
}
class Stats {
+size_t numMissingName
+size_t numMissingDesc
+size_t numMissingBoth
+size_t numMissingArea
+size_t numMissingServerId
+size_t numWithNoConnections
+size_t numWithNoExits
+size_t numWithNoEntrances
+size_t numExits
+size_t numDoors
+size_t numHidden
+size_t numDoorNames
+size_t numHiddenDoorNames
+size_t numLoopExits
+size_t numConnections
+size_t numMultipleOut
+size_t numMultipleIn
+size_t adj1
+size_t adj2
+size_t non1
+size_t non2
+size_t loop1
+size_t loop2
+void print(AnsiOstream aos) const
}
World ..> Stats : uses in printStats
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #505 +/- ##
=======================================
Coverage 25.09% 25.10%
=======================================
Files 511 511
Lines 42313 42286 -27
Branches 4575 4574 -1
=======================================
- Hits 10618 10615 -3
+ Misses 31695 31671 -24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Tighten lambda captures, make small rendering and stats refactors, and improve safety, const-correctness, and debug-only checks across map, UI, OpenGL, and storage code.
Bug Fixes:
Enhancements: