Commit e57833b0 authored by James Gill's avatar James Gill Committed by Facebook Github Bot

Replace std::size_t return types in F14 to size_type

Summary:
The heterogenous count() method currently returns size_type, unlike
similar methods (normal count(), F14Map.count() methods).  This
standardizes it.

Reviewed By: nbronson

Differential Revision: D14426807

fbshipit-source-id: 140be39fcda99c9f82ced3962ddcbdd1d5f53ba6
parent cd62e86f
...@@ -747,12 +747,12 @@ class F14BasicMap { ...@@ -747,12 +747,12 @@ class F14BasicMap {
return try_emplace(std::forward<K>(key)).first->second; return try_emplace(std::forward<K>(key)).first->second;
} }
FOLLY_ALWAYS_INLINE std::size_t count(key_type const& key) const { FOLLY_ALWAYS_INLINE size_type count(key_type const& key) const {
return table_.find(key).atEnd() ? 0 : 1; return table_.find(key).atEnd() ? 0 : 1;
} }
template <typename K> template <typename K>
FOLLY_ALWAYS_INLINE EnableHeterogeneousFind<K, std::size_t> count( FOLLY_ALWAYS_INLINE EnableHeterogeneousFind<K, size_type> count(
K const& key) const { K const& key) const {
return table_.find(key).atEnd() ? 0 : 1; return table_.find(key).atEnd() ? 0 : 1;
} }
......
...@@ -529,7 +529,7 @@ class F14BasicSet { ...@@ -529,7 +529,7 @@ class F14BasicSet {
//// PUBLIC - Lookup //// PUBLIC - Lookup
FOLLY_ALWAYS_INLINE std::size_t count(key_type const& key) const { FOLLY_ALWAYS_INLINE size_type count(key_type const& key) const {
return table_.find(key).atEnd() ? 0 : 1; return table_.find(key).atEnd() ? 0 : 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment