diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-20 23:42:17 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-20 23:42:17 (GMT) |
| commit | fa201a7aeb6c645801a11a115ef6baeed9edf1e5 (patch) | |
| tree | 616a98dddd3b6f93dd6580f762298690c320b3bf /src/simulation/Air.cpp | |
| parent | 6a331fdaf848ce82adc930ad24ac15c5259d2262 (diff) | |
| download | powder-fa201a7aeb6c645801a11a115ef6baeed9edf1e5.zip powder-fa201a7aeb6c645801a11a115ef6baeed9edf1e5.tar.gz | |
Fix some uninitialised variables
Diffstat (limited to 'src/simulation/Air.cpp')
| -rw-r--r-- | src/simulation/Air.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index b3826ab..3c88e91 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -117,8 +117,8 @@ void Air::update_airh(void) void Air::update_air(void) { - int x, y, i, j; - float dp, dx, dy, f, tx, ty; + int x = 0, y = 0, i = 0, j = 0; + float dp = 0.0f, dx = 0.0f, dy = 0.0f, f = 0.0f, tx = 0.0f, ty = 0.0f; for (y=0; y<YRES/CELL; y++) for (x=0; x<XRES/CELL; x++) @@ -294,7 +294,8 @@ void Air::update_air(void) memcpy(pv, opv, sizeof(pv)); } } -Air::Air() +Air::Air(): + airMode(0) { //Simulation should do this. make_kernel(); |
