Cleanup: Fix "unused m_system" warnings

The dummy `m_system` variable is not needed in the GHOST_NULL classes
This commit is contained in:
Sebastian Parborg 2022-08-17 12:53:32 +02:00
parent a078262804
commit 1c63e4233d
3 changed files with 5 additions and 12 deletions

View File

@ -14,7 +14,7 @@ class GHOST_SystemHeadless;
class GHOST_DisplayManagerNULL : public GHOST_DisplayManager {
public:
GHOST_DisplayManagerNULL(GHOST_SystemHeadless *system) : GHOST_DisplayManager(), m_system(system)
GHOST_DisplayManagerNULL() : GHOST_DisplayManager()
{ /* nop */
}
GHOST_TSuccess getNumDisplays(uint8_t & /*numDisplays*/) const override
@ -42,7 +42,4 @@ class GHOST_DisplayManagerNULL : public GHOST_DisplayManager {
{
return GHOST_kSuccess;
}
private:
GHOST_SystemHeadless *m_system;
};

View File

@ -126,7 +126,7 @@ class GHOST_SystemHeadless : public GHOST_System {
GHOST_TSuccess success = GHOST_System::init();
if (success) {
m_displayManager = new GHOST_DisplayManagerNULL(this);
m_displayManager = new GHOST_DisplayManagerNULL();
if (m_displayManager) {
return GHOST_kSuccess;
@ -148,8 +148,7 @@ class GHOST_SystemHeadless : public GHOST_System {
const bool /*is_dialog*/,
const GHOST_IWindow *parentWindow) override
{
return new GHOST_WindowNULL(this,
title,
return new GHOST_WindowNULL(title,
left,
top,
width,

View File

@ -20,8 +20,7 @@ class GHOST_WindowNULL : public GHOST_Window {
return GHOST_kSuccess;
}
GHOST_WindowNULL(GHOST_SystemHeadless *system,
const char *title,
GHOST_WindowNULL(const char *title,
int32_t /*left*/,
int32_t /*top*/,
uint32_t width,
@ -30,7 +29,7 @@ class GHOST_WindowNULL : public GHOST_Window {
const GHOST_IWindow * /*parentWindow*/,
GHOST_TDrawingContextType /*type*/,
const bool stereoVisual)
: GHOST_Window(width, height, state, stereoVisual, false), m_system(system)
: GHOST_Window(width, height, state, stereoVisual, false)
{
setTitle(title);
}
@ -144,8 +143,6 @@ class GHOST_WindowNULL : public GHOST_Window {
}
private:
GHOST_SystemHeadless *m_system;
/**
* \param type: The type of rendering context create.
* \return Indication of success.