From a0cedddde5ad16e2b885d3dd0b57b3e613a796a3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 4 Feb 2019 20:19:52 +0000 Subject: Pass new columns from make_unique --- libpqpp/pq-selectbase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpqpp/pq-selectbase.cpp b/libpqpp/pq-selectbase.cpp index 54b2a57..f9a2eb0 100644 --- a/libpqpp/pq-selectbase.cpp +++ b/libpqpp/pq-selectbase.cpp @@ -25,7 +25,10 @@ PQ::SelectBase::createColumns(PGresult * execRes) { unsigned int nFields = PQnfields(execRes); for (unsigned int f = 0; f < nFields; f += 1) { - insertColumn(DB::ColumnPtr(binary ? new BinaryColumn(this, f) : new Column(this, f))); + if (binary) + insertColumn(std::make_unique(this, f)); + else + insertColumn(std::make_unique(this, f)); } } -- cgit v1.2.3