From 36d1ebb68359d7faa194a1f62c17011b462a3a1f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 4 Feb 2019 16:56:59 +0000 Subject: Switch to string_view --- libpqpp/pq-command.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libpqpp/pq-command.cpp') diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp index 58b5c49..97f649c 100644 --- a/libpqpp/pq-command.cpp +++ b/libpqpp/pq-command.cpp @@ -103,7 +103,7 @@ PQ::Command::paramSet(unsigned int n, const char * fmt, const T & ... v) } void -PQ::Command::paramSet(unsigned int n, const std::string & b) +PQ::Command::paramSet(unsigned int n, const std::string_view & b) { paramsAtLeast(n); bufs[n] = new std::string(b); @@ -158,6 +158,11 @@ PQ::Command::bindParamF(unsigned int n, float v) } void PQ::Command::bindParamS(unsigned int n, const Glib::ustring & s) +{ + paramSet(n, s.raw()); +} +void +PQ::Command::bindParamS(unsigned int n, const std::string_view & s) { paramSet(n, s); } -- cgit v1.2.3