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 | 8e38ee47b6c4fff42a5f68d433bd84e40010d9ed (patch) | |
tree | 08a8799ac5819f3be87b84bc10f2f6e5b8044dd4 | |
parent | Add missing override attribute (diff) | |
download | libdbpp-postgresql-8e38ee47b6c4fff42a5f68d433bd84e40010d9ed.tar.bz2 libdbpp-postgresql-8e38ee47b6c4fff42a5f68d433bd84e40010d9ed.tar.xz libdbpp-postgresql-8e38ee47b6c4fff42a5f68d433bd84e40010d9ed.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) { } |