From e84c0980a3afb89301f8512acee64e525db3a49d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 11 Nov 2011 13:09:14 +0000 Subject: correct indentation and some whitespace edits (no functional changes) --- intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp | 2 +- intern/audaspace/intern/AUD_ConverterReader.cpp | 2 +- intern/boolop/intern/BOP_Face2Face.cpp | 100 +++++++++++---------- intern/boolop/intern/BOP_Interface.cpp | 26 +++--- intern/boolop/intern/BOP_Mesh.cpp | 28 +++--- intern/bsp/intern/CSG_BooleanOps.cpp | 12 +-- intern/container/CTR_UHeap.h | 4 +- intern/decimation/intern/LOD_QSDecimator.cpp | 4 +- intern/ghost/GHOST_ISystem.h | 4 +- intern/ghost/GHOST_ISystemPaths.h | 10 +-- intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp | 2 +- intern/ghost/intern/GHOST_System.h | 6 +- intern/ghost/intern/GHOST_SystemCocoa.mm | 37 ++++---- intern/ghost/intern/GHOST_SystemPaths.h | 10 +-- intern/ghost/intern/GHOST_SystemPathsCocoa.h | 10 +-- intern/ghost/intern/GHOST_SystemPathsWin32.h | 20 ++--- intern/ghost/intern/GHOST_SystemPathsX11.h | 10 +-- intern/ghost/intern/GHOST_SystemX11.cpp | 7 +- intern/ghost/intern/GHOST_SystemX11.h | 4 +- intern/ghost/intern/GHOST_WindowWin32.cpp | 6 +- intern/ghost/test/gears/GHOST_Test.cpp | 2 +- intern/memutil/MEM_CacheLimiter.h | 5 +- 22 files changed, 159 insertions(+), 152 deletions(-) (limited to 'intern') diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp index 0c550ce3b60..6553073c54e 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp @@ -395,7 +395,7 @@ void AUD_FFMPEGReader::read(int& length, bool& eos, sample_t* buffer) { data_size = AUD_MIN(pkgbuf_pos, left * sample_size); m_convert((data_t*) buf, (data_t*) m_pkgbuf.getBuffer(), - data_size / AUD_FORMAT_SIZE(m_specs.format)); + data_size / AUD_FORMAT_SIZE(m_specs.format)); buf += data_size / AUD_FORMAT_SIZE(m_specs.format); left -= data_size/sample_size; } diff --git a/intern/audaspace/intern/AUD_ConverterReader.cpp b/intern/audaspace/intern/AUD_ConverterReader.cpp index 14bb46f3b38..63178f316b2 100644 --- a/intern/audaspace/intern/AUD_ConverterReader.cpp +++ b/intern/audaspace/intern/AUD_ConverterReader.cpp @@ -73,5 +73,5 @@ void AUD_ConverterReader::read(int& length, bool& eos, sample_t* buffer) m_reader->read(length, eos, m_buffer.getBuffer()); m_convert((data_t*)buffer, (data_t*)m_buffer.getBuffer(), - length * specs.channels); + length * specs.channels); } diff --git a/intern/boolop/intern/BOP_Face2Face.cpp b/intern/boolop/intern/BOP_Face2Face.cpp index 332b70550ed..de9fa7b8508 100644 --- a/intern/boolop/intern/BOP_Face2Face.cpp +++ b/intern/boolop/intern/BOP_Face2Face.cpp @@ -167,39 +167,41 @@ void BOP_Face2Face(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB) MT_Point3 p2 = mesh->getVertex(faceA->getVertex(1))->getPoint(); MT_Point3 p3 = mesh->getVertex(faceA->getVertex(2))->getPoint(); - /* get (or create) bounding box for face A */ + /* get (or create) bounding box for face A */ if( faceA->getBBox() == NULL ) - faceA->setBBox(p1,p2,p3); + faceA->setBBox(p1,p2,p3); BOP_BBox *boxA = faceA->getBBox(); /* start checking B faces with the previously stored split index */ for(unsigned int idxFaceB=faceA->getSplit(); - idxFaceBsize() && (faceA->getTAG() != BROKEN) && (faceA->getTAG() != PHANTOM);) { + idxFaceBsize() && (faceA->getTAG() != BROKEN) && (faceA->getTAG() != PHANTOM);) { BOP_Face *faceB = (*facesB)[idxFaceB]; faceA->setSplit(idxFaceB); if ((faceB->getTAG() != BROKEN) && (faceB->getTAG() != PHANTOM)) { - /* get (or create) bounding box for face B */ - if( faceB->getBBox() == NULL ) - faceB->setBBox(mesh->getVertex(faceB->getVertex(0))->getPoint(), - mesh->getVertex(faceB->getVertex(1))->getPoint(), - mesh->getVertex(faceB->getVertex(2))->getPoint()); - BOP_BBox *boxB = faceB->getBBox(); + /* get (or create) bounding box for face B */ + if( faceB->getBBox() == NULL ) { + faceB->setBBox(mesh->getVertex(faceB->getVertex(0))->getPoint(), + mesh->getVertex(faceB->getVertex(1))->getPoint(), + mesh->getVertex(faceB->getVertex(2))->getPoint()); + } + BOP_BBox *boxB = faceB->getBBox(); - if (boxA->intersect(*boxB)) { - MT_Plane3 planeB = faceB->getPlane(); - if (BOP_containsPoint(planeB,p1) && - BOP_containsPoint(planeB,p2) && - BOP_containsPoint(planeB,p3)) { - if (BOP_orientation(planeB,planeA)>0) { - BOP_intersectCoplanarFaces(mesh,facesB,faceA,faceB,false); - } - } - else { - BOP_intersectNonCoplanarFaces(mesh,facesA,facesB,faceA,faceB); - } - } + if (boxA->intersect(*boxB)) { + MT_Plane3 planeB = faceB->getPlane(); + if (BOP_containsPoint(planeB,p1) && + BOP_containsPoint(planeB,p2) && + BOP_containsPoint(planeB,p3)) + { + if (BOP_orientation(planeB,planeA)>0) { + BOP_intersectCoplanarFaces(mesh,facesB,faceA,faceB,false); + } + } + else { + BOP_intersectNonCoplanarFaces(mesh,facesA,facesB,faceA,faceB); + } + } } idxFaceB++; } @@ -656,16 +658,16 @@ void BOP_mergeSort(MT_Point3 *points, unsigned int *face, unsigned int &size, bo * @param invert indicates if faceA has priority over faceB * @param segmemts array of the output x-segments */ - void BOP_createXS(BOP_Mesh* mesh, - BOP_Face* faceA, - BOP_Face* faceB, - BOP_Segment sA, - BOP_Segment sB, - bool invert, - BOP_Segment* segments) { - BOP_createXS(mesh, faceA, faceB, faceA->getPlane(), faceB->getPlane(), - sA, sB, invert, segments); - } +void BOP_createXS(BOP_Mesh* mesh, + BOP_Face* faceA, + BOP_Face* faceB, + BOP_Segment sA, + BOP_Segment sB, + bool invert, + BOP_Segment* segments) { + BOP_createXS(mesh, faceA, faceB, faceA->getPlane(), faceB->getPlane(), + sA, sB, invert, segments); +} /** * Computes the x-segment of two segments (the shared interval). The segments needs to have sA.m_cfg1 > 0 && sB.m_cfg1 > 0 . @@ -1169,7 +1171,7 @@ BOP_Face *BOP_getOppositeFace(BOP_Mesh* mesh, void BOP_removeOverlappedFaces(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB) { for(unsigned int i=0;isize();i++) { - BOP_Face *faceI = (*facesA)[i]; + BOP_Face *faceI = (*facesA)[i]; if (faceI->getTAG()==BROKEN) continue; bool overlapped = false; MT_Point3 p1 = mesh->getVertex(faceI->getVertex(0))->getPoint(); @@ -1178,21 +1180,23 @@ void BOP_removeOverlappedFaces(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *f for(unsigned int j=0;jsize();) { BOP_Face *faceJ = (*facesB)[j]; if (faceJ->getTAG()!=BROKEN) { - MT_Plane3 planeJ = faceJ->getPlane(); - if (BOP_containsPoint(planeJ,p1) && BOP_containsPoint(planeJ,p2) - && BOP_containsPoint(planeJ,p3)) { - MT_Point3 q1 = mesh->getVertex(faceJ->getVertex(0))->getPoint(); - MT_Point3 q2 = mesh->getVertex(faceJ->getVertex(1))->getPoint(); - MT_Point3 q3 = mesh->getVertex(faceJ->getVertex(2))->getPoint(); - if (BOP_overlap(MT_Vector3(planeJ.x(),planeJ.y(),planeJ.z()), - p1,p2,p3,q1,q2,q3)) { - facesB->erase(facesB->begin()+j,facesB->begin()+(j+1)); - faceJ->setTAG(BROKEN); - overlapped = true; - } - else j++; - } - else j++; + MT_Plane3 planeJ = faceJ->getPlane(); + if (BOP_containsPoint(planeJ,p1) && BOP_containsPoint(planeJ,p2) + && BOP_containsPoint(planeJ,p3)) + { + MT_Point3 q1 = mesh->getVertex(faceJ->getVertex(0))->getPoint(); + MT_Point3 q2 = mesh->getVertex(faceJ->getVertex(1))->getPoint(); + MT_Point3 q3 = mesh->getVertex(faceJ->getVertex(2))->getPoint(); + if (BOP_overlap(MT_Vector3(planeJ.x(),planeJ.y(),planeJ.z()), + p1,p2,p3,q1,q2,q3)) + { + facesB->erase(facesB->begin()+j,facesB->begin()+(j+1)); + faceJ->setTAG(BROKEN); + overlapped = true; + } + else j++; + } + else j++; }else j++; } if (overlapped) faceI->setTAG(OVERLAPPED); diff --git a/intern/boolop/intern/BOP_Interface.cpp b/intern/boolop/intern/BOP_Interface.cpp index 8b88c18f151..f11c4eaffae 100644 --- a/intern/boolop/intern/BOP_Interface.cpp +++ b/intern/boolop/intern/BOP_Interface.cpp @@ -46,23 +46,23 @@ #endif BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, - BOP_Faces* facesA, - BOP_Faces* facesB, - bool invertMeshA, - bool invertMeshB); + BOP_Faces* facesA, + BOP_Faces* facesB, + bool invertMeshA, + bool invertMeshB); BOP_Face3* BOP_createFace(BOP_Mesh* mesh, - BOP_Index vertex1, - BOP_Index vertex2, - BOP_Index vertex3, - BOP_Index origFace); + BOP_Index vertex1, + BOP_Index vertex2, + BOP_Index vertex3, + BOP_Index origFace); void BOP_addMesh(BOP_Mesh* mesh, - BOP_Faces* meshFacesId, - CSG_FaceIteratorDescriptor& face_it, - CSG_VertexIteratorDescriptor& vertex_it, - bool invert); + BOP_Faces* meshFacesId, + CSG_FaceIteratorDescriptor& face_it, + CSG_VertexIteratorDescriptor& vertex_it, + bool invert); BSP_CSGMesh* BOP_newEmptyMesh(); BSP_CSGMesh* BOP_exportMesh(BOP_Mesh* inputMesh, - bool invert); + bool invert); void BOP_meshFilter(BOP_Mesh* meshC, BOP_Faces* faces, BOP_BSPTree* bsp); void BOP_simplifiedMeshFilter(BOP_Mesh* meshC, BOP_Faces* faces, BOP_BSPTree* bsp, bool inverted); void BOP_meshClassify(BOP_Mesh* meshC, BOP_Faces* faces, BOP_BSPTree* bsp); diff --git a/intern/boolop/intern/BOP_Mesh.cpp b/intern/boolop/intern/BOP_Mesh.cpp index 5ea9872467d..e35b5437f68 100644 --- a/intern/boolop/intern/BOP_Mesh.cpp +++ b/intern/boolop/intern/BOP_Mesh.cpp @@ -788,20 +788,20 @@ BOP_Index BOP_Mesh::replaceVertexIndex(BOP_Index oldIndex, BOP_Index newIndex) bool BOP_Mesh::isClosedMesh() { - for(unsigned int i=0; igetFaces(); - unsigned int count = 0; - const BOP_IT_Indexs facesEnd = faces.end(); - for(BOP_IT_Indexs it = faces.begin();it!=facesEnd;it++) { - if (m_faces[*it]->getTAG()!=BROKEN) - count++; - } - - if ((count%2)!=0) return false; - } - - return true; + for(unsigned int i=0; igetFaces(); + unsigned int count = 0; + const BOP_IT_Indexs facesEnd = faces.end(); + for(BOP_IT_Indexs it = faces.begin();it!=facesEnd;it++) { + if (m_faces[*it]->getTAG()!=BROKEN) + count++; + } + + if ((count%2)!=0) return false; + } + + return true; } diff --git a/intern/bsp/intern/CSG_BooleanOps.cpp b/intern/bsp/intern/CSG_BooleanOps.cpp index 91523bad483..df1374ef10b 100644 --- a/intern/bsp/intern/CSG_BooleanOps.cpp +++ b/intern/bsp/intern/CSG_BooleanOps.cpp @@ -91,14 +91,14 @@ CSG_PerformBooleanOperation( switch( op_type ) { case e_csg_union: - boolType = BOP_UNION; - break; + boolType = BOP_UNION; + break; case e_csg_difference: - boolType = BOP_DIFFERENCE; - break; + boolType = BOP_DIFFERENCE; + break; default: - boolType = BOP_INTERSECTION; - break; + boolType = BOP_INTERSECTION; + break; } BoolOpState boolOpResult; diff --git a/intern/container/CTR_UHeap.h b/intern/container/CTR_UHeap.h index e1cd2755263..11813c48331 100644 --- a/intern/container/CTR_UHeap.h +++ b/intern/container/CTR_UHeap.h @@ -229,13 +229,13 @@ private: Parent( unsigned int i ) { - return (i-1) >> 1; + return (i-1) >> 1; } int Left( int i ) { - return (i<<1)+1; + return (i<<1)+1; } int diff --git a/intern/decimation/intern/LOD_QSDecimator.cpp b/intern/decimation/intern/LOD_QSDecimator.cpp index 607a43a156d..381571a41f6 100644 --- a/intern/decimation/intern/LOD_QSDecimator.cpp +++ b/intern/decimation/intern/LOD_QSDecimator.cpp @@ -152,8 +152,8 @@ CollapseEdge( // assign new vertex position - v0.pos = new_vertex; - v1.pos = new_vertex; + v0.pos = new_vertex; + v1.pos = new_vertex; // sum the quadrics of v0 and v1 q0 = sum; diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index f926c07a8e5..04dc8717637 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -252,7 +252,7 @@ public: * @return Indication of success. */ virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0; + const bool stereoVisual) = 0; /** * Ends full screen mode. @@ -358,7 +358,7 @@ public: * @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer * */ - virtual GHOST_TUns8* getClipboard(bool selection) const = 0; + virtual GHOST_TUns8* getClipboard(bool selection) const = 0; /** * Put data to the Clipboard diff --git a/intern/ghost/GHOST_ISystemPaths.h b/intern/ghost/GHOST_ISystemPaths.h index 05795d86cc9..804cba721ff 100644 --- a/intern/ghost/GHOST_ISystemPaths.h +++ b/intern/ghost/GHOST_ISystemPaths.h @@ -86,12 +86,12 @@ public: * Determine the directory of the current binary * @return Unsigned char string pointing to the binary dir */ - virtual const GHOST_TUns8* getBinaryDir() const = 0; + virtual const GHOST_TUns8* getBinaryDir() const = 0; - /** - * Add the file to the operating system most recently used files - */ - virtual void addToSystemRecentFiles(const char* filename) const = 0; + /** + * Add the file to the operating system most recently used files + */ + virtual void addToSystemRecentFiles(const char* filename) const = 0; private: /** The one and only system paths*/ diff --git a/intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp b/intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp index 5ef3bbea942..1449da7b096 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp +++ b/intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp @@ -88,7 +88,7 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::getDisplaySetting(GHOST_TUns8 display displayModes = ::CGDisplayAvailableModes(d); //CFIndex numModes = ::CFArrayGetCount(displayModes);/*unused*/ //GHOST_TInt32 numSettings = (GHOST_TInt32)numModes; /*unused*/ - CFDictionaryRef displayModeValues = (CFDictionaryRef)::CFArrayGetValueAtIndex(displayModes, index); + CFDictionaryRef displayModeValues = (CFDictionaryRef)::CFArrayGetValueAtIndex(displayModes, index); setting.xPixels = getValue(displayModeValues, kCGDisplayWidth); setting.yPixels = getValue(displayModeValues, kCGDisplayHeight); diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index c958d54f2d0..afd2a8cbae3 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -141,7 +141,7 @@ public: * @return Indication of success. */ virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0); + const bool stereoVisual); /** * Ends full screen mode. @@ -276,7 +276,7 @@ public: * @return Returns the clipboard data * */ - virtual GHOST_TUns8* getClipboard(bool selection) const = 0; + virtual GHOST_TUns8* getClipboard(bool selection) const = 0; /** * Put data to the Clipboard @@ -305,7 +305,7 @@ protected: * @return Indication of success. */ virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0); + const bool stereoVisual); /** The display manager (platform dependant). */ GHOST_DisplayManager* m_displayManager; diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 9dc3dd3f30b..730a7c08151 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -875,24 +875,25 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent) /*do { GHOST_TimerManager* timerMgr = getTimerManager(); - if (waitForEvent) { - GHOST_TUns64 next = timerMgr->nextFireTime(); - double timeOut; - - if (next == GHOST_kFireTimeNever) { - timeOut = kEventDurationForever; - } else { - timeOut = (double)(next - getMilliSeconds())/1000.0; - if (timeOut < 0.0) - timeOut = 0.0; - } - - ::ReceiveNextEvent(0, NULL, timeOut, false, &event); - } - - if (timerMgr->fireTimers(getMilliSeconds())) { - anyProcessed = true; - }*/ + if (waitForEvent) { + GHOST_TUns64 next = timerMgr->nextFireTime(); + double timeOut; + + if (next == GHOST_kFireTimeNever) { + timeOut = kEventDurationForever; + } else { + timeOut = (double)(next - getMilliSeconds())/1000.0; + if (timeOut < 0.0) + timeOut = 0.0; + } + + ::ReceiveNextEvent(0, NULL, timeOut, false, &event); + } + + if (timerMgr->fireTimers(getMilliSeconds())) { + anyProcessed = true; + } + */ do { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; diff --git a/intern/ghost/intern/GHOST_SystemPaths.h b/intern/ghost/intern/GHOST_SystemPaths.h index 4ee01e899d0..739fd4edfaf 100644 --- a/intern/ghost/intern/GHOST_SystemPaths.h +++ b/intern/ghost/intern/GHOST_SystemPaths.h @@ -68,12 +68,12 @@ public: * Determine the directory of the current binary * @return Unsigned char string pointing to the binary dir */ - virtual const GHOST_TUns8* getBinaryDir() const = 0; + virtual const GHOST_TUns8* getBinaryDir() const = 0; - /** - * Add the file to the operating system most recently used files - */ - virtual void addToSystemRecentFiles(const char* filename) const = 0; + /** + * Add the file to the operating system most recently used files + */ + virtual void addToSystemRecentFiles(const char* filename) const = 0; }; diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h index 14fb65c1282..2b86659c116 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h +++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h @@ -70,12 +70,12 @@ public: * Determine the directory of the current binary * @return Unsigned char string pointing to the binary dir */ - virtual const GHOST_TUns8* getBinaryDir() const; + virtual const GHOST_TUns8* getBinaryDir() const; - /** - * Add the file to the operating system most recently used files - */ - void addToSystemRecentFiles(const char* filename) const; + /** + * Add the file to the operating system most recently used files + */ + void addToSystemRecentFiles(const char* filename) const; }; #endif // _GHOST_SYSTEM_COCOA_H_ diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h index 3b7ce6f9910..dd875d4abea 100644 --- a/intern/ghost/intern/GHOST_SystemPathsWin32.h +++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h @@ -74,18 +74,18 @@ public: * If needed, it will create the base directory. * @return Unsigned char string pointing to user dir (eg ~/). */ - const GHOST_TUns8* getUserDir() const; + const GHOST_TUns8* getUserDir() const; - /** - * Determine the directory of the current binary - * @return Unsigned char string pointing to the binary dir - */ - const GHOST_TUns8* getBinaryDir() const; + /** + * Determine the directory of the current binary + * @return Unsigned char string pointing to the binary dir + */ + const GHOST_TUns8* getBinaryDir() const; - /** - * Add the file to the operating system most recently used files - */ - void addToSystemRecentFiles(const char* filename) const; + /** + * Add the file to the operating system most recently used files + */ + void addToSystemRecentFiles(const char* filename) const; }; #endif // _GHOST_SYSTEM_PATHS_WIN32_H_ diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.h b/intern/ghost/intern/GHOST_SystemPathsX11.h index 469f93f5615..a0a1d28a253 100644 --- a/intern/ghost/intern/GHOST_SystemPathsX11.h +++ b/intern/ghost/intern/GHOST_SystemPathsX11.h @@ -68,12 +68,12 @@ public: * Determine the directory of the current binary * @return Unsigned char string pointing to the binary dir */ - const GHOST_TUns8* getBinaryDir() const; + const GHOST_TUns8* getBinaryDir() const; - /** - * Add the file to the operating system most recently used files - */ - void addToSystemRecentFiles(const char* filename) const; + /** + * Add the file to the operating system most recently used files + */ + void addToSystemRecentFiles(const char* filename) const; }; #endif diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index a5799273fde..2547006ef28 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -304,14 +304,15 @@ static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep) { FD_SET(fd, &fds); if (maxSleep == -1) { - select(fd + 1, &fds, NULL, NULL, NULL); - } else { + select(fd + 1, &fds, NULL, NULL, NULL); + } + else { timeval tv; tv.tv_sec = maxSleep/1000; tv.tv_usec = (maxSleep - tv.tv_sec*1000)*1000; - select(fd + 1, &fds, NULL, NULL, &tv); + select(fd + 1, &fds, NULL, NULL, &tv); } } diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index d35d91693e2..73d9c95e273 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -218,8 +218,8 @@ public: /* Helped function for get data from the clipboard. */ void getClipboard_xcout(XEvent evt, Atom sel, Atom target, - unsigned char **txt, unsigned long *len, - unsigned int *context) const; + unsigned char **txt, unsigned long *len, + unsigned int *context) const; /** * Returns unsinged char from CUT_BUFFER0 diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index cd5eff18be5..a363130c897 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -1046,9 +1046,9 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCursorGrab(GHOST_TGrabCursorMode mode /* use to generate a mouse move event, otherwise the last event * blender gets can be outside the screen causing menus not to show * properly unless the user moves the mouse */ - GHOST_TInt32 pos[2]; - m_system->getCursorPosition(pos[0], pos[1]); - m_system->setCursorPosition(pos[0], pos[1]); + GHOST_TInt32 pos[2]; + m_system->getCursorPosition(pos[0], pos[1]); + m_system->setCursorPosition(pos[0], pos[1]); } /* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */ diff --git a/intern/ghost/test/gears/GHOST_Test.cpp b/intern/ghost/test/gears/GHOST_Test.cpp index 23a82cb9fbd..1822f3539bd 100644 --- a/intern/ghost/test/gears/GHOST_Test.cpp +++ b/intern/ghost/test/gears/GHOST_Test.cpp @@ -689,7 +689,7 @@ int main(int /*argc*/, char** /*argv*/) //DWORD keyValue; // lresult = regkey.Open(HKEY_LOCAL_MACHINE, "SOFTWARE\\NVIDIA Corporation\\Global\\Stereo3D\\StereoEnable"); lresult = regkey.Open(HKEY_LOCAL_MACHINE, "SOFTWARE\\NVIDIA Corporation\\Global\\Stereo3D\\StereoEnable", - KEY_ALL_ACCESS ); + KEY_ALL_ACCESS); if(lresult == ERROR_SUCCESS) printf("Succesfully opened key\n"); diff --git a/intern/memutil/MEM_CacheLimiter.h b/intern/memutil/MEM_CacheLimiter.h index 5194c97fd78..fc12f22cfe6 100644 --- a/intern/memutil/MEM_CacheLimiter.h +++ b/intern/memutil/MEM_CacheLimiter.h @@ -115,7 +115,7 @@ private: T * data; int refcount; - typename std::list *, + typename std::list *, MEM_Allocator *> >::iterator me; MEM_CacheLimiter * parent; }; @@ -160,7 +160,8 @@ public: } for (iterator it = queue.begin(); - it != queue.end() && mem_in_use > max;) { + it != queue.end() && mem_in_use > max;) + { iterator jt = it; ++it; -- cgit v1.2.3