summaryrefslogtreecommitdiff
path: root/utils/small_vector.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-13 08:31:51 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-13 08:31:51 +0000
commit86bb77e674c4df9c46e3e2d8bba8a5c8b42bb98c (patch)
tree3ecbdee8963cd951aabc9537b6a7a335a8e3263c /utils/small_vector.h
parentcf54677dac448084f38cf54d2596a2078492fce6 (diff)
boost::hash
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@541 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'utils/small_vector.h')
-rw-r--r--utils/small_vector.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/small_vector.h b/utils/small_vector.h
index f1e53a51..89917d1c 100644
--- a/utils/small_vector.h
+++ b/utils/small_vector.h
@@ -253,11 +253,12 @@ public:
}
inline std::size_t hash_impl() const {
+ using namespace boost;
if (size_==0) return 0;
-// if (size_==1) return boost::hash_value(data_.vals[0]);
- if (size<= SV_MAX)
- return boost::hash_range(data_.vals,data_.vals+size_);
- return boost::hash_range(data_.ptr,data_.ptr+size_);
+ if (size_==1) return hash_value(data_.vals[0]);
+ if (size_ <= SV_MAX)
+ return hash_range(data_.vals,data_.vals+size_);
+ return hash_range(data_.ptr,data_.ptr+size_);
}
private: