Update db_bdb.cpp

This commit is contained in:
NoodleDoodleNoodleDoodleNoodleDoodleNoo 2015-05-01 21:12:16 -07:00 committed by NoodleDoodleNoodleDoodleNoodleDoodleNoo
parent da1d3c01de
commit 4b7ad2b0a7

View File

@ -65,11 +65,23 @@ struct bdb_cur
done = false; done = false;
} }
~bdb_cur() { close(); } ~bdb_cur()
{
close();
}
operator Dbc*() { return m_cur; } operator Dbc*()
operator Dbc**() { return &m_cur; } {
Dbc* operator->() { return m_cur; } return m_cur;
}
operator Dbc**()
{
return &m_cur;
}
Dbc* operator->()
{
return m_cur;
}
void close() void close()
{ {
@ -105,7 +117,7 @@ const char* const BDB_OUTPUT_KEYS = "output_keys";
const char* const BDB_SPENT_KEYS = "spent_keys"; const char* const BDB_SPENT_KEYS = "spent_keys";
const int BUFFER_LENGTH = 32 * 1024 * 1024; const int BUFFER_LENGTH = 4 * 1024 * 1024;
template<typename T> template<typename T>
struct Dbt_copy: public Dbt struct Dbt_copy: public Dbt