summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-30 15:26:05 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-30 15:26:05 (GMT)
commit68a32aa37607333d3d9a4ddb202a73cc01993000 (patch)
tree378d0c20bbf77b95007d8508e04c0dd308b72b86 /src/game/GameController.cpp
parent70174bff47432a3b63335b8205623757361d3191 (diff)
downloadpowder-68a32aa37607333d3d9a4ddb202a73cc01993000.zip
powder-68a32aa37607333d3d9a4ddb202a73cc01993000.tar.gz
Pass points by value for drawing tools
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 0ed9cf0..a1c4965 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -401,7 +401,7 @@ void GameController::DrawFill(int toolSelection, ui::Point point)
activeTool->DrawFill(sim, cBrush, point);
}
-void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueue)
+void GameController::DrawPoints(int toolSelection, queue<ui::Point> & pointQueue)
{
Simulation * sim = gameModel->GetSimulation();
Tool * activeTool = gameModel->GetActiveTool(toolSelection);
@@ -413,7 +413,7 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu
{
while(!pointQueue.empty())
{
- delete pointQueue.front();
+ //delete pointQueue.front();
pointQueue.pop();
}
}
@@ -427,8 +427,8 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu
bool first = true;
while(!pointQueue.empty())
{
- ui::Point fPoint = *pointQueue.front();
- delete pointQueue.front();
+ ui::Point fPoint = pointQueue.front();
+ //delete pointQueue.front();
pointQueue.pop();
if(!first)
{