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
This commit is contained in:
Keir Mierle
2012-08-27 13:28:56 -07:00
parent 1762420b6e
commit 69081719f7
-15
View File
@@ -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<size_t>(x);
}
};
CERES_HASH_NAMESPACE_END
#endif
namespace ceres {
namespace internal {