Skip to content

Commit 93eafc4

Browse files
committed
Merge pull request #58 from Databean/removeWarnings
Fixed some G++ warnings
2 parents b43d3e2 + c6c6a38 commit 93eafc4

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

include/GameController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class GameController {
6363
ControlState popState();
6464
void storeClick(Coordinate clickCoordinate);
6565
Coordinate getLastClick();
66-
Coordinate getPastClick(int howLongAgo);
66+
Coordinate getPastClick(unsigned int howLongAgo);
6767
void clearClickHistory();
6868
bool hasClickHistory();
6969
int getClickHistorySize();

src/GameController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Coordinate GameController::getLastClick(){
109109
* Gets a click from param clicks ago
110110
* @ param an integer
111111
*/
112-
Coordinate GameController::getPastClick(int howLongAgo){
112+
Coordinate GameController::getPastClick(unsigned int howLongAgo){
113113
if (howLongAgo < clickHistory.size()){
114114
return clickHistory[clickHistory.size() - 1 - howLongAgo];
115115
}
@@ -473,7 +473,7 @@ bool GameController::handlePlayerClick(ScreenCoordinate coord, Player& player) {
473473
return handleCancelButtonEvent(coord);
474474
}
475475
}
476-
476+
return true;
477477
}
478478

479479
/**

tests/test_GameBoard.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,9 @@ TEST(GameBoardTest, updateLongestRoadPlayer){
328328
TEST(GameBoardTest, canRobberRob){
329329
GameBoard test_board({"tester1", "tester2"});
330330
Player& test_player1 = test_board.getPlayer(0);
331-
Player& test_player2 = test_board.getPlayer(1);
332-
333-
331+
334332
ASSERT_FALSE(test_board.canRobberRob(test_player1, Coordinate(0,1)));
335-
333+
336334
test_board.PlaceSettlement(Coordinate(0,0), test_player1);
337335
ASSERT_TRUE(test_board.canRobberRob(test_player1, Coordinate(0,1)));
338336
}

0 commit comments

Comments
 (0)