Equivalent to nullptr
Stanislav Blinov via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 3 21:08:45 PDT 2017
On Thursday, 4 May 2017 at 03:59:36 UTC, Leonardo wrote:
> On Thursday, 4 May 2017 at 02:45:30 UTC, Adam D. Ruppe wrote:
>> On Thursday, 4 May 2017 at 02:12:13 UTC, Leonardo wrote:
>>> nullptr word. How I use this?
>>
>> Does it work if you just use `null` ?
>
> No.
>
> First I got: source/app.d(45,69): Error: expression
> (*SDL_EnclosePoints)(& mousePos, 1, &ball.bbox, null) of type
> void does not have a boolean value
>
> then I change to:
> event.button.button == SDL_BUTTON_LEFT && SDL_TRUE ==
> SDL_EnclosePoints(&mousePos, 1, &ball.bbox, null)
>
> and got:
> source/app.d(45,81): Error: void has no value
> source/app.d(45,52): Error: incompatible types for ((SDL_TRUE)
> == ((*SDL_EnclosePoints)(& mousePos, 1, &ball.bbox, null))):
> 'int' and 'void'
Ahh, looks to be a bug in DerelictSDL2. null will work for that
last parameter, the problem is that the function should be
returning an SDL_bool, but in Derelict it's declared as returning
void: that's what the error message is saying.
I'll file a report, but with the conference underway, it may take
a while to get fixed.
More information about the Digitalmars-d-learn
mailing list