petits [[nodiscard]] pour le fun
All checks were successful
Linux arm64 / Build (push) Successful in 12m30s

This commit is contained in:
2025-06-19 22:31:41 +02:00
parent 34d781fcfe
commit 8342bf3969
6 changed files with 38 additions and 23 deletions

View File

@@ -18,21 +18,21 @@ class PiecesFiles {
/**
* Generate a file containing all the pieces of the specified size
* @return If the file could be created
* @return If the pieces are saved correctly
*/
bool savePieces(int polyominoSize) const;
[[nodiscard]] bool savePieces(int polyominoSize) const;
/**
* Generate a file containing all the pieces of the specified size, assuming they have been correctly generated
* @return If the file could be created
* @return If the piece are saved correctly
*/
bool savePieces(int polyominoSize, std::vector<Polyomino>& polyominoes) const;
[[nodiscard]] bool savePieces(int polyominoSize, std::vector<Polyomino>& polyominoes) const;
/**
* Replace the content of the vectors by the pieces of the specified size, if the file wasn't found the vectors stays untouched
* @return If the file was found
* Replace the content of the vectors by the pieces of the specified size, if the pieces can't be loaded correctly the vectors stays untouched
* @return If the pieces could be loaded correctly
*/
bool loadPieces(int polyominoSize, std::vector<Piece>& pieces, std::vector<int>& convexPieces, std::vector<int>& holelessPieces, std::vector<int>& otherPieces) const;
[[nodiscard]] bool loadPieces(int polyominoSize, std::vector<Piece>& pieces, std::vector<int>& convexPieces, std::vector<int>& holelessPieces, std::vector<int>& otherPieces) const;
/**
* Puts the path to the piece file of the specified size in order, if the data folder wasn't found the string stays untouched