[Bf-blender-cvs] [b7b1c09] master: Code cleanup: ghost style

Campbell Barton noreply at git.blender.org
Thu Jul 24 13:42:58 CEST 2014


Commit: b7b1c09766a120cdb1f66a40a93590c2dcfe1120
Author: Campbell Barton
Date:   Thu Jul 24 21:39:27 2014 +1000
Branches: master
https://developer.blender.org/rBb7b1c09766a120cdb1f66a40a93590c2dcfe1120

Code cleanup: ghost style

===================================================================

M	intern/ghost/intern/GHOST_DisplayManager.cpp
M	intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
M	intern/ghost/intern/GHOST_DisplayManagerX11.cpp
M	intern/ghost/intern/GHOST_NDOFManager.cpp
M	intern/ghost/intern/GHOST_NDOFManager.h
M	intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
M	intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
M	intern/ghost/intern/GHOST_NDOFManagerX11.cpp
M	intern/ghost/intern/GHOST_System.cpp
M	intern/ghost/intern/GHOST_SystemX11.cpp
M	intern/ghost/intern/GHOST_Window.cpp
M	intern/ghost/intern/GHOST_WindowX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_DisplayManager.cpp b/intern/ghost/intern/GHOST_DisplayManager.cpp
index 7ca4c81..9f0b321 100644
--- a/intern/ghost/intern/GHOST_DisplayManager.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManager.cpp
@@ -40,9 +40,8 @@
 #include "GHOST_Debug.h"
 
 
-GHOST_DisplayManager::GHOST_DisplayManager(
-    void)
-	: m_settingsInitialized(false)
+GHOST_DisplayManager::GHOST_DisplayManager(void)
+    : m_settingsInitialized(false)
 {
 }
 
diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp b/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
index fa92adf..cdba8cd 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
@@ -35,8 +35,7 @@
 #include "GHOST_WindowManager.h"
 
 GHOST_DisplayManagerSDL::GHOST_DisplayManagerSDL(GHOST_SystemSDL *system)
-    :
-      GHOST_DisplayManager(),
+    : GHOST_DisplayManager(),
       m_system(system)
 {
 	memset(&m_mode, 0, sizeof(m_mode));
diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
index f63a93e..a545789 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
@@ -42,10 +42,9 @@
 
 GHOST_DisplayManagerX11::
 GHOST_DisplayManagerX11(
-    GHOST_SystemX11 *system
-    ) :
-	GHOST_DisplayManager(),
-	m_system(system)
+        GHOST_SystemX11 *system)
+    : GHOST_DisplayManager(),
+      m_system(system)
 {
 	/* nothing to do. */
 }
diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp
index c996806..9bd6226 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManager.cpp
@@ -189,18 +189,18 @@ static const NDOF_ButtonT Generic_HID_map[] = {
 
 static const int genericButtonCount = sizeof(Generic_HID_map) / sizeof(NDOF_ButtonT);
 
-GHOST_NDOFManager::GHOST_NDOFManager(GHOST_System& sys)
-	: m_system(sys)
-	, m_deviceType(NDOF_UnknownDevice) // each platform has its own device detection code
-	, m_buttonCount(genericButtonCount)
-	, m_buttonMask(0)
-	, m_hidMap(Generic_HID_map)
-	, m_buttons(0)
-	, m_motionTime(0)
-	, m_prevMotionTime(0)
-	, m_motionState(GHOST_kNotStarted)
-	, m_motionEventPending(false)
-	, m_deadZone(0.f)
+GHOST_NDOFManager::GHOST_NDOFManager(GHOST_System &sys)
+    : m_system(sys),
+      m_deviceType(NDOF_UnknownDevice),  /* each platform has its own device detection code */
+      m_buttonCount(genericButtonCount),
+      m_buttonMask(0),
+      m_hidMap(Generic_HID_map),
+      m_buttons(0),
+      m_motionTime(0),
+      m_prevMotionTime(0),
+      m_motionState(GHOST_kNotStarted),
+      m_motionEventPending(false),
+      m_deadZone(0.0f)
 {
 	// to avoid the rare situation where one triple is updated and
 	// the other is not, initialize them both here:
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
index 98aebfa..0b2080e 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.h
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -105,7 +105,7 @@ typedef enum {
 class GHOST_NDOFManager
 {
 public:
-	GHOST_NDOFManager(GHOST_System&);
+	GHOST_NDOFManager(GHOST_System &);
 
 	virtual ~GHOST_NDOFManager() {}
 
diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
index 1a02925..6eedaaf 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
+++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
@@ -30,7 +30,7 @@
 extern "C" {
 	#include <ConnexionClientAPI.h>
 	#include <stdio.h>
-	}
+}
 
 
 // static functions need to talk to these objects:
diff --git a/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp b/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
index 939e127..6c16279 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
@@ -28,7 +28,7 @@
 
 
 GHOST_NDOFManagerWin32::GHOST_NDOFManagerWin32(GHOST_System& sys)
-	: GHOST_NDOFManager(sys)
+    : GHOST_NDOFManager(sys)
 {
 	setDeadZone(0.1f);
 }
diff --git a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
index 77e09e7..8e6f999 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
@@ -30,9 +30,8 @@
 
 
 GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
-	:
-	GHOST_NDOFManager(sys),
-	m_available(false)
+    : GHOST_NDOFManager(sys),
+      m_available(false)
 {
 	setDeadZone(0.1f); /* how to calibrate on Linux? throw away slight motion! */
 
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index 023c595..d1f2d5d 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -45,13 +45,13 @@
 
 
 GHOST_System::GHOST_System()
-	: m_nativePixel(false),
-	m_displayManager(NULL),
-	m_timerManager(NULL),
-	m_windowManager(NULL),
-	m_eventManager(NULL)
+    : m_nativePixel(false),
+      m_displayManager(NULL),
+      m_timerManager(NULL),
+      m_windowManager(NULL),
+      m_eventManager(NULL)
 #ifdef WITH_INPUT_NDOF
-	, m_ndofManager(0)
+      , m_ndofManager(0)
 #endif
 {
 }
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 8f1f986..e347661 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -85,9 +85,9 @@ using namespace std;
 
 GHOST_SystemX11::
 GHOST_SystemX11(
-    ) :
-	GHOST_System(),
-	m_start_time(0)
+        )
+    : GHOST_System(),
+      m_start_time(0)
 {
 	m_display = XOpenDisplay(NULL);
 	
diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp
index 6c2d735..3673831 100644
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@ -41,19 +41,18 @@
 #include <assert.h>
 
 GHOST_Window::GHOST_Window(
-    GHOST_TUns32 width, GHOST_TUns32 height,
-    GHOST_TWindowState state,
-    GHOST_TDrawingContextType type,
-    const bool stereoVisual,
-    const bool exclusive,
-    const GHOST_TUns16 numOfAASamples)
-	:
-	m_drawingContextType(type),
-	m_cursorVisible(true),
-	m_cursorGrab(GHOST_kGrabDisable),
-	m_cursorShape(GHOST_kStandardCursorDefault),
-	m_stereoVisual(stereoVisual),
-	m_numOfAASamples(numOfAASamples)
+        GHOST_TUns32 width, GHOST_TUns32 height,
+        GHOST_TWindowState state,
+        GHOST_TDrawingContextType type,
+        const bool stereoVisual,
+        const bool exclusive,
+        const GHOST_TUns16 numOfAASamples)
+    : m_drawingContextType(type),
+      m_cursorVisible(true),
+      m_cursorGrab(GHOST_kGrabDisable),
+      m_cursorShape(GHOST_kStandardCursorDefault),
+      m_stereoVisual(stereoVisual),
+      m_numOfAASamples(numOfAASamples)
 {
 	m_isUnsavedChanges = false;
 	m_canAcceptDragOperation = false;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 29ba1ff..9f835f9 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -161,30 +161,29 @@ GLXContext GHOST_WindowX11::s_firstContext = NULL;
 
 GHOST_WindowX11::
 GHOST_WindowX11(
-    GHOST_SystemX11 *system,
-    Display *display,
-    const STR_String& title,
-    GHOST_TInt32 left,
-    GHOST_TInt32 top,
-    GHOST_TUns32 width,
-    GHOST_TUns32 height,
-    GHOST_TWindowState state,
-    const GHOST_TEmbedderWindowID parentWindow,
-    GHOST_TDrawingContextType type,
-    const bool stereoVisual,
-    const bool exclusive,
-    const GHOST_TUns16 numOfAASamples
-    ) :
-	GHOST_Window(width, height, state, type, stereoVisual, exclusive, numOfAASamples),
-	m_context(NULL),
-	m_display(display),
-	m_normal_state(GHOST_kWindowStateNormal),
-	m_system(system),
-	m_valid_setup(false),
-	m_invalid_window(false),
-	m_empty_cursor(None),
-	m_custom_cursor(None),
-	m_visible_cursor(None)
+        GHOST_SystemX11 *system,
+        Display *display,
+        const STR_String& title,
+        GHOST_TInt32 left,
+        GHOST_TInt32 top,
+        GHOST_TUns32 width,
+        GHOST_TUns32 height,
+        GHOST_TWindowState state,
+        const GHOST_TEmbedderWindowID parentWindow,
+        GHOST_TDrawingContextType type,
+        const bool stereoVisual,
+        const bool exclusive,
+        const GHOST_TUns16 numOfAASamples)
+    : GHOST_Window(width, height, state, type, stereoVisual, exclusive, numOfAASamples),
+      m_context(NULL),
+      m_display(display),
+      m_normal_state(GHOST_kWindowStateNormal),
+      m_system(system),
+      m_valid_setup(false),
+      m_invalid_window(false),
+      m_empty_cursor(None),
+      m_custom_cursor(None),
+      m_visible_cursor(None)
 {
 	
 	/* Set up the minimum atrributes that we require and see if




More information about the Bf-blender-cvs mailing list