|
![](/i/fill.gif) |
In article <3d517fdb@news.povray.org>,
"Pandora" <pan### [at] pandora-software com> wrote:
> > Wrong. For example if you call a function to get the value of the
> > parameter, eg. max(function1(), function2()), the compiler can't optimize
> > that double call away unless it can inline the function in question.
>
> Easily solved by doing :
>
> a=function1();
> b=function2();
> c=max(a,b);
So something that looks like a function can't be used like one. That is
not a solution, it is a workaround. Plus, it requires two temporary
variables and three lines of code instead of one simple line.
> > Using the template solution fixes all problems.
>
> Only if you have a compiler that allows you to use templates.
If you don't have one, get one.
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |