[EMAIL PROTECTED] schreef:
> On Tue, 02 Jan 2007 23:45:11 -0500 Giel van Schijndel 
> <[EMAIL PROTECTED]> wrote:
>   
>> Giel van Schijndel schreef:
>>     
>>> Dennis Schridde schreef:
>>>   
>>>       
>>>>> @Dennis: if I'm still being to fuzzy about this subject just 
>>>>>           
>> say so or
>>     
>>>>> ask a specific question    
>>>>>       
>>>>>           
>>>> My problem is: What is your problem? ;)
>>>>
>>>> Really, I didn't get what the problem is...
>>>> That AL_INVALID is passed to some al* functions?
>>>> Shouldn't that be valid?
>>>> I mean if you pass an al* function AL_INVALID, doesn't it know 
>>>>         
>> that this means 
>>     
>>>> it is invalid and should not do anything?
>>>> Or is the problem that it doesn't know that?
>>>>   
>>>>     
>>>>         
>>> Firstly my problem is this: assigning a signed value to an 
>>>       
>> unsigned
>>     
>>> variable.
>>> Then secondly, for as far as I know the OpenAL functions don't 
>>>       
>> recognize
>>     
>>> AL_INVALID as being invalid (I'm quite sure of this for the 1.1 
>>>       
>> version,
>>     
>>> or is it OpenAL 1.0 that WZ uses?).
>>>       
> This is nothing new is it?  Lots of functions also can't tell if 
> something is invalid, and that is why 99.9% of all the ones I have 
> see require you to check the result.
>   
Yes, true, the problem, however, is that here we are talking about
function parameters rather than function results.
> Using -1 is also standard AFAIK.  It is easier to type that than 
> 0xffffffffff.
Yes typing -1 is indeed easier than typing 0xffffffffff. It is also
incorrect when you try to assign -1 to an unsigned variable, assigning
~0 to an unsigned variable on the other hand _is_ correct. So simply
put: don't assign -1 to unsigned variables, use ~0 for that purpose.

-- 
Giel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to