From b6d0efa66f0c2fba1544597cb520c768787d28e4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 29 Dec 2015 05:08:23 +0000 Subject: Tidy up --- libpqpp/pq-command.cpp | 9 ++------- 1 file 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 #include +#include #include -static std::string addrStr(void * p, unsigned int no) { - std::string r(50, ' '); - r.resize(snprintf(const_cast(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) { } -- cgit v1.2.3