diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-14 12:23:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-14 12:23:57 +0400 |
commit | 3cfd933d947659c5b7abd8d8521b2ebff312dacc (patch) | |
tree | 783e133ea40372fc35b42c2c0617c6d5af835147 /source/blender | |
parent | a90b8ebe48a767b95b9c867518b9b60f9624a5d2 (diff) |
code cleanup: correct unsigned int in string formatting and use empty() checks for vectors.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/compositor/operations/COM_WriteBufferOperation.cpp | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/volume_precache.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp index cf462607936..c73cb3ae325 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp @@ -157,14 +157,14 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, this->getMemoryProxy()->getBuffer()->copyContentFrom(outputBuffer); // STEP 4 - while (clMemToCleanUp->size() > 0) { + while (!clMemToCleanUp->empty()) { cl_mem mem = clMemToCleanUp->front(); error = clReleaseMemObject(mem); if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); } clMemToCleanUp->pop_front(); } - while (clKernelsToCleanUp->size() > 0) { + while (!clKernelsToCleanUp->empty()) { cl_kernel kernel = clKernelsToCleanUp->front(); error = clReleaseKernel(kernel); if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); } diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 8a4022de104..71e4fd4efd5 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1555,7 +1555,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR } else if (prop->arraydimension && prop->totarraylength) { fprintf(f, "void %sget(PointerRNA *ptr, int values[%u]);\n", func, prop->totarraylength); - fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->totarraylength); + fprintf(f, "void %sset(PointerRNA *ptr, const int values[%u]);\n", func, prop->totarraylength); } else { fprintf(f, "void %sget(PointerRNA *ptr, int values[]);\n", func); @@ -1571,7 +1571,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR } else if (prop->arraydimension && prop->totarraylength) { fprintf(f, "void %sget(PointerRNA *ptr, float values[%u]);\n", func, prop->totarraylength); - fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->totarraylength); + fprintf(f, "void %sset(PointerRNA *ptr, const float values[%u]);\n", func, prop->totarraylength); } else { fprintf(f, "void %sget(PointerRNA *ptr, float values[]);\n", func); diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index 539422a96fb..e5e3aff573d 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -495,7 +495,7 @@ typedef struct VolPrecacheState { int totparts; } VolPrecacheState; -static void vol_precache_part(TaskPool *pool, void *taskdata, int threadid) +static void vol_precache_part(TaskPool *pool, void *taskdata, int UNUSED(threadid)) { VolPrecacheState *state = (VolPrecacheState *)BLI_task_pool_userdata(pool); VolPrecachePart *pa = (VolPrecachePart *)taskdata; |