Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-27 01:58:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-27 01:58:06 +0400
commit4f3ca854e1e25d855c7c2b8f6458edd6aae385c5 (patch)
tree60f07ffa26286fcde603977b6482a10f92a0ad11 /intern/smoke
parent1927f446868e71c56e8032b4693004225ee5177d (diff)
Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
Diffstat (limited to 'intern/smoke')
-rw-r--r--intern/smoke/intern/FLUID_3D.h4
-rw-r--r--intern/smoke/intern/FLUID_3D_STATIC.cpp52
-rw-r--r--intern/smoke/intern/WTURBULENCE.h2
3 files changed, 31 insertions, 27 deletions
diff --git a/intern/smoke/intern/FLUID_3D.h b/intern/smoke/intern/FLUID_3D.h
index 8cadf3bc989..d98a39930de 100644
--- a/intern/smoke/intern/FLUID_3D.h
+++ b/intern/smoke/intern/FLUID_3D.h
@@ -41,9 +41,9 @@
using namespace std;
using namespace BasicVector;
-class WTURBULENCE;
+struct WTURBULENCE;
-class FLUID_3D
+struct FLUID_3D
{
public:
FLUID_3D(int *res, float dx, float dtdef, int init_heat, int init_fire, int init_colors);
diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp
index ac485ad983a..e0a31a9d0c1 100644
--- a/intern/smoke/intern/FLUID_3D_STATIC.cpp
+++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp
@@ -200,13 +200,15 @@ void FLUID_3D::setZeroZ(float* field, Vec3Int res, int zBegin, int zEnd)
const int totalCells = res[0] * res[1] * res[2];
int index = 0;
- if ((zBegin == 0))
- for (int y = 0; y < res[1]; y++)
- for (int x = 0; x < res[0]; x++, index++)
- {
- // front slab
- field[index] = 0.0f;
- }
+ if (zBegin == 0)
+ {
+ for (int y = 0; y < res[1]; y++)
+ for (int x = 0; x < res[0]; x++, index++)
+ {
+ // front slab
+ field[index] = 0.0f;
+ }
+ }
if (zEnd == res[2])
{
@@ -265,27 +267,29 @@ void FLUID_3D::copyBorderZ(float* field, Vec3Int res, int zBegin, int zEnd)
const int totalCells = res[0] * res[1] * res[2];
int index=0;
- if ((zBegin == 0))
- for (int y = 0; y < res[1]; y++)
- for (int x = 0; x < res[0]; x++, index++)
- {
- field[index] = field[index + slabSize];
- }
+ if (zBegin == 0)
+ {
+ for (int y = 0; y < res[1]; y++)
+ for (int x = 0; x < res[0]; x++, index++)
+ {
+ field[index] = field[index + slabSize];
+ }
+ }
- if ((zEnd == res[2]))
+ if (zEnd == res[2])
{
- index=0;
- int indexx=0;
- const int cellsslab = totalCells - slabSize;
+ index=0;
+ int indexx=0;
+ const int cellsslab = totalCells - slabSize;
- for (int y = 0; y < res[1]; y++)
- for (int x = 0; x < res[0]; x++, index++)
- {
- // back slab
- indexx = index + cellsslab;
- field[indexx] = field[indexx - slabSize];
- }
+ for (int y = 0; y < res[1]; y++)
+ for (int x = 0; x < res[0]; x++, index++)
+ {
+ // back slab
+ indexx = index + cellsslab;
+ field[indexx] = field[indexx - slabSize];
+ }
}
}
diff --git a/intern/smoke/intern/WTURBULENCE.h b/intern/smoke/intern/WTURBULENCE.h
index 1655bd95d32..4e76466bde5 100644
--- a/intern/smoke/intern/WTURBULENCE.h
+++ b/intern/smoke/intern/WTURBULENCE.h
@@ -32,7 +32,7 @@ class SIMPLE_PARSER;
///////////////////////////////////////////////////////////////////////////////
/// Main WTURBULENCE class, stores large density array etc.
///////////////////////////////////////////////////////////////////////////////
-class WTURBULENCE
+struct WTURBULENCE
{
public:
// both config files can be NULL, altCfg might override values from noiseCfg