From: Tom Jackson Date: Wed, 26 Jun 2013 19:32:28 +0000 (-0700) Subject: const'ing sorted_vector_map::count() X-Git-Tag: v0.22.0~940 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=78f3142f51b4fd555664936701f49da7dea86b7e;p=folly.git const'ing sorted_vector_map::count() Test Plan: Use it Reviewed By: tudorb@fb.com FB internal diff: D865211 --- diff --git a/folly/sorted_vector_types.h b/folly/sorted_vector_types.h index afe9279c..d5503849 100644 --- a/folly/sorted_vector_types.h +++ b/folly/sorted_vector_types.h @@ -515,7 +515,7 @@ public: return end(); } - size_type count(const key_type& key) { + size_type count(const key_type& key) const { return find(key) == end() ? 0 : 1; }