diff options
Diffstat (limited to 'extern/ceres/internal/ceres/stl_util.h')
-rw-r--r-- | extern/ceres/internal/ceres/stl_util.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/extern/ceres/internal/ceres/stl_util.h b/extern/ceres/internal/ceres/stl_util.h index 0595a4cf2e9..d3411b73376 100644 --- a/extern/ceres/internal/ceres/stl_util.h +++ b/extern/ceres/internal/ceres/stl_util.h @@ -46,8 +46,7 @@ namespace ceres { // advanced, which could result in the hash function trying to deference a // stale pointer. template <class ForwardIterator> -void STLDeleteContainerPointers(ForwardIterator begin, - ForwardIterator end) { +void STLDeleteContainerPointers(ForwardIterator begin, ForwardIterator end) { while (begin != end) { ForwardIterator temp = begin; ++begin; @@ -80,7 +79,7 @@ void STLDeleteUniqueContainerPointers(ForwardIterator begin, // ElementDeleter (defined below), which ensures that your container's elements // are deleted when the ElementDeleter goes out of scope. template <class T> -void STLDeleteElements(T *container) { +void STLDeleteElements(T* container) { if (!container) return; STLDeleteContainerPointers(container->begin(), container->end()); container->clear(); |