style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Thu, 1 Nov 2012 09:54:00 +0000 (09:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 1 Nov 2012 09:54:00 +0000 (09:54 +0000)
31 files changed:
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/unit.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/noise.c
source/blender/bmesh/operators/bmo_similar.c
source/blender/bmesh/operators/bmo_smooth_laplacian.c
source/blender/compositor/intern/COM_MemoryBuffer.cpp
source/blender/compositor/intern/COM_NodeOperation.h
source/blender/compositor/intern/COM_WorkScheduler.cpp
source/blender/compositor/nodes/COM_ViewerNode.cpp
source/blender/compositor/operations/COM_BokehBlurOperation.h
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
source/blender/compositor/operations/COM_WriteBufferOperation.cpp
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/mask/mask_draw.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/util/crazyspace.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/indexer.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mesh_api.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_sequencer_api.c
source/blender/makesrna/intern/rna_tracking.c

index a7b53370d1d51d6375fc8636705f5d26ce9e8f7f..5b211d7f09aa113c452d37cd6b2cfd85388c7027 100644 (file)
@@ -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);
index 46836b1f8d115eea396b4f09c923517ec225df95..84e1f29f6c0767fb8076abaff7b039ab3e70d221 100644 (file)
@@ -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}
index fe91f91320a18952cc90e3da73ab7d14c26c592a..70617453eff1a5b90daf4e45b06fc8b27a71856c 100644 (file)
@@ -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");
        
index 124624ca1374ad43fc6f263e2c05439dfaae8f97..fb33d7ce1277be0913932cc96dfe15a1473007f3 100644 (file)
@@ -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 */
index 1d93fe1be25945e0489a0df05864342e4c4ce520..df03e50d2c4a126d7293a8bf6f5e4af4aad1b992 100644 (file)
@@ -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
index 519a81847689a896bcc6f0011afeab289814b5ac..5223de99ca2aeab9fe01f2e994bc544eb64fbf7a 100644 (file)
@@ -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);
index bdbe21f82ea1f3b4bd4e586950e98d489d802ad6..357a4c1d4c028fe8abfd0f26137a813432022a7b 100644 (file)
@@ -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);
        }
 }
index 9964c27bd4664a1e05f693613b5324b672632a6f..42d90eca38f2818465be2d42009bf6ba0bc8d11d 100644 (file)
@@ -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() {
index e9767c4123005dfe0e1c726dea1d2397ec3a798d..724abb59bcf83c87b6a5023efcf98e56cea92b91 100644 (file)
@@ -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);
        }
        
index d67e9e274b058c57f03debade07915b66fe97a9f..f44470a9b9a5a482ab510b5223b491ce9ae9a5b7 100644 (file)
@@ -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);
                }
index 37483d3dc69e754089307a475631420388a04844..74ca6b7b0582d622ae8412920bb7c6da84094c1f 100644 (file)
@@ -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
index 44bce6308e82332bba2ac810cffcde4e33d15357..2d662c1061e5c129c823fe070434e205b4a0ddcb 100644 (file)
@@ -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;
index 0af5ec2d06cca96e5c6472f451d7525d2767f944..df48c7a6716abc48cc2617020392264ed3cda34c 100644 (file)
@@ -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;
                        }
index 00e35f2c9d8b57d4994daea2b09991b7fbf6c8f7..5cc02a1ed65a38bc8f70b84a05da6b848e8cee95 100644 (file)
@@ -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;
                }
index 52a9e2a4d8c460a42a844dd7d6938ad9973eddcf..61720c7676ddec83dd1af24990e5dc63e30c0189 100644 (file)
@@ -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;
                }
        }
index 55a001530ee030c4ef0c56c171bae9019c610fb1..4d4c1199f3eb778ff7504c7958889d8872c1fc21 100644 (file)
@@ -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;
        }
 
index 273c10b60acaddc8468322dd9298ffef93150915..17c8f4d9fd1d20ab6e0ae5cf7bbbe1a1e5c8f636 100644 (file)
@@ -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;
index 171cbb516b8863776bdf2cc7932635b0cc257538..6d262daab122319ee2d3b5e4f5155bd5c7752bb8 100644 (file)
@@ -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;
                }
        }
index 238024a085685fbefa665ec552dfdc661d9d6ccf..7d0adce5007aa08734bca1bbc96fd728fed9fce6 100644 (file)
@@ -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)
index 1c23df1c11eb3989e2092dc771714e55906ca8d7..74cdf4c2a11ce643b1438303bfce7cefacb3eb4f 100644 (file)
@@ -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;
index d61ba5f118157cb166dca78fa65b82d6efff47ff..0e647105dd243079a0520460a29d1d74c4ccfbf1 100644 (file)
@@ -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
index b0edc702e4869f48f39c2e32cbba65b7da225338..e953aa2f0ed73c1f0859f0493e809780792a709b 100644 (file)
@@ -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;
 
index 21d5482e9ccebd144326ab6066352f63eb6a5adb..cef664437b719375be2632f52cd908ecaa5a47c3 100644 (file)
@@ -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);
index 593e08062fe2968611547ec0a4a8cd45c6ee708d..5dda33dfd62693f5aaaac939317bf2c8feec93f1 100644 (file)
@@ -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
index 74b3c431183b54071746a7300f99289e02491bd1..04b8d2fa3dfca40f2d6e99e0489f538400ee360e 100644 (file)
@@ -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;
        }
 
index 2b7fb61ea32e9d5e4b752d10f5eaec529ef7511e..eaa1149b3b48348be00450bed46085a00f1034d4 100644 (file)
@@ -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);
index b63390c65ed26fe1d80ea4693e1f352139ab85df..1e75569c8418d6f88fdc04d1cdff30d394fb5339 100644 (file)
@@ -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");
index d1640a51ded89d3625c0d69419d0875b3f66bf8f..87fc3be28a2deba217996aa282f44665ac7a2e27 100644 (file)
@@ -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");
index 4b4018433b3c6d212fddcba1a5275d412656932d..7a638e9e40b21d60c1dced5ad2dbad0bbcde3a3e 100644 (file)
@@ -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", "");
index c5a0408c7a06160e108a5b7765ffa3f4c6ef59be..f51b3901f4f71216cd85ddb57a90f81f5f6c7916 100644 (file)
@@ -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);
index 4b744b160fcab76abf0126cbf43a940f64bb0fd1..6499375cb6679508c94ce7ea27a01ea886041575 100644 (file)
@@ -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);