[Bf-blender-cvs] [a5788a9] master: Cleanup: brace-placement

Campbell Barton noreply at git.blender.org
Thu Jun 9 23:51:22 CEST 2016


Commit: a5788a9c477cdafbd2d3e31a458b6aaebb474efb
Author: Campbell Barton
Date:   Fri Jun 10 07:45:39 2016 +1000
Branches: master
https://developer.blender.org/rBa5788a9c477cdafbd2d3e31a458b6aaebb474efb

Cleanup: brace-placement

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

M	intern/ghost/intern/GHOST_ContextGLX.cpp
M	intern/ghost/intern/GHOST_ContextWGL.cpp
M	intern/ghost/intern/GHOST_DropTargetWin32.cpp
M	intern/ghost/intern/GHOST_EventManager.cpp
M	intern/ghost/intern/GHOST_NDOFManager.cpp
M	intern/ghost/intern/GHOST_SystemPathsWin32.cpp
M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	intern/ghost/intern/GHOST_SystemX11.cpp

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

diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index 4b735bb..d4f67da 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -287,8 +287,7 @@ const bool GLXEW_ARB_create_context_robustness =
 		attribs[i++] = 0;
 
 		/* Create a GL 3.x context */
-		if (m_fbconfig)
-		{
+		if (m_fbconfig) {
 			m_context = glXCreateContextAttribsARB(m_display, m_fbconfig, s_sharedContext, true, attribs);
 		}
 		else {
diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index 75e2f94..eeb6a24 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -63,7 +63,7 @@ static bool is_crappy_intel_card()
 
 GHOST_ContextWGL::GHOST_ContextWGL(
         bool stereoVisual,
-		bool alphaBackground,
+        bool alphaBackground,
         GHOST_TUns16 numOfAASamples,
         HWND hWnd,
         HDC hDC,
@@ -79,7 +79,7 @@ GHOST_ContextWGL::GHOST_ContextWGL(
       m_contextMajorVersion(contextMajorVersion),
       m_contextMinorVersion(contextMinorVersion),
       m_contextFlags(contextFlags),
-	  m_alphaBackground(alphaBackground),
+      m_alphaBackground(alphaBackground),
       m_contextResetNotificationStrategy(contextResetNotificationStrategy),
       m_hGLRC(NULL)
 #ifdef WITH_GLEW_MX
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.cpp b/intern/ghost/intern/GHOST_DropTargetWin32.cpp
index 96ff79a..cbf37bf 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.cpp
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.cpp
@@ -125,8 +125,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject *pDataObject, DWO
  */
 HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
-	if (m_window->canAcceptDragOperation())
-	{
+	if (m_window->canAcceptDragOperation()) {
 		*pdwEffect = allowedDropEffect(*pdwEffect);
 	}
 	else {
@@ -154,8 +153,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragLeave(void)
 HRESULT __stdcall GHOST_DropTargetWin32::Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
 	void *data = getGhostData(pDataObject);
-	if (m_window->canAcceptDragOperation())
-	{
+	if (m_window->canAcceptDragOperation()) {
 		*pdwEffect = allowedDropEffect(*pdwEffect);
 
 	}
@@ -189,15 +187,13 @@ GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject *pDataObje
 	 * conversion, but we do the conversion ourself with WC_NO_BEST_FIT_CHARS.
 	 */
 	FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
-	if (pDataObject->QueryGetData(&fmtetc) == S_OK)
-	{
+	if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
 		return GHOST_kDragnDropTypeString;
 	}
 
 	// Filesnames
 	fmtetc.cfFormat = CF_HDROP;
-	if (pDataObject->QueryGetData(&fmtetc) == S_OK)
-	{
+	if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
 		return GHOST_kDragnDropTypeFilenames;
 	}
 
diff --git a/intern/ghost/intern/GHOST_EventManager.cpp b/intern/ghost/intern/GHOST_EventManager.cpp
index bc531bd..0675ac7 100644
--- a/intern/ghost/intern/GHOST_EventManager.cpp
+++ b/intern/ghost/intern/GHOST_EventManager.cpp
@@ -167,11 +167,9 @@ void GHOST_EventManager::removeWindowEvents(GHOST_IWindow *window)
 {
 	TEventStack::iterator iter;
 	iter = m_events.begin();
-	while (iter != m_events.end())
-	{
+	while (iter != m_events.end()) {
 		GHOST_IEvent *event = *iter;
-		if (event->getWindow() == window)
-		{
+		if (event->getWindow() == window) {
 			GHOST_PRINT("GHOST_EventManager::removeWindowEvents(): removing event\n");
 			/*
 			 * Found an event for this window, remove it.
@@ -191,11 +189,9 @@ void GHOST_EventManager::removeTypeEvents(GHOST_TEventType type, GHOST_IWindow *
 {
 	TEventStack::iterator iter;
 	iter = m_events.begin();
-	while (iter != m_events.end())
-	{
+	while (iter != m_events.end()) {
 		GHOST_IEvent *event = *iter;
-		if ((event->getType() == type) && (!window || (event->getWindow() == window)))
-		{
+		if ((event->getType() == type) && (!window || (event->getWindow() == window))) {
 			GHOST_PRINT("GHOST_EventManager::removeTypeEvents(): removing event\n");
 			/*
 			 * Found an event of this type for the window, remove it.
diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp
index f18b791..c8e14ad 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManager.cpp
@@ -378,8 +378,7 @@ void GHOST_NDOFManager::updateButton(int button_number, bool press, GHOST_TUns64
 
 	NDOF_ButtonT button = (button_number < m_buttonCount) ? m_hidMap[button_number] : NDOF_BUTTON_NONE;
 
-	switch (button)
-	{
+	switch (button) {
 		case NDOF_BUTTON_NONE:
 #ifdef DEBUG_NDOF_BUTTONS
 			printf("discarded\n");
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
index 2bd3800..7d0ce51 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
@@ -76,8 +76,7 @@ const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *version
 
 	HRESULT hResult = SHGetFolderPathW(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath_16);
 
-	if (hResult == S_OK)
-	{
+	if (hResult == S_OK) {
 		conv_utf_16_to_8(knownpath_16, knownpath, MAX_PATH * 3);
 		strcat(knownpath, "\\Blender Foundation\\Blender\\");
 		strcat(knownpath, versionstr);
@@ -94,8 +93,7 @@ const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionst
 
 	HRESULT hResult = SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath_16);
 
-	if (hResult == S_OK)
-	{
+	if (hResult == S_OK) {
 		conv_utf_16_to_8(knownpath_16, knownpath, MAX_PATH * 3);
 		strcat(knownpath, "\\Blender Foundation\\Blender\\");
 		strcat(knownpath, versionstr);
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index ed08ce0..1ce8002 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1545,8 +1545,7 @@ static bool isStartedFromCommandPrompt()
 
 int GHOST_SystemWin32::toggleConsole(int action)
 {
-	switch (action)
-	{
+	switch (action) {
 		case 3: // startup: hide if not started from command prompt
 		{
 			if (isStartedFromCommandPrompt()) {
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 25daa8c..aeda95d 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -420,8 +420,7 @@ static Bool init_timestamp_scanner(Display *, XEvent *event, XPointer arg)
 {
 	init_timestamp_data *data =
 	    reinterpret_cast<init_timestamp_data *>(arg);
-	switch (event->type)
-	{
+	switch (event->type) {
 		case ButtonPress:
 		case ButtonRelease:
 			data->timestamp = event->xbutton.time;
@@ -1964,8 +1963,7 @@ int GHOST_X11_ApplicationIOErrorHandler(Display * /*display*/)
 static bool match_token(const char *haystack, const char *needle)
 {
 	const char *p, *q;
-	for (p = haystack; *p; )
-	{
+	for (p = haystack; *p; ) {
 		while (*p && isspace(*p))
 			p++;
 		if (!*p)




More information about the Bf-blender-cvs mailing list