pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3


From: David Philippi
Subject: Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3
Date: Sat, 12 Oct 2002 20:29:22 +0200
User-agent: KMail/1.4.1

On Saturday 12 October 2002 19:54, Neil Hotmail wrote:
> A good optimising compiler should detect the lifetimes of the variables,
> and where they are the same size and do not overlap in their lifetime, it
> should reuse them, declaring it as two different pointers should result in
> exactly the same code (byte for byte) being generated, so the cost is
> nothing.

I guess you're right. As long as they are both inside the same block of code 
this should work. If both variables are of the same type as in this case 
it's very likely that it'll happen. 
So the cost is to accept shadowing or to find another name for the second one 
that's as good as the old one.

Bye David





reply via email to

[Prev in Thread] Current Thread [Next in Thread]