Code cleanup: ghost style

This commit is contained in:
Campbell Barton
2014-07-24 21:39:27 +10:00
parent 638bb78507
commit b7b1c09766
12 changed files with 67 additions and 73 deletions

View File

@@ -40,9 +40,8 @@
#include "GHOST_Debug.h"
GHOST_DisplayManager::GHOST_DisplayManager(
void)
: m_settingsInitialized(false)
GHOST_DisplayManager::GHOST_DisplayManager(void)
: m_settingsInitialized(false)
{
}

View File

@@ -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));

View File

@@ -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. */
}

View File

@@ -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:

View File

@@ -105,7 +105,7 @@ typedef enum {
class GHOST_NDOFManager
{
public:
GHOST_NDOFManager(GHOST_System&);
GHOST_NDOFManager(GHOST_System &);
virtual ~GHOST_NDOFManager() {}

View File

@@ -30,7 +30,7 @@
extern "C" {
#include <ConnexionClientAPI.h>
#include <stdio.h>
}
}
// static functions need to talk to these objects:

View File

@@ -28,7 +28,7 @@
GHOST_NDOFManagerWin32::GHOST_NDOFManagerWin32(GHOST_System& sys)
: GHOST_NDOFManager(sys)
: GHOST_NDOFManager(sys)
{
setDeadZone(0.1f);
}

View File

@@ -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! */

View File

@@ -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
{
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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