From 276aa87c0d5c9e435a71d1d1bb26159aa5e0d7b2 Mon Sep 17 00:00:00 2001 From: kamdiedrich Date: Thu, 9 Jan 2020 14:47:44 +0100 Subject: [PATCH] Add const to getHardwareInfo Change-Id: I08e545b1f64c56c96f44a7ef6b474c47c7e90edb --- core/gmm_helper/client_context/gmm_client_context_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/gmm_helper/client_context/gmm_client_context_base.h b/core/gmm_helper/client_context/gmm_client_context_base.h index 641b10dcf8..a5de37121e 100644 --- a/core/gmm_helper/client_context/gmm_client_context_base.h +++ b/core/gmm_helper/client_context/gmm_client_context_base.h @@ -29,7 +29,7 @@ class GmmClientContextBase { return std::make_unique(osInterface, hwInfo, initFunc, destroyFunc); } - HardwareInfo *getHardwareInfo() { + const HardwareInfo *getHardwareInfo() { return hardwareInfo; } @@ -37,7 +37,7 @@ class GmmClientContextBase { MOCKABLE_VIRTUAL uint8_t getMediaSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT format); protected: - HardwareInfo *hardwareInfo; + HardwareInfo *hardwareInfo = nullptr; GMM_CLIENT_CONTEXT *clientContext; GmmClientContextBase(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc); decltype(&GmmAdapterDestroy) destroyFunc;