← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH 0/3] Minor fixes for VECTOR2 and BOX2

 

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