Re: UInt32 and ==
Re: UInt32 and ==
- Subject: Re: UInt32 and ==
- From: Ondra Cada <email@hidden>
- Date: Tue, 9 Apr 2002 16:02:30 +0200
On Tuesday, April 9, 2002, at 03:46 , Jaeho Chang wrote:
This is not a Cocoa question, but may be Obj-C specific...
(or may be a very basic problem that I'm missing...)
Question:
auParamInfo.flags is declared as UInt32,
and kAudioUnitParameterFlag_IsReadable = (1L << 30)
This does not return right results:
- (Boolean) isReadable
{
return (auParamInfo.flags & kAudioUnitParameterFlag_IsReadable);
}
but this does:
- (Boolean) isReadable
{
return (((UInt32) auParamInfo.flags &
kAudioUnitParameterFlag_IsReadable) == ((UInt32)
kAudioUnitParameterFlag_IsReadable));
}
Could someone explain why this is?
Looks like the Boolean of yours is a short int. If really so, the
behaviour's as expected (but compiler should warn?!?).
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.