[Bf-blender-cvs] [1b1129f82a9] blender-v2.90-release: Code Style: use "#pragma once" in intern/ghost
Jacques Lucke
noreply at git.blender.org
Fri Aug 7 10:20:40 CEST 2020
Commit: 1b1129f82a9cf316b54fbc025f8cfcc1a74b8589
Author: Jacques Lucke
Date: Fri Aug 7 10:18:01 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rB1b1129f82a9cf316b54fbc025f8cfcc1a74b8589
Code Style: use "#pragma once" in intern/ghost
More information can be found in D8466.
===================================================================
M intern/ghost/GHOST_C-api.h
M intern/ghost/GHOST_IContext.h
M intern/ghost/GHOST_IEvent.h
M intern/ghost/GHOST_IEventConsumer.h
M intern/ghost/GHOST_ISystem.h
M intern/ghost/GHOST_ISystemPaths.h
M intern/ghost/GHOST_ITimerTask.h
M intern/ghost/GHOST_IWindow.h
M intern/ghost/GHOST_IXrContext.h
M intern/ghost/GHOST_Path-api.h
M intern/ghost/GHOST_Rect.h
M intern/ghost/GHOST_Types.h
M intern/ghost/intern/GHOST_Buttons.h
M intern/ghost/intern/GHOST_CallbackEventConsumer.h
M intern/ghost/intern/GHOST_Context.h
M intern/ghost/intern/GHOST_ContextCGL.h
M intern/ghost/intern/GHOST_ContextD3D.h
M intern/ghost/intern/GHOST_ContextEGL.h
M intern/ghost/intern/GHOST_ContextGLX.h
M intern/ghost/intern/GHOST_ContextNone.h
M intern/ghost/intern/GHOST_ContextSDL.h
M intern/ghost/intern/GHOST_ContextWGL.h
M intern/ghost/intern/GHOST_Debug.h
M intern/ghost/intern/GHOST_DisplayManager.h
M intern/ghost/intern/GHOST_DisplayManagerCocoa.h
M intern/ghost/intern/GHOST_DisplayManagerNULL.h
M intern/ghost/intern/GHOST_DisplayManagerSDL.h
M intern/ghost/intern/GHOST_DisplayManagerWin32.h
M intern/ghost/intern/GHOST_DisplayManagerX11.h
M intern/ghost/intern/GHOST_DropTargetWin32.h
M intern/ghost/intern/GHOST_DropTargetX11.h
M intern/ghost/intern/GHOST_Event.h
M intern/ghost/intern/GHOST_EventButton.h
M intern/ghost/intern/GHOST_EventCursor.h
M intern/ghost/intern/GHOST_EventDragnDrop.h
M intern/ghost/intern/GHOST_EventKey.h
M intern/ghost/intern/GHOST_EventManager.h
M intern/ghost/intern/GHOST_EventNDOF.h
M intern/ghost/intern/GHOST_EventPrinter.h
M intern/ghost/intern/GHOST_EventString.h
M intern/ghost/intern/GHOST_EventTrackpad.h
M intern/ghost/intern/GHOST_EventWheel.h
M intern/ghost/intern/GHOST_IXrGraphicsBinding.h
M intern/ghost/intern/GHOST_IconX11.h
M intern/ghost/intern/GHOST_ImeWin32.h
M intern/ghost/intern/GHOST_ModifierKeys.h
M intern/ghost/intern/GHOST_NDOFManager.h
M intern/ghost/intern/GHOST_NDOFManagerCocoa.h
M intern/ghost/intern/GHOST_NDOFManagerUnix.h
M intern/ghost/intern/GHOST_NDOFManagerWin32.h
M intern/ghost/intern/GHOST_System.h
M intern/ghost/intern/GHOST_SystemCocoa.h
M intern/ghost/intern/GHOST_SystemNULL.h
M intern/ghost/intern/GHOST_SystemPaths.h
M intern/ghost/intern/GHOST_SystemPathsCocoa.h
M intern/ghost/intern/GHOST_SystemPathsUnix.h
M intern/ghost/intern/GHOST_SystemPathsWin32.h
M intern/ghost/intern/GHOST_SystemSDL.h
M intern/ghost/intern/GHOST_SystemWayland.h
M intern/ghost/intern/GHOST_SystemWin32.h
M intern/ghost/intern/GHOST_SystemX11.h
M intern/ghost/intern/GHOST_TaskbarWin32.h
M intern/ghost/intern/GHOST_TaskbarX11.h
M intern/ghost/intern/GHOST_TimerManager.h
M intern/ghost/intern/GHOST_TimerTask.h
M intern/ghost/intern/GHOST_Window.h
M intern/ghost/intern/GHOST_WindowCocoa.h
M intern/ghost/intern/GHOST_WindowManager.h
M intern/ghost/intern/GHOST_WindowNULL.h
M intern/ghost/intern/GHOST_WindowSDL.h
M intern/ghost/intern/GHOST_WindowWayland.h
M intern/ghost/intern/GHOST_WindowWin32.h
M intern/ghost/intern/GHOST_WindowX11.h
M intern/ghost/intern/GHOST_XrContext.h
M intern/ghost/intern/GHOST_XrException.h
M intern/ghost/intern/GHOST_XrSession.h
M intern/ghost/intern/GHOST_XrSwapchain.h
M intern/ghost/intern/GHOST_Xr_intern.h
M intern/ghost/intern/GHOST_Xr_openxr_includes.h
===================================================================
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index 92061f55128..f23742a9166 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -21,8 +21,7 @@
* \brief GHOST C-API function and type declarations.
*/
-#ifndef __GHOST_C_API_H__
-#define __GHOST_C_API_H__
+#pragma once
#include "GHOST_Types.h"
@@ -1072,5 +1071,3 @@ GHOST_TSuccess GHOST_XrEventsHandle(GHOST_XrContextHandle xr_context);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/intern/ghost/GHOST_IContext.h b/intern/ghost/GHOST_IContext.h
index 8c24261644a..c6316e90ce4 100644
--- a/intern/ghost/GHOST_IContext.h
+++ b/intern/ghost/GHOST_IContext.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_IContext interface class.
*/
-#ifndef __GHOST_IContext_H__
-#define __GHOST_IContext_H__
+#pragma once
#include "GHOST_Types.h"
@@ -63,5 +62,3 @@ class GHOST_IContext {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IContext")
#endif
};
-
-#endif // __GHOST_IContext_H__
diff --git a/intern/ghost/GHOST_IEvent.h b/intern/ghost/GHOST_IEvent.h
index 0d9bfb2c4de..c63064c123a 100644
--- a/intern/ghost/GHOST_IEvent.h
+++ b/intern/ghost/GHOST_IEvent.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_IEvent interface class.
*/
-#ifndef __GHOST_IEVENT_H__
-#define __GHOST_IEVENT_H__
+#pragma once
#include "GHOST_Types.h"
#include <stddef.h>
@@ -78,5 +77,3 @@ class GHOST_IEvent {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEvent")
#endif
};
-
-#endif // __GHOST_IEVENT_H__
diff --git a/intern/ghost/GHOST_IEventConsumer.h b/intern/ghost/GHOST_IEventConsumer.h
index d677a632a4b..b5975068da0 100644
--- a/intern/ghost/GHOST_IEventConsumer.h
+++ b/intern/ghost/GHOST_IEventConsumer.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_IEventConsumer interface class.
*/
-#ifndef __GHOST_IEVENTCONSUMER_H__
-#define __GHOST_IEVENTCONSUMER_H__
+#pragma once
#include "GHOST_IEvent.h"
@@ -56,5 +55,3 @@ class GHOST_IEventConsumer {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEventConsumer")
#endif
};
-
-#endif /* __GHOST_IEVENTCONSUMER_H__ */
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
index 33600fd1219..04e9d5e4e14 100644
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@ -24,8 +24,7 @@
* Contains the doxygen documentation main page.
*/
-#ifndef __GHOST_ISYSTEM_H__
-#define __GHOST_ISYSTEM_H__
+#pragma once
#include <stdlib.h>
@@ -494,5 +493,3 @@ class GHOST_ISystem {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystem")
#endif
};
-
-#endif // __GHOST_ISYSTEM_H__
diff --git a/intern/ghost/GHOST_ISystemPaths.h b/intern/ghost/GHOST_ISystemPaths.h
index 297f6333a77..b47d14984d8 100644
--- a/intern/ghost/GHOST_ISystemPaths.h
+++ b/intern/ghost/GHOST_ISystemPaths.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_ISYSTEMPATHS_H__
-#define __GHOST_ISYSTEMPATHS_H__
+#pragma once
#include "GHOST_Types.h"
@@ -97,5 +96,3 @@ class GHOST_ISystemPaths {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystemPaths")
#endif
};
-
-#endif
diff --git a/intern/ghost/GHOST_ITimerTask.h b/intern/ghost/GHOST_ITimerTask.h
index 46f4fdbc303..0f4ac74c466 100644
--- a/intern/ghost/GHOST_ITimerTask.h
+++ b/intern/ghost/GHOST_ITimerTask.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_ITimerTask interface class.
*/
-#ifndef __GHOST_ITIMERTASK_H__
-#define __GHOST_ITIMERTASK_H__
+#pragma once
#include "GHOST_Types.h"
@@ -76,5 +75,3 @@ class GHOST_ITimerTask {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ITimerTask")
#endif
};
-
-#endif // __GHOST_ITIMERTASK_H__
diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index 9c72b6f07f9..6e8b61ae5a1 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_IWindow interface class.
*/
-#ifndef __GHOST_IWINDOW_H__
-#define __GHOST_IWINDOW_H__
+#pragma once
#include "GHOST_Rect.h"
#include "GHOST_Types.h"
@@ -363,5 +362,3 @@ class GHOST_IWindow {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow")
#endif
};
-
-#endif // __GHOST_IWINDOW_H__
diff --git a/intern/ghost/GHOST_IXrContext.h b/intern/ghost/GHOST_IXrContext.h
index 3076de96690..dd266a3b6ae 100644
--- a/intern/ghost/GHOST_IXrContext.h
+++ b/intern/ghost/GHOST_IXrContext.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_IXRCONTEXT_H__
-#define __GHOST_IXRCONTEXT_H__
+#pragma once
#include "GHOST_Types.h"
@@ -40,5 +39,3 @@ class GHOST_IXrContext {
virtual bool needsUpsideDownDrawing() const = 0;
};
-
-#endif // __GHOST_IXRCONTEXT_H__
diff --git a/intern/ghost/GHOST_Path-api.h b/intern/ghost/GHOST_Path-api.h
index 53abdf68bb4..4cc232be6b6 100644
--- a/intern/ghost/GHOST_Path-api.h
+++ b/intern/ghost/GHOST_Path-api.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_PATH_API_H__
-#define __GHOST_PATH_API_H__
+#pragma once
#include "GHOST_Types.h"
@@ -71,5 +70,3 @@ extern void GHOST_addToSystemRecentFiles(const char *filename);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h
index 13632a1c03b..fcc9da20197 100644
--- a/intern/ghost/GHOST_Rect.h
+++ b/intern/ghost/GHOST_Rect.h
@@ -22,8 +22,7 @@
* Macro's used in GHOST debug target.
*/
-#ifndef __GHOST_RECT_H__
-#define __GHOST_RECT_H__
+#pragma once
#include "GHOST_Types.h"
@@ -263,5 +262,3 @@ inline bool GHOST_Rect::isInside(GHOST_TInt32 x, GHOST_TInt32 y) const
{
return (x >= m_l) && (x <= m_r) && (y >= m_t) && (y <= m_b);
}
-
-#endif // __GHOST_RECT_H__
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index b8de31df6c6..5f0516ae121 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_TYPES_H__
-#define __GHOST_TYPES_H__
+#pragma once
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
@@ -677,5 +676,3 @@ typedef struct GHOST_XrError {
} GHOST_XrError;
#endif
-
-#endif // __GHOST_TYPES_H__
diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h
index 0b824739950..e28fae8870c 100644
--- a/intern/ghost/intern/GHOST_Buttons.h
+++ b/intern/ghost/intern/GHOST_Buttons.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Buttons struct.
*/
-#ifndef __GHOST_BUTTONS_H__
-#define __GHOST_BUTTONS_H__
+#pragma once
#include "GHOST_Types.h"
@@ -62,5 +61,3 @@ struct GHOST_Buttons {
GHOST_TUns8 m_ButtonMiddle : 1;
GHOST_TUns8 m_ButtonRight : 1;
};
-
-#endif // __GHOST_BUTTONS_H__
diff --git a/intern/ghost/intern/GHOST_CallbackEventConsumer.h b/intern/ghost/intern/GHOST_CallbackEventConsumer.h
index 9c3fc642209..a1664e77717 100644
--- a/intern/ghost/intern/GHOST_CallbackEventConsumer.h
+++ b/intern/ghost/intern/GHOST_CallbackEventConsumer.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_CallbackEventConsumer class.
*/
-#ifndef __GHOST_CALLBACKEVENTCONSUMER_H__
-#define __GHOST_CALLBACKEVENTCONSUMER_H__
+#pragma once
#include "GHOST_C-api.h"
#include "GHOST_IEventConsumer.h"
@@ -66,5 +65,3 @@ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_CallbackEventConsumer")
#endif
};
-
-#endif // __GHOST_CALLBACKEVENTCONSUMER_H__
diff --git a/intern/ghost/intern/GHOST_Context.h b/intern/ghost/intern/GHOST_Context.h
index 411a7de5c79..33eeacbb203 100644
--- a/intern/ghost/intern/GHOST_Context.h
+++ b/intern/ghost/intern/GHOST_Context.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Context class.
*/
-#ifndef __GHOST_CONTEXT_H__
-#define __GHOST_CONTEXT_H__
+#pragma once
#include "GHOST_IContext.h"
#include "GHOST_Types.h"
@@ -160,5 +159,3 @@ bool win32_silent_chk(bool result);
# define WIN32_CHK_SILENT(x, silent) ((silent) ? win32_silent_chk(x) : WIN32_CHK(x))
#endif /* _WIN32 */
-
-#endif // __GHOST_CONTEXT_H__
diff --git a/intern/ghost/intern/GHOST_ContextCGL.h b/intern/ghost/intern/GHOST_ContextCGL.h
index 37c1ac34299..7b1e186dede 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.h
+++ b/intern/ghost/intern/GHOST_ContextCGL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTCGL_H__
-#define __GHOST_CONTEXTCGL_H__
+#pragma once
#include "GHOST_Context.h"
@@ -137,5 +136,3 @@ class GHOST_ContextCGL : public GHOST_Context {
void metalUpdateFramebuffer();
void metalSwapBuffers();
};
-
-#endif // __GHOST_CONTEXTCGL_H__
diff --git a/intern/ghost/intern/GHOST_ContextD3D.h b/intern/ghost/intern/GHOST_ContextD3D.h
index c482992a6e2..e85516838fc 100644
--- a/intern/ghost/intern/GHOST_ContextD3D.h
+++ b/intern/ghost/intern/GHOST_ContextD3D.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTD3D_H__
-#define __GHOST_CONTEXTD3D_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -132,5 +131,3 @@ class GHOST_ContextD3D : public GHOST_Context {
ID3D11Device *m_device;
ID3D11DeviceContext *m_device_ctx;
};
-
-#endif /* __GHOST_CONTEXTD3D_H__ */
diff --git a/intern/ghost/intern/GHOST_ContextEGL.h b/intern/ghost/intern/GHOST_ContextEGL.h
index da5ca7ef93f..e5dae0d22a8 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.h
+++ b/intern/ghost/intern/GHOST_ContextEGL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTEGL_H__
-#define __GHOST_CONTEXTEGL_H__
+#pragma once
#include "GHOST_Context.h"
@@ -137,5 +136,3 @@ class GHOST_ContextEGL : public GHOST_Context {
static HMODULE s_d3dcompiler;
#endif
};
-
-#endif // __GHOST_CONTEXTEGL_H__
diff --git a/intern/ghost/intern/GHOST_ContextGLX.h b/intern/ghost/intern/GHOST_ContextGLX.h
index 07d2601cd17..e5654b1aed7 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.h
+++ b/intern/ghost/intern/GHOST_ContextGLX.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTGLX_H__
-#define __GHOST_CONTEXTGLX_H__
+#pragma once
#include "GHOST_Context.h"
@@ -128,5 +127,3 @@ class GHOST_ContextGLX : public GHOST_Context {
/* used to get GLX info */
int GHOST_X11_GL_GetAttributes(
int *attribs, int attribs_max, bool is_stereo_visual, bool need_alpha, bool for_fb_config);
-
-#endif // __GHOST_CONTEXTGLX_H__
diff --git a/intern/ghost/intern/GHOST_ContextNone.h b/intern/ghost/intern/GHOST_ContextNone.h
index 2a3c08701b4..b1ac34
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list