summaryrefslogtreecommitdiffstats
path: root/src/mds/LogEvent.h
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-02-12 22:17:38 +0100
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-02-12 22:17:38 +0100
commit0c65cd5f5e93f2d3db9ac55b74c03a32144d331f (patch)
tree0ca89145751320d76c132c0edee3287f9b1118eb /src/mds/LogEvent.h
parentmodified the perl file name (diff)
downloadceph-0c65cd5f5e93f2d3db9ac55b74c03a32144d331f.tar.xz
ceph-0c65cd5f5e93f2d3db9ac55b74c03a32144d331f.zip
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 <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/mds/LogEvent.h')
-rw-r--r--src/mds/LogEvent.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mds/LogEvent.h b/src/mds/LogEvent.h
index 25990b6f104..fdf145c85ea 100644
--- a/src/mds/LogEvent.h
+++ b/src/mds/LogEvent.h
@@ -92,7 +92,7 @@ protected:
ENCODE_FINISH(bl);
}
- virtual void print(ostream& out) {
+ virtual void print(ostream& out) const {
out << "event(" << _type << ")";
}