diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-22 14:47:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-22 15:49:04 +0200 |
commit | 921ee37ea3b648e210ecaff21074456c09b91882 (patch) | |
tree | 0874fdb3851845a14107a9fe80839e0fd7cfa70a /connectivity/source | |
parent | 65b5a9848bd01cabbbee8f6e751679a04c1da10f (diff) |
Consolidate unique_ptr deleters calling free
Change-Id: I57a977dbb521270a466d464df8c31c364179ec20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96854
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_preparedstatement.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 2e352320353f..30d386a6cd3c 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -40,6 +40,7 @@ #include "pq_statics.hxx" #include "pq_statement.hxx" +#include <o3tl/deleter.hxx> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> @@ -479,8 +480,7 @@ void PreparedStatement::setBytes( checkClosed(); checkColumnIndex( parameterIndex ); size_t len; - struct Free { void operator ()(void * p) const { free(p); } }; - std::unique_ptr<unsigned char, Free> escapedString( + std::unique_ptr<unsigned char, o3tl::free_delete> escapedString( PQescapeBytea( reinterpret_cast<unsigned char const *>(x.getConstArray()), x.getLength(), &len)); if( ! escapedString ) { |