Skip to content

Commit 7cc08bf

Browse files
committed
rbd-mirror: code cleanup
Renamed ostream argument in overloaded operator implementations. Signed-off-by: N Balachandran <[email protected]>
1 parent 0e3c55c commit 7cc08bf

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/tools/rbd_mirror/Types.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ std::ostream &operator<<(std::ostream &os, const ImageId &image_id) {
1111
<< "id=" << image_id.id;
1212
}
1313

14-
std::ostream& operator<<(std::ostream& lhs,
15-
const LocalPoolMeta& rhs) {
16-
return lhs << "mirror_uuid=" << rhs.mirror_uuid;
14+
std::ostream& operator<<(std::ostream& os,
15+
const LocalPoolMeta& local_pool_meta) {
16+
return os << "mirror_uuid=" << local_pool_meta.mirror_uuid;
1717
}
1818

19-
std::ostream& operator<<(std::ostream& lhs,
20-
const RemotePoolMeta& rhs) {
21-
return lhs << "mirror_uuid=" << rhs.mirror_uuid << ", "
22-
"mirror_peer_uuid=" << rhs.mirror_peer_uuid;
19+
std::ostream& operator<<(std::ostream& os,
20+
const RemotePoolMeta& remote_pool_meta) {
21+
return os << "mirror_uuid=" << remote_pool_meta.mirror_uuid << ", "
22+
"mirror_peer_uuid=" << remote_pool_meta.mirror_peer_uuid;
2323
}
2424

25-
std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer) {
26-
return lhs << "uuid: " << peer.uuid
25+
std::ostream& operator<<(std::ostream& os, const PeerSpec &peer) {
26+
return os << "uuid: " << peer.uuid
2727
<< " cluster: " << peer.cluster_name
2828
<< " client: " << peer.client_name;
2929
}

src/tools/rbd_mirror/Types.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct LocalPoolMeta {
7272
std::string mirror_uuid;
7373
};
7474

75-
std::ostream& operator<<(std::ostream& lhs,
75+
std::ostream& operator<<(std::ostream& os,
7676
const LocalPoolMeta& local_pool_meta);
7777

7878
struct RemotePoolMeta {
@@ -87,7 +87,7 @@ struct RemotePoolMeta {
8787
std::string mirror_peer_uuid;
8888
};
8989

90-
std::ostream& operator<<(std::ostream& lhs,
90+
std::ostream& operator<<(std::ostream& os,
9191
const RemotePoolMeta& remote_pool_meta);
9292

9393
template <typename I>
@@ -114,8 +114,8 @@ struct Peer {
114114
};
115115

116116
template <typename I>
117-
std::ostream& operator<<(std::ostream& lhs, const Peer<I>& peer) {
118-
return lhs << peer.remote_pool_meta;
117+
std::ostream& operator<<(std::ostream& os, const Peer<I>& peer) {
118+
return os << peer.remote_pool_meta;
119119
}
120120

121121
struct PeerSpec {
@@ -162,7 +162,7 @@ struct PeerSpec {
162162
}
163163
};
164164

165-
std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer);
165+
std::ostream& operator<<(std::ostream& os, const PeerSpec &peer);
166166

167167
} // namespace mirror
168168
} // namespace rbd

0 commit comments

Comments
 (0)