Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern')
-rw-r--r--intern/ghost/intern/GHOST_Buttons.h5
-rw-r--r--intern/ghost/intern/GHOST_CallbackEventConsumer.h5
-rw-r--r--intern/ghost/intern/GHOST_Context.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextD3D.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextEGL.cpp2
-rw-r--r--intern/ghost/intern/GHOST_ContextEGL.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextNone.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextWGL.h5
-rw-r--r--intern/ghost/intern/GHOST_Debug.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManager.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerNULL.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerX11.h5
-rw-r--r--intern/ghost/intern/GHOST_DropTargetWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_DropTargetX11.h5
-rw-r--r--intern/ghost/intern/GHOST_Event.h5
-rw-r--r--intern/ghost/intern/GHOST_EventButton.h5
-rw-r--r--intern/ghost/intern/GHOST_EventCursor.h5
-rw-r--r--intern/ghost/intern/GHOST_EventDragnDrop.h5
-rw-r--r--intern/ghost/intern/GHOST_EventKey.h5
-rw-r--r--intern/ghost/intern/GHOST_EventManager.h5
-rw-r--r--intern/ghost/intern/GHOST_EventNDOF.h5
-rw-r--r--intern/ghost/intern/GHOST_EventPrinter.h5
-rw-r--r--intern/ghost/intern/GHOST_EventString.h5
-rw-r--r--intern/ghost/intern/GHOST_EventTrackpad.h5
-rw-r--r--intern/ghost/intern/GHOST_EventWheel.h5
-rw-r--r--intern/ghost/intern/GHOST_IXrGraphicsBinding.h5
-rw-r--r--intern/ghost/intern/GHOST_IconX11.h5
-rw-r--r--intern/ghost/intern/GHOST_ImeWin32.h4
-rw-r--r--intern/ghost/intern/GHOST_ModifierKeys.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerUnix.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_System.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemNULL.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPaths.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsUnix.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp8
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp6
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h5
-rw-r--r--intern/ghost/intern/GHOST_TaskbarWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_TaskbarX11.h5
-rw-r--r--intern/ghost/intern/GHOST_TimerManager.h5
-rw-r--r--intern/ghost/intern/GHOST_TimerTask.h5
-rw-r--r--intern/ghost/intern/GHOST_Window.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowManager.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowNULL.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp22
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.h5
-rw-r--r--intern/ghost/intern/GHOST_XrContext.h5
-rw-r--r--intern/ghost/intern/GHOST_XrException.h5
-rw-r--r--intern/ghost/intern/GHOST_XrSession.h5
-rw-r--r--intern/ghost/intern/GHOST_XrSwapchain.h5
-rw-r--r--intern/ghost/intern/GHOST_Xr_intern.h5
-rw-r--r--intern/ghost/intern/GHOST_Xr_openxr_includes.h5
71 files changed, 89 insertions, 282 deletions
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.cpp b/intern/ghost/intern/GHOST_ContextEGL.cpp
index 02daad2111a..bac7057d953 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextEGL.cpp
@@ -118,7 +118,7 @@ static const char *get_egl_error_message_string(EGLint error)
case EGL_CONTEXT_LOST:
return (
"A power management event has occurred. "
- "The application must destroy all contexts and reinitialise OpenGL ES state "
+ "The application must destroy all contexts and reinitialize OpenGL ES state "
"and objects to continue rendering.");
default:
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..b1ac349e4a7 100644
--- a/intern/ghost/intern/GHOST_ContextNone.h
+++ b/intern/ghost/intern/GHOST_ContextNone.h
@@ -23,8 +23,7 @@
* Declaration of GHOST_Context class.
*/
-#ifndef __GHOST_CONTEXTNONE_H__
-#define __GHOST_CONTEXTNONE_H__
+#pragma once
#include "GHOST_Context.h"
@@ -86,5 +85,3 @@ class GHOST_ContextNone : public GHOST_Context {
private:
int m_swapInterval;
};
-
-#endif // __GHOST_CONTEXTNONE_H__
diff --git a/intern/ghost/intern/GHOST_ContextSDL.h b/intern/ghost/intern/GHOST_ContextSDL.h
index 670d930e1e7..ead2e91181c 100644
--- a/intern/ghost/intern/GHOST_ContextSDL.h
+++ b/intern/ghost/intern/GHOST_ContextSDL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTSDL_H__
-#define __GHOST_CONTEXTSDL_H__
+#pragma once
#include "GHOST_Context.h"
@@ -121,5 +120,3 @@ class GHOST_ContextSDL : public GHOST_Context {
static SDL_GLContext s_sharedContext;
static int s_sharedCount;
};
-
-#endif // __GHOST_CONTEXTSDL_H__
diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h
index a8d2c18b463..087fca100e4 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.h
+++ b/intern/ghost/intern/GHOST_ContextWGL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTWGL_H__
-#define __GHOST_CONTEXTWGL_H__
+#pragma once
//#define WIN32_COMPOSITING
@@ -130,5 +129,3 @@ class GHOST_ContextWGL : public GHOST_Context {
static HGLRC s_sharedHGLRC;
static int s_sharedCount;
};
-
-#endif // __GHOST_CONTEXTWGL_H__
diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h
index 5b5c2688297..424f95aa573 100644
--- a/intern/ghost/intern/GHOST_Debug.h
+++ b/intern/ghost/intern/GHOST_Debug.h
@@ -22,8 +22,7 @@
* Macro's used in GHOST debug target.
*/
-#ifndef __GHOST_DEBUG_H__
-#define __GHOST_DEBUG_H__
+#pragma once
#ifdef _MSC_VER
# ifdef DEBUG
@@ -79,5 +78,3 @@
#else // WITH_GHOST_DEBUG
# define GHOST_ASSERT(x, info) ((void)0)
#endif // WITH_GHOST_DEBUG
-
-#endif // __GHOST_DEBUG_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManager.h b/intern/ghost/intern/GHOST_DisplayManager.h
index 58b36c0035b..67b9aada55f 100644
--- a/intern/ghost/intern/GHOST_DisplayManager.h
+++ b/intern/ghost/intern/GHOST_DisplayManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManager class.
*/
-#ifndef __GHOST_DISPLAYMANAGER_H__
-#define __GHOST_DISPLAYMANAGER_H__
+#pragma once
#include "GHOST_Types.h"
@@ -127,5 +126,3 @@ class GHOST_DisplayManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DisplayManager")
#endif
};
-
-#endif // __GHOST_DISPLAYMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
index c99e93279f7..5edd555a78b 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManagerCocoa class.
*/
-#ifndef __GHOST_DISPLAYMANAGERCOCOA_H__
-#define __GHOST_DISPLAYMANAGERCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple only!
@@ -93,5 +92,3 @@ class GHOST_DisplayManagerCocoa : public GHOST_DisplayManager {
/** Cached display id's for each display. */
// CGDirectDisplayID* m_displayIDs;
};
-
-#endif // __GHOST_DISPLAYMANAGERCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManagerNULL.h b/intern/ghost/intern/GHOST_DisplayManagerNULL.h
index 266a3e9a699..4ca06faec12 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerNULL.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerNULL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_DisplayManagerNULL class.
*/
-#ifndef __GHOST_DISPLAYMANAGERNULL_H__
-#define __GHOST_DISPLAYMANAGERNULL_H__
+#pragma once
#include "GHOST_DisplayManager.h"
#include "GHOST_SystemNULL.h"
@@ -58,5 +57,3 @@ class GHOST_DisplayManagerNULL : public GHOST_DisplayManager {
private:
GHOST_SystemNULL *m_system;
};
-
-#endif /* __GHOST_DISPLAYMANAGERNULL_H__ */
diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.h b/intern/ghost/intern/GHOST_DisplayManagerSDL.h
index f7704d57ab0..9a79a842057 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerSDL.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_DisplayManagerSDL class.
*/
-#ifndef __GHOST_DISPLAYMANAGERSDL_H__
-#define __GHOST_DISPLAYMANAGERSDL_H__
+#pragma once
#include "GHOST_DisplayManager.h"
@@ -58,5 +57,3 @@ class GHOST_DisplayManagerSDL : public GHOST_DisplayManager {
GHOST_SystemSDL *m_system;
SDL_DisplayMode m_mode;
};
-
-#endif /* __GHOST_DISPLAYMANAGERSDL_H__ */
diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.h b/intern/ghost/intern/GHOST_DisplayManagerWin32.h
index c4ad90b1de7..3392d515c16 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerWin32.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManagerWin32 class.
*/
-#ifndef __GHOST_DISPLAYMANAGERWIN32_H__
-#define __GHOST_DISPLAYMANAGERWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -87,5 +86,3 @@ class GHOST_DisplayManagerWin32 : public GHOST_DisplayManager {
protected:
};
-
-#endif // __GHOST_DISPLAYMANAGERWIN32_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.h b/intern/ghost/intern/GHOST_DisplayManagerX11.h
index 941152aa034..a36ff8d49f1 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerX11.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerX11.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManagerX11 class.
*/
-#ifndef __GHOST_DISPLAYMANAGERX11_H__
-#define __GHOST_DISPLAYMANAGERX11_H__
+#pragma once
#include "GHOST_DisplayManager.h"
@@ -86,5 +85,3 @@ class GHOST_DisplayManagerX11 : public GHOST_DisplayManager {
private:
GHOST_SystemX11 *m_system;
};
-
-#endif //
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index ee75c017981..ecce3a68835 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_DROPTARGETWIN32_H__
-#define __GHOST_DROPTARGETWIN32_H__
+#pragma once
#include "GHOST_SystemWin32.h"
#include "GHOST_WindowWin32.h"
@@ -150,5 +149,3 @@ class GHOST_DropTargetWin32 : public IDropTarget {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetWin32")
#endif
};
-
-#endif // __GHOST_DROPTARGETWIN32_H__
diff --git a/intern/ghost/intern/GHOST_DropTargetX11.h b/intern/ghost/intern/GHOST_DropTargetX11.h
index 9ca12442085..066f2f6bba2 100644
--- a/intern/ghost/intern/GHOST_DropTargetX11.h
+++ b/intern/ghost/intern/GHOST_DropTargetX11.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_DROPTARGETX11_H__
-#define __GHOST_DROPTARGETX11_H__
+#pragma once
#include "GHOST_SystemX11.h"
#include "GHOST_WindowX11.h"
@@ -126,5 +125,3 @@ class GHOST_DropTargetX11 {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetX11")
#endif
};
-
-#endif // __GHOST_DROPTARGETX11_H__
diff --git a/intern/ghost/intern/GHOST_Event.h b/intern/ghost/intern/GHOST_Event.h
index 2c14df7f243..845d62fa810 100644
--- a/intern/ghost/intern/GHOST_Event.h
+++ b/intern/ghost/intern/GHOST_Event.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Event class.
*/
-#ifndef __GHOST_EVENT_H__
-#define __GHOST_EVENT_H__
+#pragma once
#include "GHOST_IEvent.h"
@@ -90,5 +89,3 @@ class GHOST_Event : public GHOST_IEvent {
/** Pointer to the event data. */
GHOST_TEventDataPtr m_data;
};
-
-#endif // __GHOST_EVENT_H__
diff --git a/intern/ghost/intern/GHOST_EventButton.h b/intern/ghost/intern/GHOST_EventButton.h
index 4247ae150a4..7072e0c5409 100644
--- a/intern/ghost/intern/GHOST_EventButton.h
+++ b/intern/ghost/intern/GHOST_EventButton.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventButton class.
*/
-#ifndef __GHOST_EVENTBUTTON_H__
-#define __GHOST_EVENTBUTTON_H__
+#pragma once
#include "GHOST_Event.h"
#include "GHOST_Window.h"
@@ -57,5 +56,3 @@ class GHOST_EventButton : public GHOST_Event {
/** The button event data. */
GHOST_TEventButtonData m_buttonEventData;
};
-
-#endif // __GHOST_EVENTBUTTON_H__
diff --git a/intern/ghost/intern/GHOST_EventCursor.h b/intern/ghost/intern/GHOST_EventCursor.h
index 8ba657fd9fa..ba85cd74723 100644
--- a/intern/ghost/intern/GHOST_EventCursor.h
+++ b/intern/ghost/intern/GHOST_EventCursor.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventCursor class.
*/
-#ifndef __GHOST_EVENTCURSOR_H__
-#define __GHOST_EVENTCURSOR_H__
+#pragma once
#include "GHOST_Event.h"
@@ -58,5 +57,3 @@ class GHOST_EventCursor : public GHOST_Event {
/** The x,y-coordinates of the cursor position. */
GHOST_TEventCursorData m_cursorEventData;
};
-
-#endif // __GHOST_EVENTCURSOR_H__
diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h
index 36291e8a254..10975792993 100644
--- a/intern/ghost/intern/GHOST_EventDragnDrop.h
+++ b/intern/ghost/intern/GHOST_EventDragnDrop.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_EVENTDRAGNDROP_H__
-#define __GHOST_EVENTDRAGNDROP_H__
+#pragma once
#include "GHOST_Event.h"
extern "C" {
@@ -122,5 +121,3 @@ class GHOST_EventDragnDrop : public GHOST_Event {
/** The x,y-coordinates of the cursor position. */
GHOST_TEventDragnDropData m_dragnDropEventData;
};
-
-#endif // __GHOST_EVENTDRAGNDROP_H__
diff --git a/intern/ghost/intern/GHOST_EventKey.h b/intern/ghost/intern/GHOST_EventKey.h
index 8f59c555914..cb71b452d80 100644
--- a/intern/ghost/intern/GHOST_EventKey.h
+++ b/intern/ghost/intern/GHOST_EventKey.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventKey class.
*/
-#ifndef __GHOST_EVENTKEY_H__
-#define __GHOST_EVENTKEY_H__
+#pragma once
#include <string.h>
@@ -84,5 +83,3 @@ class GHOST_EventKey : public GHOST_Event {
/** The key event data. */
GHOST_TEventKeyData m_keyEventData;
};
-
-#endif // __GHOST_EVENTKEY_H__
diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h
index ada5abda89b..befbdc72a5c 100644
--- a/intern/ghost/intern/GHOST_EventManager.h
+++ b/intern/ghost/intern/GHOST_EventManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventManager class.
*/
-#ifndef __GHOST_EVENTMANAGER_H__
-#define __GHOST_EVENTMANAGER_H__
+#pragma once
#include <deque>
#include <vector>
@@ -140,5 +139,3 @@ class GHOST_EventManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_EventManager")
#endif
};
-
-#endif // __GHOST_EVENTMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h
index 196d3868ccd..64e67434b74 100644
--- a/intern/ghost/intern/GHOST_EventNDOF.h
+++ b/intern/ghost/intern/GHOST_EventNDOF.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_EVENTNDOF_H__
-#define __GHOST_EVENTNDOF_H__
+#pragma once
#ifndef WITH_INPUT_NDOF
# error NDOF code included in non-NDOF-enabled build
@@ -50,5 +49,3 @@ class GHOST_EventNDOFButton : public GHOST_Event {
m_data = &m_buttonData;
}
};
-
-#endif // __GHOST_EVENTNDOF_H__
diff --git a/intern/ghost/intern/GHOST_EventPrinter.h b/intern/ghost/intern/GHOST_EventPrinter.h
index ead16525ec6..42de4da5ee5 100644
--- a/intern/ghost/intern/GHOST_EventPrinter.h
+++ b/intern/ghost/intern/GHOST_EventPrinter.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventPrinter class.
*/
-#ifndef __GHOST_EVENTPRINTER_H__
-#define __GHOST_EVENTPRINTER_H__
+#pragma once
#include "GHOST_IEventConsumer.h"
@@ -48,5 +47,3 @@ class GHOST_EventPrinter : public GHOST_IEventConsumer {
*/
void getKeyString(GHOST_TKey key, char str[32]) const;
};
-
-#endif // __GHOST_EVENTPRINTER_H__
diff --git a/intern/ghost/intern/GHOST_EventString.h b/intern/ghost/intern/GHOST_EventString.h
index f0d3ffb9e91..8cd24a8a78b 100644
--- a/intern/ghost/intern/GHOST_EventString.h
+++ b/intern/ghost/intern/GHOST_EventString.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventString class.
*/
-#ifndef __GHOST_EVENTSTRING_H__
-#define __GHOST_EVENTSTRING_H__
+#pragma once
#include "GHOST_Event.h"
@@ -54,5 +53,3 @@ class GHOST_EventString : public GHOST_Event {
free(m_data);
}
};
-
-#endif // __GHOST_EVENTSTRING_H__
diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h
index 795e969b16d..a22f8a34fad 100644
--- a/intern/ghost/intern/GHOST_EventTrackpad.h
+++ b/intern/ghost/intern/GHOST_EventTrackpad.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventTrackpad class.
*/
-#ifndef __GHOST_EVENTTRACKPAD_H__
-#define __GHOST_EVENTTRACKPAD_H__
+#pragma once
#include "GHOST_Event.h"
@@ -61,5 +60,3 @@ class GHOST_EventTrackpad : public GHOST_Event {
/** The mouse pan data */
GHOST_TEventTrackpadData m_trackpadEventData;
};
-
-#endif // _GHOST_EVENT_PAN_H_
diff --git a/intern/ghost/intern/GHOST_EventWheel.h b/intern/ghost/intern/GHOST_EventWheel.h
index 4d3eeb9cd83..ea62e02d08d 100644
--- a/intern/ghost/intern/GHOST_EventWheel.h
+++ b/intern/ghost/intern/GHOST_EventWheel.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventWheel class.
*/
-#ifndef __GHOST_EVENTWHEEL_H__
-#define __GHOST_EVENTWHEEL_H__
+#pragma once
#include "GHOST_Event.h"
@@ -51,5 +50,3 @@ class GHOST_EventWheel : public GHOST_Event {
/** The z-displacement of the mouse wheel. */
GHOST_TEventWheelData m_wheelEventData;
};
-
-#endif // __GHOST_EVENTWHEEL_H__
diff --git a/intern/ghost/intern/GHOST_IXrGraphicsBinding.h b/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
index b199c5f9b28..de8bf9f1a5a 100644
--- a/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
+++ b/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_IXRGRAPHICSBINDING_H__
-#define __GHOST_IXRGRAPHICSBINDING_H__
+#pragma once
#include <memory>
#include <string>
@@ -71,5 +70,3 @@ class GHOST_IXrGraphicsBinding {
std::unique_ptr<GHOST_IXrGraphicsBinding> GHOST_XrGraphicsBindingCreateFromType(
GHOST_TXrGraphicsBinding type, GHOST_Context *ghost_ctx);
-
-#endif /* __GHOST_IXRGRAPHICSBINDING_H__ */
diff --git a/intern/ghost/intern/GHOST_IconX11.h b/intern/ghost/intern/GHOST_IconX11.h
index c5bcf4bedeb..615a7dae6b5 100644
--- a/intern/ghost/intern/GHOST_IconX11.h
+++ b/intern/ghost/intern/GHOST_IconX11.h
@@ -22,8 +22,7 @@
* Icon image data for X11.
*/
-#ifndef __GHOST_ICONX11_H__
-#define __GHOST_ICONX11_H__
+#pragma once
/*
* import bpy
@@ -1013,5 +1012,3 @@ static const unsigned long BLENDER_ICONS_WM_X11[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
};
-
-#endif // __GHOST_ICONX11_H__
diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h
index 112217023a7..74698d50659 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.h
+++ b/intern/ghost/intern/GHOST_ImeWin32.h
@@ -23,8 +23,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_IME_H__
-#define __GHOST_IME_H__
+#pragma once
#ifdef WITH_INPUT_IME
@@ -388,4 +387,3 @@ class GHOST_ImeWin32 {
};
#endif // WITH_INPUT_IME
-#endif // __GHOST_IME_H__
diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h
index 27ad4034068..c41ce8b7f39 100644
--- a/intern/ghost/intern/GHOST_ModifierKeys.h
+++ b/intern/ghost/intern/GHOST_ModifierKeys.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_ModifierKeys struct.
*/
-#ifndef __GHOST_MODIFIERKEYS_H__
-#define __GHOST_MODIFIERKEYS_H__
+#pragma once
#include "GHOST_Types.h"
@@ -87,5 +86,3 @@ struct GHOST_ModifierKeys {
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_OS : 1;
};
-
-#endif // __GHOST_MODIFIERKEYS_H__
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
index a190607ca66..d0b49bc13c2 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.h
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGER_H__
-#define __GHOST_NDOFMANAGER_H__
+#pragma once
#ifndef WITH_INPUT_NDOF
# error NDOF code included in non-NDOF-enabled build
@@ -167,5 +166,3 @@ class GHOST_NDOFManager {
bool m_motionEventPending;
float m_deadZone; // discard motion with each component < this
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
index bd1e6903f94..f7c3599502e 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGERCOCOA_H__
-#define __GHOST_NDOFMANAGERCOCOA_H__
+#pragma once
#include "GHOST_NDOFManager.h"
@@ -29,5 +28,3 @@ class GHOST_NDOFManagerCocoa : public GHOST_NDOFManager {
bool available();
};
-
-#endif // #include guard
diff --git a/intern/ghost/intern/GHOST_NDOFManagerUnix.h b/intern/ghost/intern/GHOST_NDOFManagerUnix.h
index 75bd022631a..6dd4289ffac 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerUnix.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerUnix.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGERUNIX_H__
-#define __GHOST_NDOFMANAGERUNIX_H__
+#pragma once
#include "GHOST_NDOFManager.h"
@@ -32,5 +31,3 @@ class GHOST_NDOFManagerUnix : public GHOST_NDOFManager {
private:
bool m_available;
};
-
-#endif /* __GHOST_NDOFMANAGERUNIX_H__ */
diff --git a/intern/ghost/intern/GHOST_NDOFManagerWin32.h b/intern/ghost/intern/GHOST_NDOFManagerWin32.h
index 9ed5e6ab978..62d9b9207dc 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerWin32.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerWin32.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGERWIN32_H__
-#define __GHOST_NDOFMANAGERWIN32_H__
+#pragma once
#include "GHOST_NDOFManager.h"
@@ -24,5 +23,3 @@ class GHOST_NDOFManagerWin32 : public GHOST_NDOFManager {
GHOST_NDOFManagerWin32(GHOST_System &);
bool available();
};
-
-#endif // #include guard
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index c2d712c11cd..e29a9ba0c29 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_System class.
*/
-#ifndef __GHOST_SYSTEM_H__
-#define __GHOST_SYSTEM_H__
+#pragma once
#include "GHOST_ISystem.h"
@@ -424,5 +423,3 @@ inline GHOST_NDOFManager *GHOST_System::getNDOFManager() const
return m_ndofManager;
}
#endif
-
-#endif // __GHOST_SYSTEM_H__
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
index bbd6f1d8995..8e36cebb88a 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_SystemCocoa class.
*/
-#ifndef __GHOST_SYSTEMCOCOA_H__
-#define __GHOST_SYSTEMCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple OSX only!
@@ -313,5 +312,3 @@ class GHOST_SystemCocoa : public GHOST_System {
/** Is the scroll wheel event generated by a multitouch trackpad or mouse? */
bool m_multiTouchScroll;
};
-
-#endif // __GHOST_SYSTEMCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h
index 186cb92d1aa..5becf110b15 100644
--- a/intern/ghost/intern/GHOST_SystemNULL.h
+++ b/intern/ghost/intern/GHOST_SystemNULL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_SystemNULL class.
*/
-#ifndef __GHOST_SYSTEMNULL_H__
-#define __GHOST_SYSTEMNULL_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_DisplayManagerNULL.h"
@@ -130,5 +129,3 @@ class GHOST_SystemNULL : public GHOST_System {
((glSettings.flags & GHOST_glStereoVisual) != 0));
}
};
-
-#endif /* __GHOST_SYSTEMNULL_H__ */
diff --git a/intern/ghost/intern/GHOST_SystemPaths.h b/intern/ghost/intern/GHOST_SystemPaths.h
index 04180a143cb..ab53b2813cd 100644
--- a/intern/ghost/intern/GHOST_SystemPaths.h
+++ b/intern/ghost/intern/GHOST_SystemPaths.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHS_H__
-#define __GHOST_SYSTEMPATHS_H__
+#pragma once
#include "GHOST_ISystemPaths.h"
@@ -70,5 +69,3 @@ class GHOST_SystemPaths : public GHOST_ISystemPaths {
*/
virtual void addToSystemRecentFiles(const char *filename) const = 0;
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h
index b66379649e7..188f6f02286 100644
--- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHSCOCOA_H__
-#define __GHOST_SYSTEMPATHSCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple OSX only!
@@ -67,5 +66,3 @@ class GHOST_SystemPathsCocoa : public GHOST_SystemPaths {
*/
void addToSystemRecentFiles(const char *filename) const;
};
-
-#endif // __GHOST_SYSTEMPATHSCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_SystemPathsUnix.h b/intern/ghost/intern/GHOST_SystemPathsUnix.h
index f9f89f6e79b..8d2f26a28aa 100644
--- a/intern/ghost/intern/GHOST_SystemPathsUnix.h
+++ b/intern/ghost/intern/GHOST_SystemPathsUnix.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHSUNIX_H__
-#define __GHOST_SYSTEMPATHSUNIX_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_SystemPaths.h"
@@ -65,5 +64,3 @@ class GHOST_SystemPathsUnix : public GHOST_SystemPaths {
*/
void addToSystemRecentFiles(const char *filename) const;
};
-
-#endif /* __GHOST_SYSTEMPATHSUNIX_H__ */
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h
index f1924ea51bc..1a1eab21bad 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.h
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHSWIN32_H__
-#define __GHOST_SYSTEMPATHSWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -74,5 +73,3 @@ class GHOST_SystemPathsWin32 : public GHOST_SystemPaths {
*/
void addToSystemRecentFiles(const char *filename) const;
};
-
-#endif // __GHOST_SYSTEMPATHSWIN32_H__
diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h
index 8feec9de61d..4b2c52f8282 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.h
+++ b/intern/ghost/intern/GHOST_SystemSDL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_SystemSDL class.
*/
-#ifndef __GHOST_SYSTEMSDL_H__
-#define __GHOST_SYSTEMSDL_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_DisplayManagerSDL.h"
@@ -102,5 +101,3 @@ class GHOST_SystemSDL : public GHOST_System {
/// The vector of windows that need to be updated.
std::vector<GHOST_WindowSDL *> m_dirty_windows;
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_SystemWayland.h b/intern/ghost/intern/GHOST_SystemWayland.h
index 89cd3406b69..30ee7679287 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.h
+++ b/intern/ghost/intern/GHOST_SystemWayland.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_SystemWayland class.
*/
-#ifndef __GHOST_SYSTEMWAYLAND_H__
-#define __GHOST_SYSTEMWAYLAND_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_System.h"
@@ -107,5 +106,3 @@ class GHOST_SystemWayland : public GHOST_System {
struct display_t *d;
std::string selection;
};
-
-#endif /* __GHOST_SYSTEMWAYLAND_H__ */
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 849aa5a96f5..f59b106afd6 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1143,10 +1143,16 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
BYTE state[256] = {0};
int r;
GetKeyboardState((PBYTE)state);
+ bool ctrl_pressed = state[VK_CONTROL] & 0x80;
+ bool alt_pressed = state[VK_MENU] & 0x80;
+ /* No text with control key pressed (Alt can be used to insert special characters though!). */
+ if (ctrl_pressed && !alt_pressed) {
+ utf8_char[0] = '\0';
+ }
// Don't call ToUnicodeEx on dead keys as it clears the buffer and so won't allow diacritical
// composition.
- if (MapVirtualKeyW(vk, 2) != 0) {
+ else if (MapVirtualKeyW(vk, 2) != 0) {
// todo: ToUnicodeEx can respond with up to 4 utf16 chars (only 2 here).
// Could be up to 24 utf8 bytes.
if ((r = ToUnicodeEx(
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 6b7901c2ade..24925b9c403 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_SystemWin32 class.
*/
-#ifndef __GHOST_SYSTEMWIN32_H__
-#define __GHOST_SYSTEMWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -488,4 +487,3 @@ inline void GHOST_SystemWin32::handleKeyboardChange(void)
}
}
}
-#endif // __GHOST_SYSTEMWIN32_H__
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 96073c21e79..c0676618101 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1951,7 +1951,7 @@ void GHOST_SystemX11::getClipboard_xcout(const XEvent *evt,
switch (*context) {
/* There is no context, do an XConvertSelection() */
case XCLIB_XCOUT_NONE:
- /* Initialise return length to 0 */
+ /* Initialize return length to 0. */
if (*len > 0) {
free(*txt);
*len = 0;
@@ -2169,7 +2169,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
}
}
else if (owner == None)
- return (NULL);
+ return NULL;
/* Restore events so copy doesn't swallow other event types (keyboard/mouse). */
vector<XEvent> restore_events;
@@ -2237,7 +2237,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
return tmp_data;
}
- return (NULL);
+ return NULL;
}
void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 5888605ec95..ad58138d416 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_SystemX11 class.
*/
-#ifndef __GHOST_SYSTEMX11_H__
-#define __GHOST_SYSTEMX11_H__
+#pragma once
#include <X11/XKBlib.h> /* allow detectable autorepeate */
#include <X11/Xlib.h>
@@ -392,5 +391,3 @@ class GHOST_SystemX11 : public GHOST_System {
bool generateWindowExposeEvents();
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h
index 58641123c24..e6464f5e626 100644
--- a/intern/ghost/intern/GHOST_TaskbarWin32.h
+++ b/intern/ghost/intern/GHOST_TaskbarWin32.h
@@ -17,8 +17,7 @@
/** \file
* \ingroup GHOST
*/
-#ifndef __GHOST_TASKBARWIN32_H__
-#define __GHOST_TASKBARWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -128,5 +127,3 @@ class ITaskbarList3 : public ITaskbarList2 {
virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip(HWND hwnd, RECT *prcClip) = 0;
};
#endif /* ITaskbarList3 */
-
-#endif /*__GHOST_TASKBARWIN32_H__*/
diff --git a/intern/ghost/intern/GHOST_TaskbarX11.h b/intern/ghost/intern/GHOST_TaskbarX11.h
index cd00e25106c..25de5aa9511 100644
--- a/intern/ghost/intern/GHOST_TaskbarX11.h
+++ b/intern/ghost/intern/GHOST_TaskbarX11.h
@@ -17,8 +17,7 @@
/** \file
* \ingroup GHOST
*/
-#ifndef __GHOST_TASKBARX11_H__
-#define __GHOST_TASKBARX11_H__
+#pragma once
class GHOST_TaskBarX11 {
public:
@@ -34,5 +33,3 @@ class GHOST_TaskBarX11 {
private:
void *handle;
};
-
-#endif /*__GHOST_TASKBARX11_H__*/
diff --git a/intern/ghost/intern/GHOST_TimerManager.h b/intern/ghost/intern/GHOST_TimerManager.h
index 039663a7a0e..2e0f5d42230 100644
--- a/intern/ghost/intern/GHOST_TimerManager.h
+++ b/intern/ghost/intern/GHOST_TimerManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_TimerManager class.
*/
-#ifndef __GHOST_TIMERMANAGER_H__
-#define __GHOST_TIMERMANAGER_H__
+#pragma once
#include <vector>
@@ -112,5 +111,3 @@ class GHOST_TimerManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_TimerManager")
#endif
};
-
-#endif // __GHOST_TIMERMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_TimerTask.h b/intern/ghost/intern/GHOST_TimerTask.h
index 561d9b3e705..6dc0728e19b 100644
--- a/intern/ghost/intern/GHOST_TimerTask.h
+++ b/intern/ghost/intern/GHOST_TimerTask.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_TimerTask class.
*/
-#ifndef __GHOST_TIMERTASK_H__
-#define __GHOST_TIMERTASK_H__
+#pragma once
#include "GHOST_ITimerTask.h"
@@ -179,5 +178,3 @@ class GHOST_TimerTask : public GHOST_ITimerTask {
/** Auxiliary storage room. */
GHOST_TUns32 m_auxData;
};
-
-#endif // __GHOST_TIMERTASK_H__
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 7cfea5110c5..c8c21b2b08f 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Window class.
*/
-#ifndef __GHOST_WINDOW_H__
-#define __GHOST_WINDOW_H__
+#pragma once
#include "GHOST_IWindow.h"
@@ -456,5 +455,3 @@ inline GHOST_TStandardCursor GHOST_Window::getCursorShape() const
{
return m_cursorShape;
}
-
-#endif // _GHOST_WINDOW_H
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h
index 15429eab5db..97486c9e77a 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowCocoa.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowCocoa class.
*/
-#ifndef __GHOST_WINDOWCOCOA_H__
-#define __GHOST_WINDOWCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple OSX only!
@@ -327,5 +326,3 @@ class GHOST_WindowCocoa : public GHOST_Window {
bool m_debug_context; // for debug messages during context setup
bool m_is_dialog;
};
-
-#endif // __GHOST_WINDOWCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h
index 661439191c5..34fdfd30f27 100644
--- a/intern/ghost/intern/GHOST_WindowManager.h
+++ b/intern/ghost/intern/GHOST_WindowManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowManager class.
*/
-#ifndef __GHOST_WINDOWMANAGER_H__
-#define __GHOST_WINDOWMANAGER_H__
+#pragma once
#include <vector>
@@ -149,5 +148,3 @@ class GHOST_WindowManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_WindowManager")
#endif
};
-
-#endif // __GHOST_WINDOWMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_WindowNULL.h b/intern/ghost/intern/GHOST_WindowNULL.h
index e1aa0cb7f13..0b5a7ee3450 100644
--- a/intern/ghost/intern/GHOST_WindowNULL.h
+++ b/intern/ghost/intern/GHOST_WindowNULL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_WindowNULL class.
*/
-#ifndef __GHOST_WINDOWNULL_H__
-#define __GHOST_WINDOWNULL_H__
+#pragma once
#include "GHOST_Window.h"
@@ -177,5 +176,3 @@ class GHOST_WindowNULL : public GHOST_Window {
return NULL;
}
};
-
-#endif // __GHOST_WINDOWNULL_H__
diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h
index 5039c742c9d..643c54c282e 100644
--- a/intern/ghost/intern/GHOST_WindowSDL.h
+++ b/intern/ghost/intern/GHOST_WindowSDL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_WindowSDL class.
*/
-#ifndef __GHOST_WINDOWSDL_H__
-#define __GHOST_WINDOWSDL_H__
+#pragma once
#include "GHOST_SystemSDL.h"
#include "GHOST_Window.h"
@@ -149,5 +148,3 @@ class GHOST_WindowSDL : public GHOST_Window {
GHOST_TUns16 getDPIHint();
};
-
-#endif // __GHOST_WINDOWSDL_H__
diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h
index ff1eb60e154..1ee41f4d0f6 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.h
+++ b/intern/ghost/intern/GHOST_WindowWayland.h
@@ -20,8 +20,7 @@
* Declaration of GHOST_WindowWayland class.
*/
-#ifndef __GHOST_WINDOWWAYLAND_H__
-#define __GHOST_WINDOWWAYLAND_H__
+#pragma once
#include "GHOST_Window.h"
@@ -124,5 +123,3 @@ class GHOST_WindowWayland : public GHOST_Window {
*/
GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type) override;
};
-
-#endif // __GHOST_WINDOWWAYLAND_H__
diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h
index dbed7c5ee5f..224ff53bf7b 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.h
+++ b/intern/ghost/intern/GHOST_WindowWin32.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowWin32 class.
*/
-#ifndef __GHOST_WINDOWWIN32_H__
-#define __GHOST_WINDOWWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -586,5 +585,3 @@ class GHOST_WindowWin32 : public GHOST_Window {
#endif
bool m_debug_context;
};
-
-#endif // __GHOST_WINDOWWIN32_H__
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 691f1790a2d..9a38631adb9 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -901,7 +901,7 @@ bool GHOST_WindowX11::netwmIsMaximized(void) const
if (prop_ret)
XFree(prop_ret);
- return (st);
+ return st;
}
void GHOST_WindowX11::netwmFullScreen(bool set)
@@ -964,7 +964,7 @@ bool GHOST_WindowX11::netwmIsFullScreen(void) const
if (prop_ret)
XFree(prop_ret);
- return (st);
+ return st;
}
void GHOST_WindowX11::motifFullScreen(bool set)
@@ -1018,7 +1018,7 @@ bool GHOST_WindowX11::motifIsFullScreen(void) const
if (prop_ret)
XFree(prop_ret);
- return (state);
+ return state;
}
GHOST_TWindowState GHOST_WindowX11::getState() const
@@ -1040,7 +1040,7 @@ GHOST_TWindowState GHOST_WindowX11::getState() const
state_ret = GHOST_kWindowStateFullScreen;
else if (netwmIsMaximized() == True)
state_ret = GHOST_kWindowStateMaximized;
- return (state_ret);
+ return state_ret;
}
GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
@@ -1078,7 +1078,7 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
if (is_motif_full == True)
motifFullScreen(False);
icccmSetState(NormalState);
- return (GHOST_kSuccess);
+ return GHOST_kSuccess;
}
if (state == GHOST_kWindowStateFullScreen) {
@@ -1087,7 +1087,7 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
* isn't mapped.
*/
if (cur_state == GHOST_kWindowStateMinimized)
- return (GHOST_kFailure);
+ return GHOST_kFailure;
m_normal_state = cur_state;
@@ -1097,7 +1097,7 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
netwmFullScreen(True);
if (is_motif_full == False)
motifFullScreen(True);
- return (GHOST_kSuccess);
+ return GHOST_kSuccess;
}
if (state == GHOST_kWindowStateMaximized) {
@@ -1106,7 +1106,7 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
* isn't mapped.
*/
if (cur_state == GHOST_kWindowStateMinimized)
- return (GHOST_kFailure);
+ return GHOST_kFailure;
if (is_full == True)
netwmFullScreen(False);
@@ -1114,7 +1114,7 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
motifFullScreen(False);
if (is_max == False)
netwmMaximized(True);
- return (GHOST_kSuccess);
+ return GHOST_kSuccess;
}
if (state == GHOST_kWindowStateMinimized) {
@@ -1123,10 +1123,10 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
* the window (maximized, full screen, etc).
*/
icccmSetState(IconicState);
- return (GHOST_kSuccess);
+ return GHOST_kSuccess;
}
- return (GHOST_kFailure);
+ return GHOST_kFailure;
}
GHOST_TSuccess GHOST_WindowX11::setOrder(GHOST_TWindowOrder order)
diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h
index 4232ff40b52..ef5d1755f1a 100644
--- a/intern/ghost/intern/GHOST_WindowX11.h
+++ b/intern/ghost/intern/GHOST_WindowX11.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowX11 class.
*/
-#ifndef __GHOST_WINDOWX11_H__
-#define __GHOST_WINDOWX11_H__
+#pragma once
#include "GHOST_Window.h"
#include <X11/Xlib.h>
@@ -288,5 +287,3 @@ class GHOST_WindowX11 : public GHOST_Window {
void motifFullScreen(bool set);
bool motifIsFullScreen() const;
};
-
-#endif // __GHOST_WINDOWX11_H__
diff --git a/intern/ghost/intern/GHOST_XrContext.h b/intern/ghost/intern/GHOST_XrContext.h
index 9be57cd90cc..d2edb40c080 100644
--- a/intern/ghost/intern/GHOST_XrContext.h
+++ b/intern/ghost/intern/GHOST_XrContext.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XRCONTEXT_H__
-#define __GHOST_XRCONTEXT_H__
+#pragma once
#include <memory>
#include <vector>
@@ -131,5 +130,3 @@ class GHOST_XrContext : public GHOST_IXrContext {
GHOST_TXrGraphicsBinding determineGraphicsBindingTypeToEnable(
const GHOST_XrContextCreateInfo *create_info);
};
-
-#endif // __GHOST_XRCONTEXT_H__
diff --git a/intern/ghost/intern/GHOST_XrException.h b/intern/ghost/intern/GHOST_XrException.h
index 9f779961e4f..30c33eaf98f 100644
--- a/intern/ghost/intern/GHOST_XrException.h
+++ b/intern/ghost/intern/GHOST_XrException.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XREXCEPTION_H__
-#define __GHOST_XREXCEPTION_H__
+#pragma once
#include <exception>
@@ -41,5 +40,3 @@ class GHOST_XrException : public std::exception {
const char *m_msg;
int m_result;
};
-
-#endif // __GHOST_XREXCEPTION_H__
diff --git a/intern/ghost/intern/GHOST_XrSession.h b/intern/ghost/intern/GHOST_XrSession.h
index da0128b2851..74555c0c170 100644
--- a/intern/ghost/intern/GHOST_XrSession.h
+++ b/intern/ghost/intern/GHOST_XrSession.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XRSESSION_H__
-#define __GHOST_XRSESSION_H__
+#pragma once
#include <map>
#include <memory>
@@ -84,5 +83,3 @@ class GHOST_XrSession {
void beginFrameDrawing();
void endFrameDrawing(std::vector<XrCompositionLayerBaseHeader *> *layers);
};
-
-#endif /* GHOST_XRSESSION_H__ */
diff --git a/intern/ghost/intern/GHOST_XrSwapchain.h b/intern/ghost/intern/GHOST_XrSwapchain.h
index 7a3e7fcea68..33a1c17b993 100644
--- a/intern/ghost/intern/GHOST_XrSwapchain.h
+++ b/intern/ghost/intern/GHOST_XrSwapchain.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XRSWAPCHAIN_H__
-#define __GHOST_XRSWAPCHAIN_H__
+#pragma once
#include <memory>
@@ -45,5 +44,3 @@ class GHOST_XrSwapchain {
int32_t m_image_width, m_image_height;
bool m_is_srgb_buffer = false;
};
-
-#endif // GHOST_XRSWAPCHAIN_H
diff --git a/intern/ghost/intern/GHOST_Xr_intern.h b/intern/ghost/intern/GHOST_Xr_intern.h
index d59ffd31940..137541c4528 100644
--- a/intern/ghost/intern/GHOST_Xr_intern.h
+++ b/intern/ghost/intern/GHOST_Xr_intern.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XR_INTERN_H__
-#define __GHOST_XR_INTERN_H__
+#pragma once
#include <memory>
#include <vector>
@@ -46,5 +45,3 @@
(void)_res; \
} \
(void)0
-
-#endif /* __GHOST_XR_INTERN_H__ */
diff --git a/intern/ghost/intern/GHOST_Xr_openxr_includes.h b/intern/ghost/intern/GHOST_Xr_openxr_includes.h
index 9cac43b1549..d1deaeb0d1a 100644
--- a/intern/ghost/intern/GHOST_Xr_openxr_includes.h
+++ b/intern/ghost/intern/GHOST_Xr_openxr_includes.h
@@ -22,8 +22,7 @@
* installed.
*/
-#ifndef __GHOST_XR_SYSTEM_INCLUDES_H__
-#define __GHOST_XR_SYSTEM_INCLUDES_H__
+#pragma once
/* Platform headers */
#ifdef XR_USE_PLATFORM_WIN32
@@ -48,5 +47,3 @@
#include <openxr/openxr.h>
#include <openxr/openxr_platform.h>
-
-#endif /* __GHOST_XR_SYSTEM_INCLUDES_H__ */