diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-29 05:08:23 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-29 06:00:08 +0000 |
commit | b6d0efa66f0c2fba1544597cb520c768787d28e4 (patch) | |
tree | 547ccc89980eb3f647263c1907c05d2f92afbfcd | |
parent | Add missing override attribute (diff) | |
download | libdbpp-postgresql-b6d0efa66f0c2fba1544597cb520c768787d28e4.tar.bz2 libdbpp-postgresql-b6d0efa66f0c2fba1544597cb520c768787d28e4.tar.xz libdbpp-postgresql-b6d0efa66f0c2fba1544597cb520c768787d28e4.zip |
Tidy up
-rw-r--r-- | libpqpp/pq-command.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp index aeb4914..9d6b7c2 100644 --- a/libpqpp/pq-command.cpp +++ b/libpqpp/pq-command.cpp @@ -2,17 +2,12 @@ #include "pq-connection.h" #include <stdlib.h> #include <string.h> +#include <buffer.h> #include <boost/date_time/posix_time/posix_time.hpp> -static std::string addrStr(void * p, unsigned int no) { - std::string r(50, ' '); - r.resize(snprintf(const_cast<char *>(r.c_str()), r.length(), "pStatement_%u_%p", no, p)); - return r; -} - PQ::Command::Command(const Connection * conn, const std::string & sql, unsigned int no) : DB::Command(sql), - stmntName(addrStr(this, no)), + stmntName(stringbf("pStatement_%u_%p", no, this)), c(conn) { } |