Fix Platform::GetCacheLineSize to be deprecated in favor of existing CPUInfo.CacheLineSize`
This commit is contained in:
@@ -710,11 +710,6 @@ CPUInfo AndroidPlatform::GetCPUInfo()
|
||||
return AndroidCpu;
|
||||
}
|
||||
|
||||
int32 AndroidPlatform::GetCacheLineSize()
|
||||
{
|
||||
return AndroidCpu.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats AndroidPlatform::GetMemoryStats()
|
||||
{
|
||||
const uint64 pageSize = getpagesize();
|
||||
|
||||
@@ -81,7 +81,6 @@ public:
|
||||
}
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentThreadID()
|
||||
|
||||
@@ -134,11 +134,6 @@ CPUInfo ApplePlatform::GetCPUInfo()
|
||||
return Cpu;
|
||||
}
|
||||
|
||||
int32 ApplePlatform::GetCacheLineSize()
|
||||
{
|
||||
return Cpu.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats ApplePlatform::GetMemoryStats()
|
||||
{
|
||||
MemoryStats result;
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
}
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentThreadID();
|
||||
|
||||
@@ -270,6 +270,11 @@ bool PlatformBase::Is64BitApp()
|
||||
#endif
|
||||
}
|
||||
|
||||
int32 PlatformBase::GetCacheLineSize()
|
||||
{
|
||||
return Platform::GetCPUInfo().CacheLineSize;
|
||||
}
|
||||
|
||||
void PlatformBase::Fatal(const StringView& msg, void* context, FatalErrorType error)
|
||||
{
|
||||
// Check if is already during fatal state
|
||||
|
||||
@@ -380,9 +380,10 @@ public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the CPU cache line size.
|
||||
/// [Deprecated in v1.10]
|
||||
/// </summary>
|
||||
/// <returns>The cache line size.</returns>
|
||||
API_PROPERTY() static int32 GetCacheLineSize() = delete;
|
||||
API_PROPERTY() DEPRECATED("Use CPUInfo.CacheLineSize instead") static int32 GetCacheLineSize();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current memory stats.
|
||||
|
||||
@@ -1767,11 +1767,6 @@ CPUInfo LinuxPlatform::GetCPUInfo()
|
||||
return UnixCpu;
|
||||
}
|
||||
|
||||
int32 LinuxPlatform::GetCacheLineSize()
|
||||
{
|
||||
return UnixCpu.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats LinuxPlatform::GetMemoryStats()
|
||||
{
|
||||
const uint64 pageSize = getpagesize();
|
||||
|
||||
@@ -95,7 +95,6 @@ public:
|
||||
}
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentThreadID()
|
||||
|
||||
@@ -310,11 +310,6 @@ CPUInfo Win32Platform::GetCPUInfo()
|
||||
return CpuInfo;
|
||||
}
|
||||
|
||||
int32 Win32Platform::GetCacheLineSize()
|
||||
{
|
||||
return CpuInfo.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats Win32Platform::GetMemoryStats()
|
||||
{
|
||||
MEMORYSTATUSEX statex;
|
||||
|
||||
@@ -90,7 +90,6 @@ public:
|
||||
static void FreePages(void* ptr);
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentProcessId();
|
||||
|
||||
Reference in New Issue
Block a user