mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 07:12:46 +01:00
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.
This commit is contained in:
parent
758c357868
commit
dc35c3f9d7
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue