Variable shadowing bug?

Mike Parker aldacron at gmail.com
Tue Jun 11 18:17:45 PDT 2013


On Tuesday, 11 June 2013 at 16:37:18 UTC, denizzz wrote:

>
> sfTime* r = sfClock_getElapsedTime(sfPtr);
>
> says what sfTime can not be implictly converted to sfTime

sfClock_getElapsedTime does not return a pointer.

You're going to continue to have type mismatches because you are 
trying to use two different types interchangeably. Your sfTime 
declared in your dsfml.system module is *not* the same type as 
the one declared in Derelict. sfClock_getElapsedTime does *not* 
return a dsfml.system.sftime, but a 
derelict.sfml2.system.types.sfTime.  I strongly suggest you get 
rid of your redundant types and just publicly import 
derelict.sfml2.system.types to avoid this sort of error.


More information about the Digitalmars-d-learn mailing list