summaryrefslogtreecommitdiff
path: root/libkms++/property.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2015-10-03 22:52:46 +0300
committerTomi Valkeinen <tomi.valkeinen@iki.fi>2015-10-03 22:52:46 +0300
commitc0dffb7c577b03ff63871b5d13be15f230a010a3 (patch)
treedb297417e9189af01926d6f2a7d36a825aa2c403 /libkms++/property.cpp
parent935d30ce2fe76380e1b126ccd6ff439162888fb5 (diff)
use strings instead of char*
Diffstat (limited to 'libkms++/property.cpp')
-rw-r--r--libkms++/property.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libkms++/property.cpp b/libkms++/property.cpp
index af6a0ae..e01bf60 100644
--- a/libkms++/property.cpp
+++ b/libkms++/property.cpp
@@ -3,6 +3,8 @@
#include "kms++.h"
+using namespace std;
+
namespace kms
{
@@ -16,6 +18,7 @@ Property::Property(Card& card, uint32_t id)
{
m_priv = new PropertyPriv();
m_priv->drm_prop = drmModeGetProperty(card.fd(), id);
+ m_name = m_priv->drm_prop->name;
}
Property::~Property()
@@ -26,11 +29,11 @@ Property::~Property()
void Property::print_short() const
{
- printf("Property %d, %s\n", id(), name());
+ printf("Property %d, %s\n", id(), name().c_str());
}
-const char *Property::name() const
+const string& Property::name() const
{
- return m_priv->drm_prop->name;
+ return m_name;
}
}