Author: kpvdr
Date: 2010-12-06 15:34:52 -0500 (Mon, 06 Dec 2010)
New Revision: 4427
Modified:
store/trunk/cpp/lib/jrnl2/aio_callback.hpp
store/trunk/cpp/lib/jrnl2/jexception.hpp
store/trunk/cpp/lib/jrnl2/slock.hpp
store/trunk/cpp/lib/jrnl2/smutex.hpp
store/trunk/cpp/lib/jrnl2/txn_ctxt.hpp
store/trunk/cpp/perf/JournalInstance.hpp
Log:
Tidy up of virtual declarations, ensure that all subclasses have virtual destructors
Modified: store/trunk/cpp/lib/jrnl2/aio_callback.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl2/aio_callback.hpp 2010-12-06 19:24:19 UTC (rev 4426)
+++ store/trunk/cpp/lib/jrnl2/aio_callback.hpp 2010-12-06 20:34:52 UTC (rev 4427)
@@ -44,6 +44,7 @@
class aio_callback
{
public:
+ virtual ~aio_callback() {}
virtual void wr_aio_cb(std::vector<dtok*>& dtokl) = 0;
virtual void rd_aio_cb(std::vector<u_int16_t>& pil) = 0;
};
Modified: store/trunk/cpp/lib/jrnl2/jexception.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl2/jexception.hpp 2010-12-06 19:24:19 UTC (rev 4426)
+++ store/trunk/cpp/lib/jrnl2/jexception.hpp 2010-12-06 20:34:52 UTC (rev 4427)
@@ -101,7 +101,7 @@
const std::string& throwing_fn) throw ();
virtual ~jexception() throw ();
- virtual const char* what() const throw (); // override std::exception::what()
+ const char* what() const throw (); // override std::exception::what()
inline u_int32_t get_err_code() const throw () { return _err_code; }
inline const std::string get_additional_info() const throw () { return
_additional_info; }
Modified: store/trunk/cpp/lib/jrnl2/slock.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl2/slock.hpp 2010-12-06 19:24:19 UTC (rev 4426)
+++ store/trunk/cpp/lib/jrnl2/slock.hpp 2010-12-06 20:34:52 UTC (rev 4427)
@@ -50,6 +50,7 @@
const smutex& _sm;
public:
sm_cntnr(const smutex& sm) : _sm(sm) {}
+ virtual ~sm_cntnr() {}
inline const smutex& get() const { return _sm; }
};
Modified: store/trunk/cpp/lib/jrnl2/smutex.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl2/smutex.hpp 2010-12-06 19:24:19 UTC (rev 4426)
+++ store/trunk/cpp/lib/jrnl2/smutex.hpp 2010-12-06 20:34:52 UTC (rev 4427)
@@ -51,7 +51,7 @@
{
PTHREAD_CHK(::pthread_mutex_init(&_m, 0),
"::pthread_mutex_init", "smutex", "smutex");
}
- inline virtual ~smutex()
+ inline ~smutex()
{
PTHREAD_CHK(::pthread_mutex_destroy(&_m),
"::pthread_mutex_destroy", "smutex", "~smutex");
}
Modified: store/trunk/cpp/lib/jrnl2/txn_ctxt.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl2/txn_ctxt.hpp 2010-12-06 19:24:19 UTC (rev 4426)
+++ store/trunk/cpp/lib/jrnl2/txn_ctxt.hpp 2010-12-06 20:34:52 UTC (rev 4427)
@@ -42,6 +42,7 @@
class txn_ctxt
{
public:
+ virtual ~txn_ctxt() {}
virtual std::string& tid() = 0;
virtual bool is_dist_txn() = 0;
};
Modified: store/trunk/cpp/perf/JournalInstance.hpp
===================================================================
--- store/trunk/cpp/perf/JournalInstance.hpp 2010-12-06 19:24:19 UTC (rev 4426)
+++ store/trunk/cpp/perf/JournalInstance.hpp 2010-12-06 20:34:52 UTC (rev 4427)
@@ -82,11 +82,11 @@
virtual ~JournalInstance();
void operator()();
#ifdef JOURNAL2
- virtual void wr_aio_cb(std::vector<mrg::journal2::dtok*>& dtokl);
+ void wr_aio_cb(std::vector<mrg::journal2::dtok*>& dtokl);
#else
- virtual void wr_aio_cb(std::vector<mrg::journal::data_tok*>& dtokl);
+ void wr_aio_cb(std::vector<mrg::journal::data_tok*>& dtokl);
#endif
- virtual void rd_aio_cb(std::vector<uint16_t>& pil);
+ void rd_aio_cb(std::vector<uint16_t>& pil);
};
} // namespace test
Show replies by date