Explorar el Código

nvdrv: Take std::string by const reference in GetDevice()

This is only ever used as a lookup into the device map, so we don't need to
take the std::string instance by value here.
Lioncash hace 8 años
padre
commit
dc35c3f9d7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/core/hle/service/nvdrv/nvdrv.h

+ 1 - 1
src/core/hle/service/nvdrv/nvdrv.h

@@ -30,7 +30,7 @@ public:
 
     /// Returns a pointer to one of the available devices, identified by its name.
     template <typename T>
-    std::shared_ptr<T> GetDevice(std::string name) {
+    std::shared_ptr<T> GetDevice(const std::string& name) {
         auto itr = devices.find(name);
         if (itr == devices.end())
             return nullptr;