From 93cba6f6994e3410f8ef82bc53bb1448ee57aece Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Jul 2018 18:40:35 -0400 Subject: vm_manager: Add missing commas to string literal array elements in GetMemoryStateName() Without these, this would perform concatenation, which is definitely not what we want here. --- src/core/hle/kernel/vm_manager.cpp | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'src/core/hle/kernel/vm_manager.cpp') diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 034dd490e..10b3ebaca 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -16,30 +16,20 @@ namespace Kernel { static const char* GetMemoryStateName(MemoryState state) { - static const char* names[] = { - "Unmapped", - "Io", - "Normal", - "CodeStatic", - "CodeMutable", - "Heap", - "Shared", - "Unknown1" - "ModuleCodeStatic", - "ModuleCodeMutable", - "IpcBuffer0", - "Mapped", - "ThreadLocal", - "TransferMemoryIsolated", - "TransferMemory", - "ProcessMemory", - "Unknown2" - "IpcBuffer1", - "IpcBuffer3", - "KernelStack", + static constexpr const char* names[] = { + "Unmapped", "Io", + "Normal", "CodeStatic", + "CodeMutable", "Heap", + "Shared", "Unknown1", + "ModuleCodeStatic", "ModuleCodeMutable", + "IpcBuffer0", "Mapped", + "ThreadLocal", "TransferMemoryIsolated", + "TransferMemory", "ProcessMemory", + "Unknown2", "IpcBuffer1", + "IpcBuffer3", "KernelStack", }; - return names[(int)state]; + return names[static_cast(state)]; } bool VirtualMemoryArea::CanBeMergedWith(const VirtualMemoryArea& next) const { -- cgit v1.2.3