You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
} elseif (isdigit(i)) {
^
!= 0
/home/runner/work/chessengine/chessengine/src/board.cpp:120:25: warning: 64 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
board_position.resize(64);
^
/home/runner/work/chessengine/chessengine/src/board.cpp:128:29: warning: 64 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
size_t current_square = 64 - rank * 8 + file - 8;
^
/home/runner/work/chessengine/chessengine/src/board.cpp:128:41: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
size_t current_square = 64 - rank * 8 + file - 8;
^
/home/runner/work/chessengine/chessengine/src/board.cpp:128:52: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
size_t current_square = 64 - rank * 8 + file - 8;
^
/home/runner/work/chessengine/chessengine/src/board.cpp:131:44: warning: 32 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
board_position.at(current_square) += 32; // convert to lowercase
^
/home/runner/work/chessengine/chessengine/src/board.cpp:135:26: warning: 64 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
for (size_t i = 0; i < 64; i++) {
^
/home/runner/work/chessengine/chessengine/src/board.cpp:137:19: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
if ((i + 1) % 8 == 0) {
^
#include"player.cpp"
^
/home/runner/work/chessengine/chessengine/src/main.cpp:2:11: note: did you mean to include 'player.hpp'?
/home/runner/work/chessengine/chessengine/src/main.cpp:6:27: warning: 1500.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
Player player1{"White", 1500.0, 'w'};
^
/home/runner/work/chessengine/chessengine/src/main.cpp:7:27: warning: 1600.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
Player player2{"Black", 1600.0, 'b'};
^
class 'Piece' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator
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.
What does this PR do?
Reduce compiler warnings by implementing recs
Fixes #<issue_number>
Before submitting
PR review
Reviewer checklist