From 8e44449afc78b3e2a949b18271ceb9553fde5944 Mon Sep 17 00:00:00 2001 From: Joshua Achorn Date: Mon, 20 Mar 2023 15:51:49 -0400 Subject: [PATCH] style(gx): use auto specifier to store BufLock return value --- src/gx/d3d/CGxDeviceD3d.cpp | 4 ++-- src/gx/gll/CGxDeviceGLL.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gx/d3d/CGxDeviceD3d.cpp b/src/gx/d3d/CGxDeviceD3d.cpp index 1122771..3b9c958 100644 --- a/src/gx/d3d/CGxDeviceD3d.cpp +++ b/src/gx/d3d/CGxDeviceD3d.cpp @@ -397,8 +397,8 @@ int32_t CGxDeviceD3d::BufUnlock(CGxBuf* buf, uint32_t size) { void CGxDeviceD3d::BufData(CGxBuf* buf, void* data, size_t size, uintptr_t offset) { CGxDevice::BufData(buf, data, size, offset); - char* bufData = this->IBufLock(buf); - memcpy(reinterpret_cast(uintptr_t(bufData) + offset), data, size); + auto bufData = this->IBufLock(buf); + memcpy(reinterpret_cast(uintptr_t(bufData) + offset)), data, size); this->IBufUnlock(buf); } diff --git a/src/gx/gll/CGxDeviceGLL.cpp b/src/gx/gll/CGxDeviceGLL.cpp index bfd8529..d158eb8 100644 --- a/src/gx/gll/CGxDeviceGLL.cpp +++ b/src/gx/gll/CGxDeviceGLL.cpp @@ -120,7 +120,7 @@ int32_t CGxDeviceGLL::BufUnlock(CGxBuf* buf, uint32_t size) { void CGxDeviceGLL::BufData(CGxBuf* buf, void* data, size_t size, uintptr_t offset) { CGxDevice::BufData(buf, data, size, offset); - char* bufData = this->IBufLock(buf); + auto bufData = this->IBufLock(buf); memcpy(reinterpret_cast(uintptr_t(bufData) + offset), data, size); this->IBufUnlock(buf); }