[Spice-devel] [PATCH qxl-wddm-dod 11/12] Inline GetModeCount

Frediano Ziglio fziglio at redhat.com
Wed Apr 12 13:19:58 UTC 2017


As GetModeInfo is also inline there is no reason the derived class
could redefine the array anyway.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 qxldod/QxlDod.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 2f7e819..0c975fe 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -284,7 +284,7 @@ public:
     virtual NTSTATUS AcquireFrameBuffer(CURRENT_BDD_MODE* pCurrentBddMode) { return STATUS_SUCCESS; }
     virtual NTSTATUS ReleaseFrameBuffer(CURRENT_BDD_MODE* pCurrentBddMode) { return STATUS_SUCCESS; }
 
-    virtual ULONG GetModeCount(void) = 0;
+    ULONG GetModeCount(void) const {return m_ModeCount;}
     PVIDEO_MODE_INFORMATION GetModeInfo(UINT idx) {return &m_ModeInfo[idx];}
     USHORT GetModeNumber(USHORT idx) {return m_ModeNumbers[idx];}
     USHORT GetCurrentModeIndex(void) {return m_CurrentMode;}
@@ -329,7 +329,6 @@ public:
     NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode);
     NTSTATUS SetCurrentMode(ULONG Mode);
     NTSTATUS GetCurrentMode(ULONG* Mode);
-    ULONG GetModeCount(void) {return m_ModeCount;}
     NTSTATUS SetPowerState(DEVICE_POWER_STATE DevicePowerState, DXGK_DISPLAY_INFORMATION* pDispInfo);
     NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
     NTSTATUS HWClose(void);
@@ -521,7 +520,6 @@ public:
     NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode);
     NTSTATUS SetCurrentMode(ULONG Mode);
     NTSTATUS GetCurrentMode(ULONG* Mode);
-    ULONG GetModeCount(void) {return m_ModeCount;}
     NTSTATUS SetPowerState(DEVICE_POWER_STATE DevicePowerState, DXGK_DISPLAY_INFORMATION* pDispInfo);
     NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
     NTSTATUS HWClose(void);
-- 
2.9.3



More information about the Spice-devel mailing list