From 3d3ab8b86ac556823ba6ed0db11c605f9d526347 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Sun, 6 Apr 2014 08:50:31 +0100 Subject: [PATCH 1/2] Whistle: Replace const declarations with typedefs --- src/Whistle.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Whistle.cpp b/src/Whistle.cpp index 72ad2cc..edadc3c 100644 --- a/src/Whistle.cpp +++ b/src/Whistle.cpp @@ -26,12 +26,15 @@ const int CAN_RADIUS = 100; const int PEA_RADIUS = 30; const int BUMP_RADIUS = 5; -const StkFloat NORM_CAN_LOSS = 0.97; -const StkFloat SLOW_CAN_LOSS = 0.90; +typedef StkFloat WhistleCanLoss; +WhistleCanLoss NORM_CAN_LOSS = 0.97; +WhistleCanLoss SLOW_CAN_LOSS = 0.90; + const StkFloat GRAVITY = 20.0; -const StkFloat NORM_TICK_SIZE = 0.004; -const StkFloat SLOW_TICK_SIZE = 0.0001; +typedef StkFloat WhistleTickSize; +WhistleTickSize NORM_TICK_SIZE = 0.004; +WhistleTickSize SLOW_TICK_SIZE = 0.0001; const StkFloat ENV_RATE = 0.001; From 3d9bb4051bcba5f398e22352de3f6117fca77416 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Fri, 11 Apr 2014 23:44:46 +0200 Subject: [PATCH 2/2] Whistle.cpp: Comment out unused variables --- src/Whistle.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Whistle.cpp b/src/Whistle.cpp index edadc3c..fb6aca5 100644 --- a/src/Whistle.cpp +++ b/src/Whistle.cpp @@ -26,15 +26,12 @@ const int CAN_RADIUS = 100; const int PEA_RADIUS = 30; const int BUMP_RADIUS = 5; -typedef StkFloat WhistleCanLoss; -WhistleCanLoss NORM_CAN_LOSS = 0.97; -WhistleCanLoss SLOW_CAN_LOSS = 0.90; - +const StkFloat NORM_CAN_LOSS = 0.97; +//const StkFloat SLOW_CAN_LOSS = 0.90; const StkFloat GRAVITY = 20.0; -typedef StkFloat WhistleTickSize; -WhistleTickSize NORM_TICK_SIZE = 0.004; -WhistleTickSize SLOW_TICK_SIZE = 0.0001; +const StkFloat NORM_TICK_SIZE = 0.004; +//const StkFloat SLOW_TICK_SIZE = 0.0001; const StkFloat ENV_RATE = 0.001;