Cleanup: const-correctness for GHOST's IME events

This commit is contained in:
Campbell Barton
2025-06-05 17:39:02 +10:00
parent 96b7504a06
commit 54eb530a4d
5 changed files with 11 additions and 5 deletions

View File

@@ -30,7 +30,10 @@ class GHOST_EventIME : public GHOST_Event {
* \param type: The type of key event.
* \param key: The key code of the key.
*/
GHOST_EventIME(uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, void *customdata)
GHOST_EventIME(uint64_t msec,
GHOST_TEventType type,
GHOST_IWindow *window,
const void *customdata)
: GHOST_Event(msec, type, window)
{
this->m_data = customdata;

View File

@@ -5796,7 +5796,7 @@ class GHOST_EventIME : public GHOST_Event {
GHOST_EventIME(uint64_t msec,
GHOST_TEventType type,
GHOST_IWindow *window,
GHOST_TEventImeData *customdata)
const GHOST_TEventImeData *customdata)
: GHOST_Event(msec, type, window)
{
/* Make sure that we keep a copy of the IME input. Otherwise it might get lost

View File

@@ -1409,7 +1409,7 @@ GHOST_Event *GHOST_SystemWin32::processWindowEvent(GHOST_TEventType type,
#ifdef WITH_INPUT_IME
GHOST_Event *GHOST_SystemWin32::processImeEvent(GHOST_TEventType type,
GHOST_WindowWin32 *window,
GHOST_TEventImeData *data)
const GHOST_TEventImeData *data)
{
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
return new GHOST_EventIME(getMessageTime(system), type, window, data);

View File

@@ -426,7 +426,7 @@ class GHOST_SystemWin32 : public GHOST_System {
*/
static GHOST_Event *processImeEvent(GHOST_TEventType type,
GHOST_WindowWin32 *window,
GHOST_TEventImeData *data);
const GHOST_TEventImeData *data);
#endif /* WITH_INPUT_IME */
/**

View File

@@ -321,7 +321,10 @@ class GHOST_EventIME : public GHOST_Event {
* \param type: The type of key event.
* \param key: The key code of the key.
*/
GHOST_EventIME(uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, void *customdata)
GHOST_EventIME(uint64_t msec,
GHOST_TEventType type,
GHOST_IWindow *window,
const void *customdata)
: GHOST_Event(msec, type, window)
{
this->m_data = customdata;