kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31482
Re: [PATCH 0/3] Minor fixes for VECTOR2 and BOX2
-
To:
<kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Suminski <maciej.suminski@xxxxxxx>
-
Date:
Thu, 9 Nov 2017 23:46:55 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.50) 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:
<20171109190729.GA4748@pythagoras>
-
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,
IIRC, I could not apply some of the patches cleanly, but I decided they
were short enough to introduce the changes manually. Apparently even
with such short patches there is a place for mistakes, I am sorry about
that.
Regards,
Orson
On 11/09/2017 08:07 PM, Marvin Schmidt wrote:
> 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
>
> _______________________________________________
> 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
>
References