Re: [Musicpd-dev-team] [PATCH 1/2] ConfigData: Add support for signed integers

2013-10-19 Thread Max Kellermann
On 2013/10/19 15:38, Sebastian Thorarensen se...@naju.se wrote:
 +unsigned
 +block_param::GetUnsignedValue() const
 +{
 + long value2 = GetIntValue();

This explicitly limits the range of unsigned integers to 2^31.  Why
that?

I admit that the existing code is bad as well, by using strtol() when
sizeof(long)==4 on i386, and that should be improved.  But your change
makes it even worse, by enforcing that limitation on all platforms.

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


Re: [Musicpd-dev-team] [PATCH 1/2] ConfigData: Add support for signed integers

2013-10-19 Thread Sebastian Thorarensen
On Sat, 19 Oct 2013, Max Kellermann wrote:

 This explicitly limits the range of unsigned integers to 2^31.  Why
 that?

To save three lines of code and but I missed that it would limit the
range, so it was by mistake.

-- 
Sebastian Thorarensen

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team