mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
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:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user