mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 17:55:46 +00:00
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.
This commit is contained in:
parent
ec2e251e9a
commit
fc653dce16
3 changed files with 6 additions and 14 deletions
|
@ -16,11 +16,8 @@ constexpr std::size_t ResourceTypeToIndex(ResourceType type) {
|
|||
ResourceLimit::ResourceLimit(KernelCore& kernel) : Object{kernel} {}
|
||||
ResourceLimit::~ResourceLimit() = default;
|
||||
|
||||
SharedPtr<ResourceLimit> ResourceLimit::Create(KernelCore& kernel, std::string name) {
|
||||
SharedPtr<ResourceLimit> resource_limit(new ResourceLimit(kernel));
|
||||
|
||||
resource_limit->name = std::move(name);
|
||||
return resource_limit;
|
||||
SharedPtr<ResourceLimit> ResourceLimit::Create(KernelCore& kernel) {
|
||||
return new ResourceLimit(kernel);
|
||||
}
|
||||
|
||||
s64 ResourceLimit::GetCurrentResourceValue(ResourceType resource) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue