From: Danny Al-Gaaf Date: Tue, 12 Mar 2013 14:18:01 +0000 (+0100) Subject: auth/Auth.h: prefer prefix ++operator for non-primitive types X-Git-Tag: v0.60~96^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b1437a8bf9bb74ed9c9d24f25540e4fb1fe99480;p=ceph.git auth/Auth.h: prefer prefix ++operator for non-primitive types Prefer prefix ++operator for non-primitive types like iterators for performance reasons. Prefix ++/-- operators avoid creating a temporary copy. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/auth/Auth.h b/src/auth/Auth.h index 4dc1d63c93d6..0adc9009221e 100644 --- a/src/auth/Auth.h +++ b/src/auth/Auth.h @@ -209,12 +209,12 @@ struct RotatingSecrets { } ExpiringCryptoKey& current() { map::iterator p = secrets.begin(); - p++; + ++p; return p->second; } const ExpiringCryptoKey& current() const { map::const_iterator p = secrets.begin(); - p++; + ++p; return p->second; } ExpiringCryptoKey& next() {