From 69081719f73da8de2935774a42d237837a91952a Mon Sep 17 00:00:00 2001 From: Keir Mierle Date: Mon, 27 Aug 2012 13:28:56 -0700 Subject: [PATCH] Remove unnecessary overload for hash<> The overload for pointers in hash tables was applied in normal usage of schur_ordering.cc. However, the tests did not include the overload since they only included collections_port.h. As a result, the routines in schur_ordering.cc were using a different hash function than that inside the tests. The fix is to remove the specialization. If this breaks one of the compiler configurations, we will find a workaround at that time. Change-Id: Idbf60415d5e2aec0c865b514ad0c577d21b91405 --- internal/ceres/schur_ordering.cc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/internal/ceres/schur_ordering.cc b/internal/ceres/schur_ordering.cc index 49aacb1fe..1cdff4e6d 100644 --- a/internal/ceres/schur_ordering.cc +++ b/internal/ceres/schur_ordering.cc @@ -39,21 +39,6 @@ #include "ceres/residual_block.h" #include "glog/logging.h" -#if !defined(CERES_NO_TR1) - -CERES_HASH_NAMESPACE_START - -// Allow us to hash pointers as if they were int's -template<> struct hash< ::ceres::internal::ParameterBlock*> { - size_t operator()(::ceres::internal::ParameterBlock* x) const { - return reinterpret_cast(x); - } -}; - -CERES_HASH_NAMESPACE_END - -#endif - namespace ceres { namespace internal {