From 5410028906ce42008ec9ce9df673cba6b1db6e07 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Mon, 3 Aug 2015 20:33:22 +0200 Subject: [PATCH] Constify some things, no functional changes --- Aquaria/SchoolFish.cpp | 26 +++++++++++++------------- Aquaria/WorldMapRender.cpp | 2 -- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Aquaria/SchoolFish.cpp b/Aquaria/SchoolFish.cpp index 988e810..38005f6 100644 --- a/Aquaria/SchoolFish.cpp +++ b/Aquaria/SchoolFish.cpp @@ -23,19 +23,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Avatar.h" #include "../BBGE/AfterEffect.h" -float strengthSeparation = 1; -float strengthAlignment = 0.8; -float strengthAvoidance = 1; -float strengthCohesion = 0.5; - -float avoidanceDistance = 128; -float separationDistance = 128; -float minUrgency = 5;//0.05; -float maxUrgency = 10;//0.1; -float maxSpeed = 400; // 1 -float maxChange = maxSpeed*maxUrgency; - -float velocityScale = 1; +const float strengthSeparation = 1; +const float strengthAlignment = 0.8f; +const float strengthAvoidance = 1; +const float strengthCohesion = 0.5f; + +const float avoidanceDistance = 128; +const float separationDistance = 128; +const float minUrgency = 5;//0.05; +const float maxUrgency = 10;//0.1; +const float maxSpeed = 400; // 1 +const float maxChange = maxSpeed*maxUrgency; + +const float velocityScale = 1; SchoolFish::SchoolFish(const std::string &texname) : FlockEntity() diff --git a/Aquaria/WorldMapRender.cpp b/Aquaria/WorldMapRender.cpp index 44f92e1..30c9635 100644 --- a/Aquaria/WorldMapRender.cpp +++ b/Aquaria/WorldMapRender.cpp @@ -53,8 +53,6 @@ namespace WorldMapRenderNamespace std::vector tiles; - std::vector particles; - Quad *activeQuad=0, *lastActiveQuad=0, *originalActiveQuad=0; Quad *lastVisQuad=0, *visQuad=0; WorldMapTile *lastVisTile=0;