Cleanup: quiet discarded-qualifiers warning

This commit is contained in:
Campbell Barton 2021-07-06 12:05:25 +10:00
parent 4eeec6e9b5
commit 36584bbc2d
15 changed files with 15 additions and 15 deletions

View File

@ -893,7 +893,7 @@ extern char *GHOST_getClipboard(bool selection);
* \param buffer: the string buffer to set. * \param buffer: the string buffer to set.
* \param selection: Set the selection instead, X11 only feature. * \param selection: Set the selection instead, X11 only feature.
*/ */
extern void GHOST_putClipboard(char *buffer, bool selection); extern void GHOST_putClipboard(const char *buffer, bool selection);
/** /**
* Toggles console * Toggles console

View File

@ -436,7 +436,7 @@ class GHOST_ISystem {
/** /**
* Put data to the Clipboard * Put data to the Clipboard
*/ */
virtual void putClipboard(char *buffer, bool selection) const = 0; virtual void putClipboard(const char *buffer, bool selection) const = 0;
/*************************************************************************************** /***************************************************************************************
* System Message Box. * System Message Box.

View File

@ -803,7 +803,7 @@ char *GHOST_getClipboard(bool selection)
return system->getClipboard(selection); return system->getClipboard(selection);
} }
void GHOST_putClipboard(char *buffer, bool selection) void GHOST_putClipboard(const char *buffer, bool selection)
{ {
GHOST_ISystem *system = GHOST_ISystem::getSystem(); GHOST_ISystem *system = GHOST_ISystem::getSystem();
system->putClipboard(buffer, selection); system->putClipboard(buffer, selection);

View File

@ -315,7 +315,7 @@ class GHOST_System : public GHOST_ISystem {
* \param buffer: The buffer to copy to the clipboard. * \param buffer: The buffer to copy to the clipboard.
* \param selection: The clipboard to copy too only used on X11. * \param selection: The clipboard to copy too only used on X11.
*/ */
virtual void putClipboard(char *buffer, bool selection) const = 0; virtual void putClipboard(const char *buffer, bool selection) const = 0;
/** /**
* Show a system message box * Show a system message box

View File

@ -215,7 +215,7 @@ class GHOST_SystemCocoa : public GHOST_System {
* \param buffer: The buffer to be copied. * \param buffer: The buffer to be copied.
* \param selection: Indicates which buffer to copy too, only used on X11. * \param selection: Indicates which buffer to copy too, only used on X11.
*/ */
void putClipboard(char *buffer, bool selection) const; void putClipboard(const char *buffer, bool selection) const;
/** /**
* Handles a window event. Called by GHOST_WindowCocoa window delegate * Handles a window event. Called by GHOST_WindowCocoa window delegate

View File

@ -1969,7 +1969,7 @@ char *GHOST_SystemCocoa::getClipboard(bool selection) const
} }
} }
void GHOST_SystemCocoa::putClipboard(char *buffer, bool selection) const void GHOST_SystemCocoa::putClipboard(const char *buffer, bool selection) const
{ {
if (selection) if (selection)
return; // for copying the selection, used on X11 return; // for copying the selection, used on X11

View File

@ -56,7 +56,7 @@ class GHOST_SystemNULL : public GHOST_System {
{ {
return NULL; return NULL;
} }
void putClipboard(char *buffer, bool selection) const void putClipboard(const char *buffer, bool selection) const
{ /* nop */ { /* nop */
} }
uint64_t getMilliSeconds() const uint64_t getMilliSeconds() const

View File

@ -748,7 +748,7 @@ char *GHOST_SystemSDL::getClipboard(bool selection) const
return (char *)SDL_GetClipboardText(); return (char *)SDL_GetClipboardText();
} }
void GHOST_SystemSDL::putClipboard(char *buffer, bool selection) const void GHOST_SystemSDL::putClipboard(const char *buffer, bool selection) const
{ {
SDL_SetClipboardText(buffer); SDL_SetClipboardText(buffer);
} }

View File

@ -58,7 +58,7 @@ class GHOST_SystemSDL : public GHOST_System {
char *getClipboard(bool selection) const; char *getClipboard(bool selection) const;
void putClipboard(char *buffer, bool selection) const; void putClipboard(const char *buffer, bool selection) const;
uint64_t getMilliSeconds(); uint64_t getMilliSeconds();

View File

@ -1517,7 +1517,7 @@ char *GHOST_SystemWayland::getClipboard(bool /*selection*/) const
return clipboard; return clipboard;
} }
void GHOST_SystemWayland::putClipboard(char *buffer, bool /*selection*/) const void GHOST_SystemWayland::putClipboard(const char *buffer, bool /*selection*/) const
{ {
if (!d->data_device_manager || d->inputs.empty()) { if (!d->data_device_manager || d->inputs.empty()) {
return; return;

View File

@ -61,7 +61,7 @@ class GHOST_SystemWayland : public GHOST_System {
char *getClipboard(bool selection) const override; char *getClipboard(bool selection) const override;
void putClipboard(char *buffer, bool selection) const override; void putClipboard(const char *buffer, bool selection) const override;
uint8_t getNumDisplays() const override; uint8_t getNumDisplays() const override;

View File

@ -2059,7 +2059,7 @@ char *GHOST_SystemWin32::getClipboard(bool selection) const
} }
} }
void GHOST_SystemWin32::putClipboard(char *buffer, bool selection) const void GHOST_SystemWin32::putClipboard(const char *buffer, bool selection) const
{ {
if (selection) { if (selection) {
return; return;

View File

@ -229,7 +229,7 @@ class GHOST_SystemWin32 : public GHOST_System {
* \param selection: Used by X11 only. * \param selection: Used by X11 only.
* \return No return. * \return No return.
*/ */
void putClipboard(char *buffer, bool selection) const; void putClipboard(const char *buffer, bool selection) const;
/** /**
* Show a system message box * Show a system message box

View File

@ -2242,7 +2242,7 @@ char *GHOST_SystemX11::getClipboard(bool selection) const
return NULL; return NULL;
} }
void GHOST_SystemX11::putClipboard(char *buffer, bool selection) const void GHOST_SystemX11::putClipboard(const char *buffer, bool selection) const
{ {
Window m_window, owner; Window m_window, owner;

View File

@ -229,7 +229,7 @@ class GHOST_SystemX11 : public GHOST_System {
* \param buffer: The buffer to copy to the clipboard. * \param buffer: The buffer to copy to the clipboard.
* \param selection: Set the selection into the clipboard, X11 only feature. * \param selection: Set the selection into the clipboard, X11 only feature.
*/ */
void putClipboard(char *buffer, bool selection) const; void putClipboard(const char *buffer, bool selection) const;
/** /**
* Show a system message box * Show a system message box