Commit ae0c81bc authored by Davis King's avatar Davis King

Added missing assert

parent 5e7d14f4
...@@ -556,6 +556,19 @@ namespace dlib ...@@ -556,6 +556,19 @@ namespace dlib
std::vector<rectangle>& mapped_rects std::vector<rectangle>& mapped_rects
) const ) const
{ {
// make sure requires clause is not broken
DLIB_ASSERT(get_num_detection_templates() > 0 &&
is_loaded_with_image() &&
psi.size() >= get_num_dimensions(),
"\t void scan_image_pyramid::get_feature_vector()"
<< "\n\t Invalid inputs were given to this function "
<< "\n\t get_num_detection_templates(): " << get_num_detection_templates()
<< "\n\t is_loaded_with_image(): " << is_loaded_with_image()
<< "\n\t psi.size(): " << psi.size()
<< "\n\t get_num_dimensions(): " << get_num_dimensions()
<< "\n\t this: " << this
);
psi = 0; psi = 0;
mapped_rects.clear(); mapped_rects.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment