summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2015-09-29 20:41:19 +0300
committerJyri Sarha <jsarha@ti.com>2015-09-30 14:37:07 +0300
commitef7fa369385fc99be4c861e5b3d444e32c5c101b (patch)
treed3708fd48e6594d2844f4c417cccd0c0c2877c5e /libkms++
parent1f6b4591b4697a3acf228e694c490cc5f75ae4e4 (diff)
There is no need to convert exception strings to .c_str().
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/card.cpp6
-rw-r--r--libkms++/connector.cpp2
-rw-r--r--libkms++/drmobject.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 7aa8bdb..52a0f7a 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -26,8 +26,8 @@ Card::Card()
int fd = open(card, O_RDWR | O_CLOEXEC);
if (fd < 0)
- throw invalid_argument((string(strerror(errno)) +
- " opening " + card).c_str());
+ throw invalid_argument(string(strerror(errno)) + " opening " +
+ card);
m_fd = fd;
int r;
@@ -222,7 +222,7 @@ std::vector<kms::Pipeline> Card::get_connected_pipelines()
if (!crtc)
throw invalid_argument(string("Connector #") +
- to_string(conn->idx()) +
+ to_string(conn->idx()) +
" has no possible crtcs");
outputs.push_back(Pipeline { crtc, conn });
diff --git a/libkms++/connector.cpp b/libkms++/connector.cpp
index b045b8b..0731f2b 100644
--- a/libkms++/connector.cpp
+++ b/libkms++/connector.cpp
@@ -98,7 +98,7 @@ Videomode Connector::get_mode(const char *mode) const
if (sMode == c->modes[i].name)
return drm_mode_to_video_mode(c->modes[i]);
- throw invalid_argument((sMode + ": mode not found").c_str());
+ throw invalid_argument(sMode + ": mode not found");
}
bool Connector::connected() const
diff --git a/libkms++/drmobject.cpp b/libkms++/drmobject.cpp
index a79370f..f48153a 100644
--- a/libkms++/drmobject.cpp
+++ b/libkms++/drmobject.cpp
@@ -64,6 +64,6 @@ uint64_t DrmObject::get_prop_value(const char *name) const
return m_prop_values.at(prop->id());
}
- throw invalid_argument((string(name) + ": property not found").c_str());
+ throw invalid_argument(string(name) + ": property not found");
}
}