Explorar el Código

kernel/process: Make Create()'s name parameter be taken by value

Makes the interface more flexible in terms of how Create() may be
called, while still allowing the parameter itself to be moved into.
Lioncash hace 7 años
padre
commit
fea6568955
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/core/hle/kernel/process.cpp
  2. 1 1
      src/core/hle/kernel/process.h

+ 1 - 1
src/core/hle/kernel/process.cpp

@@ -48,7 +48,7 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) {
 }
 } // Anonymous namespace
 
-SharedPtr<Process> Process::Create(Core::System& system, std::string&& name) {
+SharedPtr<Process> Process::Create(Core::System& system, std::string name) {
     auto& kernel = system.Kernel();
 
     SharedPtr<Process> process(new Process(system));

+ 1 - 1
src/core/hle/kernel/process.h

@@ -75,7 +75,7 @@ public:
 
     static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4;
 
-    static SharedPtr<Process> Create(Core::System& system, std::string&& name);
+    static SharedPtr<Process> Create(Core::System& system, std::string name);
 
     std::string GetTypeName() const override {
         return "Process";