From 22dbf3d0d590ed98bdaf47d4f486457e4797e172 Mon Sep 17 00:00:00 2001 From: Davis King Date: Fri, 29 Apr 2011 18:08:18 +0000 Subject: [PATCH] A minor change to avoid getting a compiler error about functions being ambiguous when the rectangle is used with floating point vectors. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404238 --- dlib/geometry/rectangle.h | 5 +++-- dlib/geometry/rectangle_abstract.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlib/geometry/rectangle.h b/dlib/geometry/rectangle.h index 3bc454218..a97b83eb1 100644 --- a/dlib/geometry/rectangle.h +++ b/dlib/geometry/rectangle.h @@ -70,9 +70,10 @@ namespace dlib { } + template rectangle ( - const point& p1, - const point& p2 + const vector& p1, + const vector& p2 ) { *this = rectangle(p1) + rectangle(p2); diff --git a/dlib/geometry/rectangle_abstract.h b/dlib/geometry/rectangle_abstract.h index 7e1059b0e..ed743f00b 100644 --- a/dlib/geometry/rectangle_abstract.h +++ b/dlib/geometry/rectangle_abstract.h @@ -90,9 +90,10 @@ namespace dlib - #bottom() == p.y() !*/ + template rectangle ( - const point& p1, - const point& p2 + const vector& p1, + const vector& p2 ); /*! ensures