From 8b8e47b1b3fb6c48eeb4429922528d9809eab161 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 30 Aug 2011 08:36:56 -0700 Subject: [PATCH] client: simplify Inode operator<< Signed-off-by: Sage Weil --- src/client/Inode.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/Inode.cc b/src/client/Inode.cc index 47edede4a1668..c22a02ab99923 100644 --- a/src/client/Inode.cc +++ b/src/client/Inode.cc @@ -34,11 +34,9 @@ ostream& operator<<(ostream &out, Inode &in) if (in.is_file()) out << " " << in.oset; - set::iterator i = in.dn_set.begin(); - while(i != in.dn_set.end()) { - out << " parent=" << *i; - ++i; - } + if (!in.dn_set.empty()) + out << " parents=" << in.dn_set; + out << ' ' << &in << ")"; return out; } -- 2.39.5