[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] A lot of small changes.
From: |
Stéphane Magnenat |
Subject: |
Re: [glob2-devel] A lot of small changes. |
Date: |
Wed, 4 Apr 2007 17:01:20 +0200 |
User-agent: |
KMail/1.9.6 |
On Tuesday 03 April 2007 18:34:02 Shawn Anderson wrote:
> After a little more testing, I found that this all compiles fine on my
> gentoo box, using gcc 3.2,3.3,3.4.6.
> The way you are using templates does compile on OS X gcc 4.0, but not 3.3.
> Could this be an OS X version of gcc issue?
>
> Either way, even if it compiles...
>
> updateGlobalGradientSlow(Uint8 *gradient)
> {
> if (size <= 65536)
> updateGlobalGradientSlow<Uint16>(gradient);
> else
> updateGlobalGradientSlow<Uint32>(gradient);
> }
>
> seems like a very strange and counter-intuitive way of using templates.
> Was there a specific reason that it was changed to use templates vs using
> two methods?
template is much better than two methods as it doesn't duplicate code.
This is a perfectly correct use of templates.
Steph
--
http://nct.ysagoon.com
- Re: [glob2-devel] A lot of small changes., (continued)
- Re: [glob2-devel] A lot of small changes., Shawn Anderson, 2007/04/02
- Re: [glob2-devel] A lot of small changes., Cyrille Dunant, 2007/04/02
- Re: [glob2-devel] A lot of small changes., Shawn Anderson, 2007/04/02
- Re: [glob2-devel] A lot of small changes., Kai Antweiler, 2007/04/02
- Re: [glob2-devel] A lot of small changes., Shawn Anderson, 2007/04/03
- Re: [glob2-devel] A lot of small changes., Kai Antweiler, 2007/04/03
- Re: [glob2-devel] A lot of small changes., Stéphane Magnenat, 2007/04/04
- Re: [glob2-devel] A lot of small changes., Shawn Anderson, 2007/04/04
- Re: [glob2-devel] A lot of small changes., Stéphane Magnenat, 2007/04/04
- Re: [glob2-devel] A lot of small changes., Kai Antweiler, 2007/04/04
- Re: [glob2-devel] A lot of small changes.,
Stéphane Magnenat <=
Re: [glob2-devel] A lot of small changes., Kai Antweiler, 2007/04/02
Re: [glob2-devel] A lot of small changes., Stéphane Magnenat, 2007/04/02