diff options
author | Lukas Rusak <lorusak@gmail.com> | 2020-11-20 16:24:29 -0800 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2020-11-27 07:59:46 -0800 |
commit | 9b8f600127f033a3c606d80e5008a9e8a42c96e2 (patch) | |
tree | 1c5e1be430d863f2275512edb315cb8fe1d9ee31 | |
parent | 44d04ef5ffce8afa974f7ebf63fa174f1f9c4270 (diff) |
CDRMObject: change methods to use const std::string&
-rw-r--r-- | xbmc/windowing/gbm/drm/DRMObject.cpp | 6 | ||||
-rw-r--r-- | xbmc/windowing/gbm/drm/DRMObject.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xbmc/windowing/gbm/drm/DRMObject.cpp b/xbmc/windowing/gbm/drm/DRMObject.cpp index 94eabd8b31..7d27c6f059 100644 --- a/xbmc/windowing/gbm/drm/DRMObject.cpp +++ b/xbmc/windowing/gbm/drm/DRMObject.cpp @@ -53,7 +53,7 @@ std::string CDRMObject::GetPropertyName(uint32_t propertyId) const return "invalid property"; } -uint32_t CDRMObject::GetPropertyId(const char* name) const +uint32_t CDRMObject::GetPropertyId(const std::string& name) const { auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](auto& prop) { return prop->name == name; }); @@ -106,7 +106,7 @@ std::tuple<bool, uint64_t> CDRMObject::GetPropertyValue(const std::string& name, return std::make_tuple(false, 0); } -bool CDRMObject::SetProperty(const char* name, uint64_t value) +bool CDRMObject::SetProperty(const std::string& name, uint64_t value) { auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](auto& prop) { return prop->name == name; }); @@ -121,7 +121,7 @@ bool CDRMObject::SetProperty(const char* name, uint64_t value) return false; } -bool CDRMObject::SupportsProperty(const char* name) +bool CDRMObject::SupportsProperty(const std::string& name) { auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](auto& prop) { return prop->name == name; }); diff --git a/xbmc/windowing/gbm/drm/DRMObject.h b/xbmc/windowing/gbm/drm/DRMObject.h index c3b0bf6aca..e2ae32652c 100644 --- a/xbmc/windowing/gbm/drm/DRMObject.h +++ b/xbmc/windowing/gbm/drm/DRMObject.h @@ -33,12 +33,12 @@ public: std::string GetPropertyName(uint32_t propertyId) const; uint32_t GetId() const { return m_id; } - uint32_t GetPropertyId(const char* name) const; + uint32_t GetPropertyId(const std::string& name) const; std::tuple<bool, uint64_t> GetPropertyValue(const std::string& name, const std::string& valueName) const; - bool SetProperty(const char* name, uint64_t value); - bool SupportsProperty(const char* name); + bool SetProperty(const std::string& name, uint64_t value); + bool SupportsProperty(const std::string& name); protected: explicit CDRMObject(int fd); |