From f35a90c85f6b8ccef3cd273008004bf9538340c3 Mon Sep 17 00:00:00 2001 From: Davis King Date: Wed, 2 Oct 2013 22:51:12 -0400 Subject: [PATCH] Added missing assert --- dlib/image_transforms/interpolation.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlib/image_transforms/interpolation.h b/dlib/image_transforms/interpolation.h index 62b4c70ef..71e6128a2 100644 --- a/dlib/image_transforms/interpolation.h +++ b/dlib/image_transforms/interpolation.h @@ -529,6 +529,13 @@ namespace dlib interpolate_bilinear ) { + // make sure requires clause is not broken + DLIB_ASSERT( is_same_object(in_img, out_img) == false , + "\t void resize_image()" + << "\n\t Invalid inputs were given to this function." + << "\n\t is_same_object(in_img, out_img): " << is_same_object(in_img, out_img) + ); + typedef typename image_type1::type T; const double x_scale = (img.nc()-1)/(double)std::max((out.nc()-1),1); const double y_scale = (img.nr()-1)/(double)std::max((out.nr()-1),1);