style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Thu, 31 Jan 2013 21:15:38 +0000 (21:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 31 Jan 2013 21:15:38 +0000 (21:15 +0000)
source/blender/compositor/operations/COM_TranslateOperation.cpp
source/blender/editors/interface/interface_layout.c
source/blender/makesdna/DNA_node_types.h

index c34931471c7c6f07eb237bbd06a7fe0f7f004c30..253c5df8f9d4cd8a4b25f3ee94527978a78df05f 100644 (file)
@@ -64,7 +64,7 @@ void TranslateOperation::executePixel(float output[4], float x, float y, PixelSa
        float originalXPos = x - this->getDeltaX();
        float originalYPos = y - this->getDeltaY();
 
        float originalXPos = x - this->getDeltaX();
        float originalYPos = y - this->getDeltaY();
 
-       switch(m_wrappingType) {
+       switch (m_wrappingType) {
                case 0:
                        //Intentionally empty, originalXPos and originalYPos have been set before
                        break;
                case 0:
                        //Intentionally empty, originalXPos and originalYPos have been set before
                        break;
@@ -83,7 +83,7 @@ void TranslateOperation::executePixel(float output[4], float x, float y, PixelSa
                        break;
        }
 
                        break;
        }
 
-       this->m_inputOperation->read(output, originalXPos , originalYPos, sampler);
+       this->m_inputOperation->read(output, originalXPos, originalYPos, sampler);
 
 }
 
 
 }
 
@@ -98,20 +98,20 @@ bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
        newInput.ymin = input->ymin - this->getDeltaY();
        newInput.ymax = input->ymax - this->getDeltaY();
 
        newInput.ymin = input->ymin - this->getDeltaY();
        newInput.ymax = input->ymax - this->getDeltaY();
 
-       if (m_wrappingType == 1 || m_wrappingType == 3){
+       if (m_wrappingType == 1 || m_wrappingType == 3) {
                // wrap only on the x-axis if tile is wrapping
                newInput.xmin = getWrappedOriginalXPos(input->xmin);
                newInput.xmax = getWrappedOriginalXPos(input->xmax);
                // wrap only on the x-axis if tile is wrapping
                newInput.xmin = getWrappedOriginalXPos(input->xmin);
                newInput.xmax = getWrappedOriginalXPos(input->xmax);
-               if(newInput.xmin > newInput.xmax){
+               if (newInput.xmin > newInput.xmax) {
                        newInput.xmin = 0;
                        newInput.xmax = this->getWidth();
                }
        }
                        newInput.xmin = 0;
                        newInput.xmax = this->getWidth();
                }
        }
-       if(m_wrappingType == 2 || m_wrappingType == 3) {
+       if (m_wrappingType == 2 || m_wrappingType == 3) {
                // wrap only on the y-axis if tile is wrapping
                newInput.ymin = getWrappedOriginalYPos(input->ymin);
                newInput.ymax = getWrappedOriginalYPos(input->ymax);
                // wrap only on the y-axis if tile is wrapping
                newInput.ymin = getWrappedOriginalYPos(input->ymin);
                newInput.ymax = getWrappedOriginalYPos(input->ymax);
-               if (newInput.ymin > newInput.ymax){
+               if (newInput.ymin > newInput.ymax) {
                        newInput.ymin = 0;
                        newInput.ymax = this->getHeight();
                }
                        newInput.ymin = 0;
                        newInput.ymax = this->getHeight();
                }
@@ -131,17 +131,22 @@ float TranslateOperation::getWrappedOriginalXPos(float x)
        float originalXPos = 0;
 
        // Positive offset: Append image data from the left
        float originalXPos = 0;
 
        // Positive offset: Append image data from the left
-       if ( this->m_relativeOffsetX > 0 ) {
-               if ( x < this->m_relativeOffsetX )
+       if (this->m_relativeOffsetX > 0) {
+               if (x < this->m_relativeOffsetX) {
                        originalXPos = this->getWidth() - this->m_relativeOffsetX + x;
                        originalXPos = this->getWidth() - this->m_relativeOffsetX + x;
-               else
-                       originalXPos =  x - this->m_relativeOffsetX;
-       } else {
+               }
+               else {
+                       originalXPos = x - this->m_relativeOffsetX;
+               }
+       }
+       else {
                // Negative offset: Append image data from the right
                // Negative offset: Append image data from the right
-               if (x < (this->getWidth() + this->m_relativeOffsetX))
+               if (x < (this->getWidth() + this->m_relativeOffsetX)) {
                        originalXPos = x - this->m_relativeOffsetX;
                        originalXPos = x - this->m_relativeOffsetX;
-               else
+               }
+               else {
                        originalXPos = x - (this->getWidth() + this->m_relativeOffsetX);
                        originalXPos = x - (this->getWidth() + this->m_relativeOffsetX);
+               }
        }
 
        while (originalXPos < 0) originalXPos += this->m_width;
        }
 
        while (originalXPos < 0) originalXPos += this->m_width;
@@ -154,17 +159,22 @@ float TranslateOperation::getWrappedOriginalYPos(float y)
        float originalYPos = 0;
 
        // Positive offset: Append image data from the bottom
        float originalYPos = 0;
 
        // Positive offset: Append image data from the bottom
-       if (  this->m_relativeOffsetY > 0 ) {
-               if ( y < this->m_relativeOffsetY )
-                       originalYPos = this->getHeight()- this->m_relativeOffsetY + y;
-               else
-                       originalYPos =  y - this->m_relativeOffsetY;
-       } else {
+       if (this->m_relativeOffsetY > 0) {
+               if (y < this->m_relativeOffsetY) {
+                       originalYPos = this->getHeight() - this->m_relativeOffsetY + y;
+               }
+               else {
+                       originalYPos = y - this->m_relativeOffsetY;
+               }
+       }
+       else {
                // Negative offset: Append image data from the top
                // Negative offset: Append image data from the top
-               if (y < (this->getHeight() + this->m_relativeOffsetY))
+               if (y < (this->getHeight() + this->m_relativeOffsetY)) {
                        originalYPos = y - this->m_relativeOffsetY;
                        originalYPos = y - this->m_relativeOffsetY;
-               else
+               }
+               else {
                        originalYPos = y - (this->getHeight() + this->m_relativeOffsetY);
                        originalYPos = y - (this->getHeight() + this->m_relativeOffsetY);
+               }
        }
 
        while (originalYPos < 0) originalYPos += this->m_height;
        }
 
        while (originalYPos < 0) originalYPos += this->m_height;
index 487277ed0a9e32dabee21dad1c482a458ee3c276..3b764d5bdefb94b0b421ec23d416b33f56a5b932 100644 (file)
@@ -1393,7 +1393,7 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN
 
        /* turn button into search button */
        if (searchprop) {
 
        /* turn button into search button */
        if (searchprop) {
-               if(RNA_property_flag(prop) & PROP_NEVER_UNLINK)
+               if (RNA_property_flag(prop) & PROP_NEVER_UNLINK)
                        but->type = SEARCH_MENU;
                else
                        but->type = SEARCH_MENU_UNLINK;
                        but->type = SEARCH_MENU;
                else
                        but->type = SEARCH_MENU_UNLINK;
index 83d884be1ccdc7335f0ccceb7aefb7a002234696..376d775f7194cd4e24f9a740328dfe7cdcf148ff 100644 (file)
@@ -712,7 +712,7 @@ typedef struct NodeTrackPosData {
 } NodeTrackPosData;
 
 typedef struct NodeTranslateData {
 } NodeTrackPosData;
 
 typedef struct NodeTranslateData {
-               char wrap_axis, pad[7];
+       char wrap_axis, pad[7];
 } NodeTranslateData;
 
 
 } NodeTranslateData;