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@gmail.com>2018-05-13 15:10:05 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-13 15:48:55 +0300
commit7a2e271e5439d1888b21e4dafe782027f6ef0f77 (patch)
tree81b5981478350b28c49f12d390c7de5ca0a42907 /source/blender/render
parent3469e623d3174ff4e82c430478640dfacd0e63ff (diff)
Fix compiler warnings.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/pointdensity.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index a6350e3c448..51eaba3a054 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -634,9 +634,6 @@ static int pointdensity(PointDensity *pd,
texres->tin = 0.0f;
- if ((!pd) || (!pd->point_tree))
- return 0;
-
init_pointdensityrangedata(pd, &pdr, &density, vec, &age, col,
(pd->flag & TEX_PD_FALLOFF_CURVE ? pd->falloff_curve : NULL),
pd->falloff_speed_scale * 0.001f);
@@ -694,9 +691,9 @@ static int pointdensity(PointDensity *pd,
return retval;
}
-static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, const float vec[3], const float col[3])
+static void pointdensity_color(PointDensity *pd, TexResult *texres, float age, const float vec[3], const float col[3])
{
- int retval = TEX_RGB;
+ texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
if (pd->source == TEX_PD_PSYS) {
float rgba[4];
@@ -733,8 +730,6 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
break;
case TEX_PD_COLOR_CONSTANT:
default:
- texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
- retval = TEX_INT;
break;
}
}
@@ -765,13 +760,9 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
break;
case TEX_PD_COLOR_CONSTANT:
default:
- texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
- retval = TEX_INT;
break;
}
}
-
- return retval;
}
static void sample_dummy_point_density(int resolution, float *values)
@@ -920,6 +911,10 @@ static void point_density_sample_func(
PointDensity *pd = data->pd;
float *values = data->values;
+ if (!pd || !pd->point_tree) {
+ return;
+ }
+
size_t z = (size_t)iter;
for (size_t y = 0; y < resolution; ++y) {
for (size_t x = 0; x < resolution; ++x) {