]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushCompiler.cc: prefer prefix --operator for iterators
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 14 Mar 2013 13:04:46 +0000 (14:04 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 14 Mar 2013 18:18:04 +0000 (19:18 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/crush/CrushCompiler.cc

index c54a7b916e4e140ba9272d548f6dad0259659535..aee621d8e32d0e42af2a94c1b0bb18ddf74942fe 100644 (file)
@@ -768,7 +768,7 @@ int CrushCompiler::compile(istream& in, const char *infn)
     assert(!line_pos.empty());
     map<int,int>::iterator p = line_pos.upper_bound(cpos);
     if (p != line_pos.begin())
-      p--;
+      --p;
     int line = p->second;
     int pos = cpos - p->first;
     err << infn << ":" << line //<< ":" << (pos+1)