From 78f3142f51b4fd555664936701f49da7dea86b7e Mon Sep 17 00:00:00 2001 From: Tom Jackson Date: Wed, 26 Jun 2013 12:32:28 -0700 Subject: [PATCH] const'ing sorted_vector_map::count() Test Plan: Use it Reviewed By: tudorb@fb.com FB internal diff: D865211 --- folly/sorted_vector_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1