Big cleanup
This commit is contained in:
parent
d3080a08bb
commit
8b671090a0
55 changed files with 214 additions and 3967 deletions
|
|
@ -14,19 +14,18 @@ namespace Pgsql {
|
|||
|
||||
Canceller& Canceller::operator=(Canceller&& rhs)
|
||||
{
|
||||
if (m_cancel) {
|
||||
if (m_cancel)
|
||||
PQfreeCancel(m_cancel);
|
||||
}
|
||||
m_cancel = rhs.m_cancel;
|
||||
|
||||
m_cancel = rhs.m_cancel;
|
||||
rhs.m_cancel = nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Canceller::~Canceller()
|
||||
{
|
||||
if (m_cancel) {
|
||||
if (m_cancel)
|
||||
PQfreeCancel(m_cancel);
|
||||
}
|
||||
}
|
||||
|
||||
bool Canceller::cancel(std::string *error)
|
||||
|
|
@ -34,9 +33,8 @@ namespace Pgsql {
|
|||
const int errbuf_size = 256;
|
||||
char errbuf[errbuf_size];
|
||||
bool res = PQcancel(m_cancel, errbuf, errbuf_size);
|
||||
if (!res && error) {
|
||||
if (!res && error)
|
||||
*error = errbuf;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue