kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31359
Re: [PATCH 0/3] Minor fixes for VECTOR2 and BOX2
-
To:
<kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Suminski <maciej.suminski@xxxxxxx>
-
Date:
Sun, 5 Nov 2017 23:04:48 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.48) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
In-reply-to:
<20171031111721.14666-1-marvin_schmidt@gmx.net>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
Hi Marvin,
Thank you for the patches. I have just pushed them to the master branch.
Regards,
Orson
On 10/31/2017 12:17 PM, Marvin Schmidt wrote:
> I was irritated by the usage of the vector_traits class as you usually
> use it to gather more information about a certain type using
> something like `traits<Type>::property`. Here the vector2d classes
> queries the traits class to get the extended coordinate type but also
> derives from it to get the limits of that type which are hardcoded in
> the traits class. The second patch removes the hardcoded limits from
> the traits class and the inheritance of the vector2d class from the traits
> class. Instead the vector2d class uses the std::numeric_limits facility
> to get the limits of the extended coordinate type it got through the
> traits class
>
> The other two patches are just minor fixes. The wrong use of the
> typename keyword in the box2 class might have been triggering a bug
> in the MSVC compiler though (not sure about that as I can't test it,
> just seems possible from workaround I've seen)
>
> Marvin Schmidt (3):
> vector2d: Remove duplicate #include
> vector2d: Fix traits usage and use std::numeric_limits
> box2: Remove wrong use of typename keyword
>
> include/math/box2.h | 2 +-
> include/math/vector2d.h | 10 +++++-----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
Follow ups
References