Browse Source

Merge pull request #715 from lioncash/const-ref

nvdrv: Take std::string by const reference in GetDevice()
nce_cpp
bunnei 8 years ago
committed by GitHub
parent
commit
a5d3565cd8
  1. 2
      src/core/hle/service/nvdrv/nvdrv.h

2
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. /// Returns a pointer to one of the available devices, identified by its name.
template <typename T> 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); auto itr = devices.find(name);
if (itr == devices.end()) if (itr == devices.end())
return nullptr; return nullptr;

Loading…
Cancel
Save