diff options
| author | Simon Robertshaw <simon@Simons-Mac-Pro.local> | 2012-04-26 12:10:47 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@Simons-Mac-Pro.local> | 2012-04-26 12:10:47 (GMT) |
| commit | bb8a3f76e3b558a63eab38ab15ebb71f9b5ac762 (patch) | |
| tree | ff63bd38df84018dc9843e5a5d26f5795b657735 /src/simulation | |
| parent | 9e4cd165eb66b27a42f8eb3aad1993be5178d825 (diff) | |
| download | powder-bb8a3f76e3b558a63eab38ab15ebb71f9b5ac762.zip powder-bb8a3f76e3b558a63eab38ab15ebb71f9b5ac762.tar.gz | |
OS X compiling working, Make it a bit more friendly with stricter compilers
Diffstat (limited to 'src/simulation')
| -rw-r--r-- | src/simulation/Element.h | 2 | ||||
| -rw-r--r-- | src/simulation/Simulation.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/simulation/Element.h b/src/simulation/Element.h index 449bf51..f00751e 100644 --- a/src/simulation/Element.h +++ b/src/simulation/Element.h @@ -2,7 +2,7 @@ #define ELEMENT_H // This header should be included by all files in src/elements/ -#include <math.h> +#include <cmath> #include "Simulation.h" #include "Renderer.h" #include "ElementFunctions.h" diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 9f435f0..0a69c7b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1,5 +1,5 @@ //#include <cstdlib> -#include <math.h> +#include <cmath> #include "Config.h" #include "Simulation.h" #include "Elements.h" @@ -3570,10 +3570,14 @@ Simulation::~Simulation() } Simulation::Simulation(): - sys_pause(0), - portal_rx({-1, 0, 1, 1, 1, 0,-1,-1}), - portal_ry({-1,-1,-1, 0, 1, 1, 1, 0}) + sys_pause(0) { + + int tportal_rx[] = {-1, 0, 1, 1, 1, 0,-1,-1}; + int tportal_ry[] = {-1,-1,-1, 0, 1, 1, 1, 0}; + + memcpy(portal_rx, tportal_rx, sizeof(tportal_rx)); + memcpy(portal_ry, tportal_ry, sizeof(tportal_ry)); //Create and attach gravity simulation grav = new Gravity(); |
