Skip to content

📝 Add docstrings to 52-unneeded-parameters-in-function#56

Closed
coderabbitai[bot] wants to merge 2 commits into52-unneeded-parameters-in-functionfrom
coderabbitai/docstrings/83f92f6
Closed

📝 Add docstrings to 52-unneeded-parameters-in-function#56
coderabbitai[bot] wants to merge 2 commits into52-unneeded-parameters-in-functionfrom
coderabbitai/docstrings/83f92f6

Conversation

@coderabbitai
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot commented Apr 30, 2026

Docstrings generation was requested by @winapiadmin.

The following files were modified:

  • moves_io.cpp
  • position.h
  • tests.cpp
  • types.h
These file types are not supported
  • CMakeLists.txt
ℹ️ Note

CodeRabbit cannot perform edits on its own pull requests yet.

Docstrings generation was requested by @winapiadmin.

* #55 (comment)

The following files were modified:

* `moves_io.cpp`
* `position.h`
* `tests.cpp`
* `types.h`
@coderabbitai
Copy link
Copy Markdown
Author

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

This 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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c76f590e-f0ea-495f-a614-34cea6bdec9a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot mentioned this pull request Apr 30, 2026
Comment thread types.h
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).
*/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).
*/

Comment thread types.h
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.
*/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
*/

@winapiadmin winapiadmin deleted the coderabbitai/docstrings/83f92f6 branch April 30, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants