]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/rgw_cors.cc: fix inefficient usage of string::find()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Apr 2013 13:43:12 +0000 (15:43 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Apr 2013 13:43:12 +0000 (15:43 +0200)
commit7abba7b1923cf97fbc5d47a8ffc4b7f56bd6b3db
tree9e1ca9bbabaa7ce286abe615e760ad755c66ab9f
parenteb815bb06921d0349e6018dcee289b3611d88905
rgw/rgw_cors.cc: fix inefficient usage of string::find()

Fix warning from cppcheck:
 [src/rgw/rgw_cors.cc:70]: (performance) Inefficient usage of
 string::find() in condition; string::compare() would be faster.

Instead of string::find() use boost::algorithm::starts_with().

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_cors.cc