Skip to content

Commit

Permalink
Add a virtual destructor to DB_
Browse files Browse the repository at this point in the history
This removes warning about deleting an object with a non-virtual
destructor in the base class.
  • Loading branch information
matejmatuska committed Sep 3, 2024
1 parent bb5989a commit 6694d4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions convert_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class DB_ {
virtual bool fill_database(DB_ * old_database);
virtual void close_db();
virtual DBC * get_database();
virtual ~DB_();
};
/*
* Libdb class needs only open and read data from libdb database
Expand Down
4 changes: 4 additions & 0 deletions db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ DBC * DB_::get_database() {
return NULL;
}
void DB_::close_db(){}

DB_::~DB_() {
}

bool Libdb::connect_database(std::string path){
DB * db;
int status;
Expand Down

0 comments on commit 6694d4f

Please sign in to comment.