diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-01 13:54:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-01 13:54:00 +0400 |
commit | f213ae0b19e55a5a17216dea4c4769ca6d7a0a38 (patch) | |
tree | b5d895595d3f83b28097b20695fbc5630df6bd84 /source/blender | |
parent | bd574fe2a265538efa80ff3eb1c8606be4f3629c (diff) |
style cleanup
Diffstat (limited to 'source/blender')
31 files changed, 69 insertions, 70 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index a7b53370d1d..5b211d7f09a 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -304,7 +304,7 @@ void BKE_object_free(Object *ob) if (ob->data) { ID *id = ob->data; id->us--; - if (id->us == 0 && id->lib==NULL) { + if (id->us == 0 && id->lib == NULL) { switch (ob->type) { case OB_MESH: BKE_mesh_unlink((Mesh *)id); diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 46836b1f8d1..84e1f29f6c0 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -259,7 +259,7 @@ static struct bUnitCollection buNaturalTimeCollecton = {buNaturalTimeDef, 3, 0, static struct bUnitDef buNaturalRotDef[] = { - {"degree", "degrees", "°", NULL, "Degrees", M_PI/180.0, 0.0, B_UNIT_DEF_NONE}, + {"degree", "degrees", "°", NULL, "Degrees", M_PI / 180.0, 0.0, B_UNIT_DEF_NONE}, // {"radian", "radians", "r", NULL, "Radians", 1.0, 0.0, B_UNIT_DEF_NONE}, // {"turn", "turns", "t", NULL, "Turns", 1.0/(M_PI*2.0), 0.0,B_UNIT_DEF_NONE}, {NULL, NULL, NULL, NULL, NULL, 0.0, 0.0} diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index fe91f91320a..70617453eff 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1104,7 +1104,9 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int if (!tree_overlap(tree1->nodes[tree1->totleaf], tree2->nodes[tree2->totleaf], min_axis(tree1->start_axis, tree2->start_axis), min_axis(tree1->stop_axis, tree2->stop_axis))) + { return NULL; + } data = MEM_callocN(sizeof(BVHOverlapData *) * tree1->tree_type, "BVHOverlapData_star"); diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 124624ca137..fb33d7ce127 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -301,8 +301,8 @@ static float newPerlin(float x, float y, float z) u = npfade(x); /* COMPUTE FADE CURVES */ v = npfade(y); /* FOR EACH OF X,Y,Z. */ w = npfade(z); - A = hash[X ]+Y; AA = hash[A]+Z; AB = hash[A+1]+Z; /* HASH COORDINATES OF */ - B = hash[X+1]+Y; BA = hash[B]+Z; BB = hash[B+1]+Z; /* THE 8 CUBE CORNERS, */ + A = hash[X ] + Y; AA = hash[A] + Z; AB = hash[A + 1] + Z; /* HASH COORDINATES OF */ + B = hash[X + 1] + Y; BA = hash[B] + Z; BB = hash[B + 1] + Z; /* THE 8 CUBE CORNERS, */ return lerp(w, lerp(v, lerp(u, grad(hash[AA ], x, y, z ), /* AND ADD */ grad(hash[BA ], x - 1, y, z )), /* BLENDED */ lerp(u, grad(hash[AB ], x, y - 1, z ), /* RESULTS */ diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c index 1d93fe1be25..df03e50d2c4 100644 --- a/source/blender/bmesh/operators/bmo_similar.c +++ b/source/blender/bmesh/operators/bmo_similar.c @@ -20,7 +20,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/bmesh/operators/bmo_select_similar.c +/** \file blender/bmesh/operators/bmo_similar.c * \ingroup bmesh * * bmesh operators to select based on diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index 519a8184768..5223de99ca2 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -204,7 +204,8 @@ static void init_laplacian_matrix(LaplacianSystem * sys) sys->eweights[i] = w1; sys->vlengths[idv1] += w1; sys->vlengths[idv2] += w1; - }else{ + } + else { sys->zerola[idv1] = 1; sys->zerola[idv2] = 1; } @@ -568,16 +569,16 @@ void bmo_smooth_laplacian_vert_exec(BMesh *bm, BMOperator *op) nlSolverParameteri(NL_NB_ROWS, bm->totvert); nlSolverParameteri(NL_NB_RIGHT_HAND_SIDES, 3); - nlBegin(NL_SYSTEM); - for (i=0; i < bm->totvert; i++) { + nlBegin(NL_SYSTEM); + for (i = 0; i < bm->totvert; i++) { nlLockVariable(i); } BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) { m_vertex_id = BM_elem_index_get(v); nlUnlockVariable(m_vertex_id); - nlSetVariable(0,m_vertex_id, v->co[0]); - nlSetVariable(1,m_vertex_id, v->co[1]); - nlSetVariable(2,m_vertex_id, v->co[2]); + nlSetVariable(0, m_vertex_id, v->co[0]); + nlSetVariable(1, m_vertex_id, v->co[1]); + nlSetVariable(2, m_vertex_id, v->co[2]); } nlBegin(NL_MATRIX); diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp index bdbe21f82ea..357a4c1d4c0 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp +++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp @@ -160,7 +160,7 @@ void MemoryBuffer::writePixel(int x, int y, const float color[4]) if (x >= this->m_rect.xmin && x < this->m_rect.xmax && y >= this->m_rect.ymin && y < this->m_rect.ymax) { - const int offset = (this->m_chunkWidth * (y-this->m_rect.ymin) + x-this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS; + const int offset = (this->m_chunkWidth * (y - this->m_rect.ymin) + x - this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS; copy_v4_v4(&this->m_buffer[offset], color); } } @@ -170,7 +170,7 @@ void MemoryBuffer::addPixel(int x, int y, const float color[4]) if (x >= this->m_rect.xmin && x < this->m_rect.xmax && y >= this->m_rect.ymin && y < this->m_rect.ymax) { - const int offset = (this->m_chunkWidth * (y-this->m_rect.ymin) + x-this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS; + const int offset = (this->m_chunkWidth * (y - this->m_rect.ymin) + x - this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS; add_v4_v4(&this->m_buffer[offset], color); } } diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index 9964c27bd46..42d90eca38f 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -163,7 +163,10 @@ public: * @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution * @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution */ - virtual void executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) {} + virtual void executeOpenCL(OpenCLDevice *device, + MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, + MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, + list<cl_kernel> *clKernelsToCleanUp) {} virtual void deinitExecution(); bool isResolutionSet() { diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp index e9767c41230..724abb59bcf 100644 --- a/source/blender/compositor/intern/COM_WorkScheduler.cpp +++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp @@ -106,13 +106,11 @@ void **g_highlightedNodesRead; void COM_startReadHighlights() { - if (!g_highlightInitialized) - { + if (!g_highlightInitialized) { return; } - if (g_highlightedNodesRead) - { + if (g_highlightedNodesRead) { MEM_freeN(g_highlightedNodesRead); } diff --git a/source/blender/compositor/nodes/COM_ViewerNode.cpp b/source/blender/compositor/nodes/COM_ViewerNode.cpp index d67e9e274b0..f44470a9b9a 100644 --- a/source/blender/compositor/nodes/COM_ViewerNode.cpp +++ b/source/blender/compositor/nodes/COM_ViewerNode.cpp @@ -52,8 +52,7 @@ void ViewerNode::convertToOperations(ExecutionSystem *graph, CompositorContext * viewerOperation->setDisplaySettings(context->getDisplaySettings()); viewerOperation->setResolutionInputSocketIndex(0); - if (!imageSocket->isConnected()) - { + if (!imageSocket->isConnected()) { if (alphaSocket->isConnected()) { viewerOperation->setResolutionInputSocketIndex(1); } diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.h b/source/blender/compositor/operations/COM_BokehBlurOperation.h index 37483d3dc69..74ca6b7b058 100644 --- a/source/blender/compositor/operations/COM_BokehBlurOperation.h +++ b/source/blender/compositor/operations/COM_BokehBlurOperation.h @@ -59,6 +59,9 @@ public: void setSize(float size) { this->m_size = size; this->m_sizeavailable = true; } - void executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp); + void executeOpenCL(OpenCLDevice *device, + MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, + MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, + list<cl_kernel> *clKernelsToCleanUp); }; #endif diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp index 44bce6308e8..2d662c1061e 100644 --- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp @@ -236,7 +236,7 @@ void GaussianBlurReferenceOperation::initExecution() /* horizontal */ m_radx = (float)this->m_data->sizex; - int imgx = getWidth()/2; + int imgx = getWidth() / 2; if (m_radx > imgx) m_radx = imgx; else if (m_radx < 1) @@ -245,7 +245,7 @@ void GaussianBlurReferenceOperation::initExecution() /* vertical */ m_rady = (float)this->m_data->sizey; - int imgy = getHeight()/2; + int imgy = getHeight() / 2; if (m_rady > imgy) m_rady = imgy; else if (m_rady < 1) @@ -344,8 +344,8 @@ bool GaussianBlurReferenceOperation::determineDependingAreaOfInterest(rcti *inpu return true; } else { - int addx = this->m_data->sizex+2; - int addy = this->m_data->sizey+2; + int addx = this->m_data->sizex + 2; + int addy = this->m_data->sizey + 2; newInput.xmax = input->xmax + addx; newInput.xmin = input->xmin - addx; newInput.ymax = input->ymax + addy; diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index 0af5ec2d06c..df48c7a6716 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -33,8 +33,7 @@ vector<DistortionCache *> s_cache; void deintializeDistortionCache(void) { - while (s_cache.size()>0) - { + while (s_cache.size() > 0) { DistortionCache * cache = s_cache.back(); s_cache.pop_back(); delete cache; @@ -61,8 +60,7 @@ void MovieDistortionOperation::initExecution() BKE_movieclip_user_set_frame(&clipUser, this->m_framenumber); BKE_movieclip_get_size(this->m_movieClip, &clipUser, &calibration_width, &calibration_height); - for (unsigned int i = 0; i < s_cache.size(); i++) - { + for (unsigned int i = 0; i < s_cache.size(); i++) { DistortionCache *c = (DistortionCache *)s_cache[i]; if (c->isCacheFor(this->m_movieClip, this->m_width, this->m_height, calibration_width, calibration_height, this->m_distortion)) @@ -86,15 +84,12 @@ void MovieDistortionOperation::deinitExecution() { this->m_inputOperation = NULL; this->m_movieClip = NULL; - while (s_cache.size() > COM_DISTORTIONCACHE_MAXSIZE) - { + while (s_cache.size() > COM_DISTORTIONCACHE_MAXSIZE) { double minTime = PIL_check_seconds_timer(); vector<DistortionCache*>::iterator minTimeIterator = s_cache.begin(); - for (vector<DistortionCache*>::iterator it = s_cache.begin(); it < s_cache.end(); it ++) - { + for (vector<DistortionCache*>::iterator it = s_cache.begin(); it < s_cache.end(); it ++) { DistortionCache * cache = *it; - if (cache->getTimeLastUsage()<minTime) - { + if (cache->getTimeLastUsage() < minTime) { minTime = cache->getTimeLastUsage(); minTimeIterator = it; } diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp index 00e35f2c9d8..5cc02a1ed65 100644 --- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp @@ -81,7 +81,7 @@ bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *in } else { rcti dispInput; - BLI_rcti_init(&dispInput, 0,5,0,5); + BLI_rcti_init(&dispInput, 0, 5, 0, 5); if (this->getInputOperation(1)->determineDependingAreaOfInterest(&dispInput, readOperation, output)) { return true; } diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp index 52a9e2a4d8c..61720c7676d 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp @@ -118,7 +118,7 @@ void VariableSizeBokehBlurOperation::executePixel(float output[4], int x, int y, #ifdef COM_DEFOCUS_SEARCH float search[4]; - this->m_inputSearchProgram->read(search, x/InverseSearchRadiusOperation::DIVIDER, y / InverseSearchRadiusOperation::DIVIDER, NULL); + this->m_inputSearchProgram->read(search, x / InverseSearchRadiusOperation::DIVIDER, y / InverseSearchRadiusOperation::DIVIDER, NULL); int minx = search[0]; int miny = search[1]; int maxx = search[2]; @@ -298,9 +298,9 @@ voi *InverseSearchRadiusOperation::initializeTileData(rcti *rect) int rx = x * DIVIDER; int ry = y * DIVIDER; buffer[offset] = MAX2(rx - m_maxBlur, 0); - buffer[offset+1] = MAX2(ry- m_maxBlur, 0); - buffer[offset+2] = MIN2(rx+DIVIDER + m_maxBlur, width); - buffer[offset+3] = MIN2(ry+DIVIDER + m_maxBlur, height); + buffer[offset + 1] = MAX2(ry - m_maxBlur, 0); + buffer[offset + 2] = MIN2(rx + DIVIDER + m_maxBlur, width); + buffer[offset + 3] = MIN2(ry + DIVIDER + m_maxBlur, height); offset += 4; } } diff --git a/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp b/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp index 55a001530ee..4d4c1199f3e 100644 --- a/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp @@ -79,8 +79,7 @@ void ViewerBaseOperation::initImage() BLI_unlock_thread(LOCK_DRAW_IMAGE); } - if (m_doDepthBuffer) - { + if (m_doDepthBuffer) { addzbuffloatImBuf(ibuf); } BLI_unlock_thread(LOCK_DRAW_IMAGE); @@ -96,8 +95,7 @@ void ViewerBaseOperation::initImage() */ this->m_ibuf = ibuf; - if (m_doDepthBuffer) - { + if (m_doDepthBuffer) { this->m_depthBuffer = ibuf->zbuf_float; } diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp index 273c10b60ac..17c8f4d9fd1 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp @@ -110,7 +110,8 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber) memoryBuffer->setCreatedState(); } -void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, unsigned int chunkNumber, MemoryBuffer **inputMemoryBuffers, MemoryBuffer *outputBuffer) +void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, unsigned int chunkNumber, + MemoryBuffer **inputMemoryBuffers, MemoryBuffer *outputBuffer) { float *outputFloatBuffer = outputBuffer->getBuffer(); cl_int error; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 171cbb516b8..6d262daab12 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4933,8 +4933,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) if (but->flag & UI_BUT_DISABLED) return WM_UI_HANDLER_CONTINUE; - if ((data->state == BUTTON_STATE_HIGHLIGHT) || (event->type == EVT_DROP)) - { + if ((data->state == BUTTON_STATE_HIGHLIGHT) || (event->type == EVT_DROP)) { /* handle copy-paste */ if (ELEM(event->type, CKEY, VKEY) && event->val == KM_PRESS && (event->ctrl || event->oskey)) { @@ -6325,11 +6324,11 @@ static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my, uiBut *to_bt) if (to_bt) { /* scroll to activated button */ if (block->flag & UI_BLOCK_CLIPTOP) { - if(to_bt->rect.ymax > block->rect.ymax - UI_MENU_SCROLL_ARROW) + if (to_bt->rect.ymax > block->rect.ymax - UI_MENU_SCROLL_ARROW) dy = block->rect.ymax - to_bt->rect.ymax - UI_MENU_SCROLL_ARROW; } if (block->flag & UI_BLOCK_CLIPBOTTOM) { - if(to_bt->rect.ymin < block->rect.ymin + UI_MENU_SCROLL_ARROW) + if (to_bt->rect.ymin < block->rect.ymin + UI_MENU_SCROLL_ARROW) dy = block->rect.ymin - to_bt->rect.ymin + UI_MENU_SCROLL_ARROW; } } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 238024a0856..7d0adce5007 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2668,7 +2668,7 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), widgetbase_draw(&wtb, wcol); /* text space, arrows are about 0.6 height of button */ - rect->xmax -= (6*BLI_rcti_size_y(rect))/10; + rect->xmax -= (6 * BLI_rcti_size_y(rect)) / 10; } static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign) diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 1c23df1c11e..74cdf4c2a11 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -479,7 +479,7 @@ static void draw_spline_curve(const bContext *C, MaskLayer *masklay, MaskSpline (void)draw_type; } -static void draw_masklays(const bContext *C, Mask *mask, const char draw_flag,const char draw_type, +static void draw_masklays(const bContext *C, Mask *mask, const char draw_flag, const char draw_type, int width, int height) { MaskLayer *masklay; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index d61ba5f1181..0e647105dd2 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1218,11 +1218,11 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) hmargin = 0.1 * (x2 - x1); vmargin = 0.05 * (y2 - y1); - uiDrawBox(GL_LINE_LOOP, x1+hmargin, y1+vmargin, x2-hmargin, y2-vmargin, 2.0); + uiDrawBox(GL_LINE_LOOP, x1 + hmargin, y1+vmargin, x2 - hmargin, y2 - vmargin, 2.0); hmargin = 0.035 * (x2 - x1); vmargin = 0.035 * (y2 - y1); - uiDrawBox(GL_LINE_LOOP, x1+hmargin, y1+vmargin, x2-hmargin, y2-vmargin, 2.0); + uiDrawBox(GL_LINE_LOOP, x1 + hmargin, y1+vmargin, x2 - hmargin, y2 - vmargin, 2.0); } if (ca && (ca->flag & CAM_SHOWSENSOR)) { /* determine sensor fit, and get sensor x/y, for auto fit we diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index b0edc702e48..e953aa2f0ed 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -409,7 +409,7 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3 MEM_freeN(quats); } - if (!*deformmats) { + if (*deformmats == NULL) { int a, numVerts; Mesh *me = (Mesh *)ob->data; diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 21d5482e9cc..cef664437b7 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -1295,7 +1295,7 @@ GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader) return retval; } -void GPU_shader_free_builtin_shaders() +void GPU_shader_free_builtin_shaders(void) { if (GG.shaders.vsm_store) { MEM_freeN(GG.shaders.vsm_store); diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 593e08062fe..5dda33dfd62 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -870,9 +870,9 @@ static void index_rebuild_ffmpeg_proc_decoded_frame( context->start_pts_set = TRUE; } - context->frameno = floor((pts - context->start_pts) - * context->pts_time_base - * context->frame_rate + 0.5f); + context->frameno = floor((pts - context->start_pts) * + context->pts_time_base * + context->frame_rate + 0.5f); /* decoding starts *always* on I-Frames, * so: P-Frames won't work, even if all the diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 74b3c431183..04b8d2fa3df 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -51,7 +51,7 @@ static int rna_Main_is_dirty_get(PointerRNA *ptr) /* XXX, not totally nice to do it this way, should store in main ? */ Main *bmain = (Main *)ptr->data; wmWindowManager *wm; - for (wm = bmain->wm.first; wm; wm = wm->id.next) { + if ((wm = bmain->wm.first)) { return !wm->file_saved; } diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 2b7fb61ea32..eaa1149b3b4 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -1594,7 +1594,7 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) /* new func */ func = RNA_def_function(srna, "new", "rna_Main_mask_new"); RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database"); - parm = RNA_def_string_file_path(func, "name", "", MAX_ID_NAME - 2, "Mask", "Name of new mask datablock"); + RNA_def_string_file_path(func, "name", "", MAX_ID_NAME - 2, "Mask", "Name of new mask datablock"); /* return type */ parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask datablock"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index b63390c65ed..1e75569c841 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -78,7 +78,7 @@ void RNA_api_mesh(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_CONTEXT); func = RNA_def_function(srna, "unit_test_compare", "rna_Mesh_unit_test_compare"); - parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to"); + RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); /* return value */ parm = RNA_def_string(func, "result", "nothing", 64, "Return value", "String description of result of comparison"); diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index d1640a51ded..87fc3be28a2 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -613,7 +613,7 @@ void RNA_api_object(StructRNA *srna) "objects real matrix and layers"); parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Generate texture coordinates for rendering"); + RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Generate texture coordinates for rendering"); RNA_def_function_flag(func, FUNC_USE_REPORTS); func = RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist"); diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 4b4018433b3..7a638e9e40b 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -328,7 +328,7 @@ static void rna_def_render_engine(BlenderRNA *brna) func = RNA_def_function(srna, "end_result", "RE_engine_end_result"); prop = RNA_def_pointer(func, "result", "RenderResult", "Result", ""); RNA_def_property_flag(prop, PROP_REQUIRED); - prop = RNA_def_boolean(func, "cancel", 0, "Cancel", "Don't merge back results"); + RNA_def_boolean(func, "cancel", 0, "Cancel", "Don't merge back results"); func = RNA_def_function(srna, "test_break", "RE_engine_test_break"); prop = RNA_def_boolean(func, "do_break", 0, "Break", ""); diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index c5a0408c7a0..f51b3901f4f 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -568,11 +568,11 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "", "The start frame for the new sequence", -MAXFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_int(func, "end_frame", 0, -MAXFRAME, MAXFRAME, "", - "The end frame for the new sequence", -MAXFRAME, MAXFRAME); - parm = RNA_def_pointer(func, "seq1", "Sequence", "", "Sequence 1 for effect"); - parm = RNA_def_pointer(func, "seq2", "Sequence", "", "Sequence 2 for effect"); - parm = RNA_def_pointer(func, "seq3", "Sequence", "", "Sequence 3 for effect"); + RNA_def_int(func, "end_frame", 0, -MAXFRAME, MAXFRAME, "", + "The end frame for the new sequence", -MAXFRAME, MAXFRAME); + RNA_def_pointer(func, "seq1", "Sequence", "", "Sequence 1 for effect"); + RNA_def_pointer(func, "seq2", "Sequence", "", "Sequence 2 for effect"); + RNA_def_pointer(func, "seq3", "Sequence", "", "Sequence 3 for effect"); /* return type */ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 4b744b160fc..6499375cb66 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -897,8 +897,8 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to find marker for", MINFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_boolean(func, "exact", TRUE, "Exact", - "Get marker at exact frame number rather than get estimated marker"); + RNA_def_boolean(func, "exact", TRUE, "Exact", + "Get marker at exact frame number rather than get estimated marker"); parm = RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame"); RNA_def_function_return(func, parm); |