← Back to team overview

kicad-developers team mailing list archive

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

 

Hey Orson,

thanks for pushing those patches!

Just wondering: why did you alter them? I intentionally left one of the
`#include <cmath>` in place because the Rotate function uses sin and cos
(which should really be std::{sin,cos} by the way) and ordered the
includes alphabetically

Best regards,
Marvin

On Sun, Nov 05, 2017 at 11:04:48PM +0100, Maciej Suminski wrote:
> 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(-)
> > 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References