AdapterIO: Fix -Wtautological compare.
* B_MEDIA_SEEKABLE was once a flag with one bit set. Due to the complexity of streaming mediums, I had to split this flag into B_MEDIA_SEEK_BACKWARD and B_MEDIA_SEEK_FORWARD and never noticed that this broke the flag check. * Reported by Murai Takashi through gcc8.
This commit is contained in:
@@ -163,21 +163,21 @@ public:
|
|||||||
{
|
{
|
||||||
int32 flags = 0;
|
int32 flags = 0;
|
||||||
fOwner->GetFlags(&flags);
|
fOwner->GetFlags(&flags);
|
||||||
return (flags & B_MEDIA_STREAMING) == true;
|
return ((flags & B_MEDIA_STREAMING) == B_MEDIA_STREAMING);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsMutable() const
|
bool IsMutable() const
|
||||||
{
|
{
|
||||||
int32 flags = 0;
|
int32 flags = 0;
|
||||||
fOwner->GetFlags(&flags);
|
fOwner->GetFlags(&flags);
|
||||||
return (flags & B_MEDIA_MUTABLE_SIZE) == true;
|
return ((flags & B_MEDIA_MUTABLE_SIZE) == B_MEDIA_MUTABLE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsSeekable() const
|
bool IsSeekable() const
|
||||||
{
|
{
|
||||||
int32 flags = 0;
|
int32 flags = 0;
|
||||||
fOwner->GetFlags(&flags);
|
fOwner->GetFlags(&flags);
|
||||||
return (flags & B_MEDIA_SEEKABLE) == true;
|
return ((flags & B_MEDIA_SEEKABLE) == B_MEDIA_SEEKABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user