Merged
Conversation
Owner
Disservin
commented
Nov 21, 2025
- increase some datatypes from int to int64_t
- less nesting
- more readable MoveData
- assert
There was a problem hiding this comment.
Pull request overview
This PR refactors code for better readability and type safety by: (1) upgrading several integer types to int64_t to prevent overflow issues with large values like search depth, nodes, and scores; (2) removing the MoveData constructor in favor of default member initialization and explicit field assignment for clarity; and (3) reducing nested conditionals through early returns and inverted logic.
- Upgraded data types from int to int64_t for depth, seldepth, score, and hashfull fields
- Refactored MoveData from constructor-based to field-assignment initialization
- Reduced nesting by inverting conditionals and using early returns in multiple functions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/types/match_data.hpp | Removed MoveData constructor, changed int fields to int64_t, reordered members, updated MatchData constructor parameter to string_view |
| app/src/matchmaking/match/match.cpp | Replaced MoveData constructor calls with field assignment, updated findElement template parameter types, reduced nesting in verifyPvLines, added assert in convertChessReason |
| app/src/engine/uci_engine.hpp | Reduced nesting in setAffinity by inverting success check and using early return |
| app/src/engine/uci_engine.cpp | Updated findElement template parameters from int to int64_t, reduced nesting in lastScore |
| app/src/core/helper.hpp | Added int64_t template specialization to findElement function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.