ceph/ceph — pull request #50 by dalgaaf (2013-02-12 22:13:50+00:00)
Title: mds/LogEvent.h: change print() signature to const

Fix print() function of src/mds/LogEvent.h, declare as

virtual void print(ostream& out) const {...}

Adapt functions of derived classes. This should fix a problem
with print function of derived classes EImportStart and
EImportFinish, which had a const signature, hiding virtual
function of the base class LogEvent (which wasn't const).

Fix -Woverloaded-virtual warning from clang was:

mds/events/EImportStart.h:43:8: warning: 'EImportStart::print'
hides overloaded virtual function [-Woverloaded-virtual]
void print(ostream& out) const {
^
mds/events/../LogEvent.h:95:16: note: hidden overloaded virtual
function 'LogEvent::print' declared here
virtual void print(ostream& out) {
^
In file included from mds/journal.cc:31:
mds/events/EImportFinish.h:35:8: warning: 'EImportFinish::print'
hides overloaded virtual function [-Woverloaded-virtual]
void print(ostream& out) const {
^
mds/events/../LogEvent.h:95:16: note: hidden overloaded
virtual function 'LogEvent::print' declared here
virtual void print(ostream& out) {

Signed-off-by: Danny Al-Gaaf