From d09e98f566e6c0c6363bc881c4f40e50a9de3ff8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 1 Apr 2019 16:46:00 -0400 Subject: kernel/resource_limit: Remove the name member from resource limits This doesn't really provide any benefit to the resource limit interface. There's no way for callers to any of the service functions for resource limits to provide a custom name, so all created instances of resource limits other than the system resource limit would have a name of "Unknown". The system resource limit itself is already trivially identifiable from its limit values, so there's no real need to take up space in the object to identify one object meaningfully out of N total objects. --- src/core/hle/kernel/resource_limit.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/core/hle/kernel/resource_limit.cpp') diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cpp index 2f9695005..173f69915 100644 --- a/src/core/hle/kernel/resource_limit.cpp +++ b/src/core/hle/kernel/resource_limit.cpp @@ -16,11 +16,8 @@ constexpr std::size_t ResourceTypeToIndex(ResourceType type) { ResourceLimit::ResourceLimit(KernelCore& kernel) : Object{kernel} {} ResourceLimit::~ResourceLimit() = default; -SharedPtr ResourceLimit::Create(KernelCore& kernel, std::string name) { - SharedPtr resource_limit(new ResourceLimit(kernel)); - - resource_limit->name = std::move(name); - return resource_limit; +SharedPtr ResourceLimit::Create(KernelCore& kernel) { + return new ResourceLimit(kernel); } s64 ResourceLimit::GetCurrentResourceValue(ResourceType resource) const { -- cgit v1.2.3