From 29eb15d7436941a9bbe465a5f0d53ad4cd309da3 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 17 Mar 2013 14:43:02 -0400 Subject: [PATCH] moved remove_duplicates() from dlib::impl to dlib namespace. --- dlib/image_transforms/segment_image.h | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/dlib/image_transforms/segment_image.h b/dlib/image_transforms/segment_image.h index a0113c5cc..0692437dc 100644 --- a/dlib/image_transforms/segment_image.h +++ b/dlib/image_transforms/segment_image.h @@ -434,26 +434,6 @@ namespace dlib } }; - template - void remove_duplicates ( - std::vector& rects - ) - { - std::sort(rects.begin(), rects.end(), std::less()); - unsigned long num_unique = 1; - for (unsigned long i = 1; i < rects.size(); ++i) - { - if (rects[i] != rects[i-1]) - { - rects[num_unique++] = rects[i]; - } - } - if (rects.size() != 0) - rects.resize(num_unique); - } - - // ------------------------------------------------------------------------------------ - template < typename in_image_type, typename diff_type @@ -604,6 +584,26 @@ namespace dlib } } // end namespace impl +// ---------------------------------------------------------------------------------------- + + template + void remove_duplicates ( + std::vector& rects + ) + { + std::sort(rects.begin(), rects.end(), std::less()); + unsigned long num_unique = 1; + for (unsigned long i = 1; i < rects.size(); ++i) + { + if (rects[i] != rects[i-1]) + { + rects[num_unique++] = rects[i]; + } + } + if (rects.size() != 0) + rects.resize(num_unique); + } + // ---------------------------------------------------------------------------------------- template <