diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-04 16:56:59 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-04 16:56:59 +0000 |
commit | 36d1ebb68359d7faa194a1f62c17011b462a3a1f (patch) | |
tree | 264111badc785108c3cd2806d3db0f790e8e31a6 /libpqpp/pq-command.cpp | |
parent | Remove unnecessary calls to .string() (diff) | |
download | libdbpp-postgresql-36d1ebb68359d7faa194a1f62c17011b462a3a1f.tar.bz2 libdbpp-postgresql-36d1ebb68359d7faa194a1f62c17011b462a3a1f.tar.xz libdbpp-postgresql-36d1ebb68359d7faa194a1f62c17011b462a3a1f.zip |
Switch to string_view
Diffstat (limited to 'libpqpp/pq-command.cpp')
-rw-r--r-- | libpqpp/pq-command.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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); @@ -159,6 +159,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); } void |