diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-01-30 22:28:44 +0100 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-01-30 22:28:53 +0100 |
commit | 9987f8f95cf2e6f9d7619e50a8b7742762d974ee (patch) | |
tree | 0d6e55838dc8e6099af5dd00b6685920cd022643 /src/messages/MDirUpdate.h | |
parent | paxos: explicitly pass in send timestamp (diff) | |
download | ceph-9987f8f95cf2e6f9d7619e50a8b7742762d974ee.tar.xz ceph-9987f8f95cf2e6f9d7619e50a8b7742762d974ee.zip |
msg: go const-crazy on messages
- get_type_name()
- print()
and all the random crap they call.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'src/messages/MDirUpdate.h')
-rw-r--r-- | src/messages/MDirUpdate.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/messages/MDirUpdate.h b/src/messages/MDirUpdate.h index cbe1031e0a6..e9914c235c7 100644 --- a/src/messages/MDirUpdate.h +++ b/src/messages/MDirUpdate.h @@ -27,12 +27,12 @@ class MDirUpdate : public Message { filepath path; public: - int get_source_mds() { return from_mds; } - dirfrag_t get_dirfrag() { return dirfrag; } - int get_dir_rep() { return dir_rep; } - set<int>& get_dir_rep_by() { return dir_rep_by; } - bool should_discover() { return discover > 0; } - filepath& get_path() { return path; } + int get_source_mds() const { return from_mds; } + dirfrag_t get_dirfrag() const { return dirfrag; } + int get_dir_rep() const { return dir_rep; } + const set<int>& get_dir_rep_by() const { return dir_rep_by; } + bool should_discover() const { return discover > 0; } + const filepath& get_path() const { return path; } void tried_discover() { if (discover) discover--; @@ -57,8 +57,8 @@ private: ~MDirUpdate() {} public: - const char *get_type_name() { return "dir_update"; } - void print(ostream& out) { + const char *get_type_name() const { return "dir_update"; } + void print(ostream& out) const { out << "dir_update(" << get_dirfrag() << ")"; } |