📝 Add docstrings to 52-unneeded-parameters-in-function#56
Closed
coderabbitai[bot] wants to merge 2 commits into52-unneeded-parameters-in-functionfrom
Closed
📝 Add docstrings to 52-unneeded-parameters-in-function#56coderabbitai[bot] wants to merge 2 commits into52-unneeded-parameters-in-functionfrom
52-unneeded-parameters-in-function#56coderabbitai[bot] wants to merge 2 commits into52-unneeded-parameters-in-functionfrom
Conversation
Docstrings generation was requested by @winapiadmin. * #55 (comment) The following files were modified: * `moves_io.cpp` * `position.h` * `tests.cpp` * `types.h`
Author
|
Important Review skippedThis PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Open
winapiadmin
reviewed
Apr 30, 2026
Comment on lines
+232
to
+317
| /** | ||
| * Map a PolyglotPiece encoding to its PieceType. | ||
| * @param p PolyglotPiece value to convert. | ||
| * @returns `NO_PIECE_TYPE` if `p` is `NO_PIECE`, otherwise the corresponding `PieceType`. | ||
| */ | ||
| /** | ||
| * Map an EnginePiece encoding to its PieceType. | ||
| * @param p EnginePiece value to convert. | ||
| * @returns `NO_PIECE_TYPE` if `p` is `NO_PIECE`, otherwise the corresponding `PieceType`. | ||
| */ | ||
| /** | ||
| * Map a ContiguousMappingPiece encoding to its PieceType. | ||
| * @param p ContiguousMappingPiece value to convert. | ||
| * @returns `NO_PIECE_TYPE` if `p` is `NO_PIECE`, otherwise the corresponding `PieceType`. | ||
| */ | ||
| /** | ||
| * Determine piece color from a PolyglotPiece encoding. | ||
| * @param pt PolyglotPiece value. | ||
| * @returns The `Color` (WHITE or BLACK) of `pt`. | ||
| */ | ||
| /** | ||
| * Determine piece color from an EnginePiece encoding. | ||
| * @param pt EnginePiece value. | ||
| * @returns The `Color` (WHITE or BLACK) of `pt`. | ||
| */ | ||
| /** | ||
| * Determine piece color from a ContiguousMappingPiece encoding. | ||
| * @param pt ContiguousMappingPiece value. | ||
| * @returns The `Color` (WHITE or BLACK) of `pt`. | ||
| */ | ||
| /** | ||
| * Construct an EnginePiece value from a PieceType and Color. | ||
| * @tparam T Must be `EnginePiece`. | ||
| * @param pt PieceType to encode. | ||
| * @param c Color of the piece. | ||
| * @returns EnginePiece encoding representing `pt` with color `c`. | ||
| */ | ||
| /** | ||
| * Construct a PolyglotPiece value from a PieceType and Color. | ||
| * @tparam T Must be `PolyglotPiece`. | ||
| * @param pt PieceType to encode. | ||
| * @param c Color of the piece. | ||
| * @returns PolyglotPiece encoding representing `pt` with color `c`. | ||
| */ | ||
| /** | ||
| * Construct a ContiguousMappingPiece value from a PieceType and Color. | ||
| * @tparam T Must be `ContiguousMappingPiece`. | ||
| * @param pt PieceType to encode. | ||
| * @param c Color of the piece. | ||
| * @returns ContiguousMappingPiece encoding representing `pt` with color `c`. | ||
| */ | ||
| /** | ||
| * Obtain the PieceType corresponding to a piece-encoding enum. | ||
| * @tparam T A piece-encoding enum type for which `is_piece_enum<T>::value` is true. | ||
| * @param p Piece-encoding enum value. | ||
| * @returns The corresponding `PieceType`. | ||
| */ | ||
| /** | ||
| * Mask castling rights to a single color. | ||
| * @param c Color whose castling rights to select. | ||
| * @param cr Castling rights mask to filter. | ||
| * @returns Only the bits of `cr` relevant to color `c`. | ||
| */ | ||
| /** | ||
| * Bitwise OR-assign for CastlingRights. | ||
| * @param a Left-hand side castling rights (updated in-place). | ||
| * @param b Right-hand side castling rights to OR. | ||
| * @returns Reference to `a` after OR assignment. | ||
| */ | ||
| /** | ||
| * Bitwise OR for CastlingRights. | ||
| * @param a First castling-rights operand. | ||
| * @param b Second castling-rights operand. | ||
| * @returns The bitwise OR of `a` and `b`. | ||
| */ | ||
| /** | ||
| * Bitwise AND-assign for CastlingRights. | ||
| * @param a Left-hand side castling rights (updated in-place). | ||
| * @param b Right-hand side castling rights to AND. | ||
| * @returns Reference to `a` after AND assignment. | ||
| */ | ||
| /** | ||
| * Bitwise complement restricted to castling-related bits. | ||
| * @param a CastlingRights value to invert. | ||
| * @returns The complement of `a` with respect to `ANY_CASTLING` (flips only castling bits). | ||
| */ |
Owner
There was a problem hiding this comment.
Suggested change
| /** | |
| * Map a PolyglotPiece encoding to its PieceType. | |
| * @param p PolyglotPiece value to convert. | |
| * @returns `NO_PIECE_TYPE` if `p` is `NO_PIECE`, otherwise the corresponding `PieceType`. | |
| */ | |
| /** | |
| * Map an EnginePiece encoding to its PieceType. | |
| * @param p EnginePiece value to convert. | |
| * @returns `NO_PIECE_TYPE` if `p` is `NO_PIECE`, otherwise the corresponding `PieceType`. | |
| */ | |
| /** | |
| * Map a ContiguousMappingPiece encoding to its PieceType. | |
| * @param p ContiguousMappingPiece value to convert. | |
| * @returns `NO_PIECE_TYPE` if `p` is `NO_PIECE`, otherwise the corresponding `PieceType`. | |
| */ | |
| /** | |
| * Determine piece color from a PolyglotPiece encoding. | |
| * @param pt PolyglotPiece value. | |
| * @returns The `Color` (WHITE or BLACK) of `pt`. | |
| */ | |
| /** | |
| * Determine piece color from an EnginePiece encoding. | |
| * @param pt EnginePiece value. | |
| * @returns The `Color` (WHITE or BLACK) of `pt`. | |
| */ | |
| /** | |
| * Determine piece color from a ContiguousMappingPiece encoding. | |
| * @param pt ContiguousMappingPiece value. | |
| * @returns The `Color` (WHITE or BLACK) of `pt`. | |
| */ | |
| /** | |
| * Construct an EnginePiece value from a PieceType and Color. | |
| * @tparam T Must be `EnginePiece`. | |
| * @param pt PieceType to encode. | |
| * @param c Color of the piece. | |
| * @returns EnginePiece encoding representing `pt` with color `c`. | |
| */ | |
| /** | |
| * Construct a PolyglotPiece value from a PieceType and Color. | |
| * @tparam T Must be `PolyglotPiece`. | |
| * @param pt PieceType to encode. | |
| * @param c Color of the piece. | |
| * @returns PolyglotPiece encoding representing `pt` with color `c`. | |
| */ | |
| /** | |
| * Construct a ContiguousMappingPiece value from a PieceType and Color. | |
| * @tparam T Must be `ContiguousMappingPiece`. | |
| * @param pt PieceType to encode. | |
| * @param c Color of the piece. | |
| * @returns ContiguousMappingPiece encoding representing `pt` with color `c`. | |
| */ | |
| /** | |
| * Obtain the PieceType corresponding to a piece-encoding enum. | |
| * @tparam T A piece-encoding enum type for which `is_piece_enum<T>::value` is true. | |
| * @param p Piece-encoding enum value. | |
| * @returns The corresponding `PieceType`. | |
| */ | |
| /** | |
| * Mask castling rights to a single color. | |
| * @param c Color whose castling rights to select. | |
| * @param cr Castling rights mask to filter. | |
| * @returns Only the bits of `cr` relevant to color `c`. | |
| */ | |
| /** | |
| * Bitwise OR-assign for CastlingRights. | |
| * @param a Left-hand side castling rights (updated in-place). | |
| * @param b Right-hand side castling rights to OR. | |
| * @returns Reference to `a` after OR assignment. | |
| */ | |
| /** | |
| * Bitwise OR for CastlingRights. | |
| * @param a First castling-rights operand. | |
| * @param b Second castling-rights operand. | |
| * @returns The bitwise OR of `a` and `b`. | |
| */ | |
| /** | |
| * Bitwise AND-assign for CastlingRights. | |
| * @param a Left-hand side castling rights (updated in-place). | |
| * @param b Right-hand side castling rights to AND. | |
| * @returns Reference to `a` after AND assignment. | |
| */ | |
| /** | |
| * Bitwise complement restricted to castling-related bits. | |
| * @param a CastlingRights value to invert. | |
| * @returns The complement of `a` with respect to `ANY_CASTLING` (flips only castling bits). | |
| */ |
winapiadmin
reviewed
Apr 30, 2026
Comment on lines
+334
to
+343
| /** | ||
| * Combine two castling-rights flags and store the result in the left-hand operand. | ||
| * | ||
| * Performs a bitwise OR of `a` and `b`, updates `a` with the combined castling flags, | ||
| * and returns a reference to the modified `a`. | ||
| * | ||
| * @param a Left-hand operand to be updated with the combined castling rights. | ||
| * @param b Right-hand operand whose flags are OR-ed into `a`. | ||
| * @returns Reference to `a` after it has been updated with the combined flags. | ||
| */ |
Owner
There was a problem hiding this comment.
Suggested change
| /** | |
| * Combine two castling-rights flags and store the result in the left-hand operand. | |
| * | |
| * Performs a bitwise OR of `a` and `b`, updates `a` with the combined castling flags, | |
| * and returns a reference to the modified `a`. | |
| * | |
| * @param a Left-hand operand to be updated with the combined castling rights. | |
| * @param b Right-hand operand whose flags are OR-ed into `a`. | |
| * @returns Reference to `a` after it has been updated with the combined flags. | |
| */ |
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.
Docstrings generation was requested by @winapiadmin.
The following files were modified:
moves_io.cppposition.htests.cpptypes.hThese file types are not supported
CMakeLists.txtℹ️ Note