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:
Barrett17
2018-07-31 23:41:12 +02:00
parent 5ad9670f39
commit 2d93cf97c7
+3 -3
View File
@@ -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: