From 822c67ef8493040c8d7464e23279319f26316aff Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 12 Mar 2013 15:36:14 +0100 Subject: [PATCH] SyntheticClient.h: prefer prefix ++operator for iterators Signed-off-by: Danny Al-Gaaf --- src/client/SyntheticClient.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/SyntheticClient.h b/src/client/SyntheticClient.h index 484ef6f04d020..3bbcb73cb1a5e 100644 --- a/src/client/SyntheticClient.h +++ b/src/client/SyntheticClient.h @@ -123,7 +123,7 @@ class SyntheticClient { int get_random_fh() { int r = rand() % open_files.size(); set::iterator it = open_files.begin(); - while (r--) it++; + while (r--) ++it; return *it; } @@ -133,7 +133,7 @@ class SyntheticClient { assert(!subdirs.empty()); int r = ((rand() % subdirs.size()) + (rand() % subdirs.size())) / 2; // non-uniform distn set::iterator it = subdirs.begin(); - while (r--) it++; + while (r--) ++it; n1 = cwd; n1.push_dentry( *it ); @@ -148,7 +148,7 @@ class SyntheticClient { r %= contents.size(); map::iterator it = contents.begin(); - while (r--) it++; + while (r--) ++it; n2 = cwd; n2.push_dentry( it->first ); -- 2.39.5