diff options
Diffstat (limited to 'libkms++')
-rw-r--r-- | libkms++/card.cpp | 4 | ||||
-rw-r--r-- | libkms++/card.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp index 39a1fb6..ae41f10 100644 --- a/libkms++/card.cpp +++ b/libkms++/card.cpp @@ -140,14 +140,14 @@ void Card::print_short() const print_obs<Plane>(m_obmap); } -Property* Card::get_prop(const char *name) const +Property* Card::get_prop(const string& name) const { for (auto pair : m_obmap) { auto prop = dynamic_cast<Property*>(pair.second); if (!prop) continue; - if (strcmp(name, prop->name()) == 0) + if (name == prop->name()) return prop; } diff --git a/libkms++/card.h b/libkms++/card.h index ac0cba4..94e761a 100644 --- a/libkms++/card.h +++ b/libkms++/card.h @@ -27,7 +27,7 @@ public: Crtc* get_crtc_by_index(uint32_t idx) const; Encoder* get_encoder(uint32_t id) const; Property* get_prop(uint32_t id) const; - Property* get_prop(const char *name) const; + Property* get_prop(const std::string& name) const; bool master() const { return m_master; } bool has_atomic() const { return m_has_atomic; } |