Commit 8ff33f8a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fix implicit int to bool conversions

parent d87c35bf
...@@ -408,7 +408,7 @@ class MediaPlayerEventManager : public EventManager ...@@ -408,7 +408,7 @@ class MediaPlayerEventManager : public EventManager
return handle( libvlc_MediaPlayerSeekableChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data) return handle( libvlc_MediaPlayerSeekableChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
{ {
auto callback = static_cast<DecayPtr<Func>>( data ); auto callback = static_cast<DecayPtr<Func>>( data );
(*callback)( e->u.media_player_seekable_changed.new_seekable ); (*callback)( e->u.media_player_seekable_changed.new_seekable != 0 );
}); });
} }
...@@ -419,7 +419,7 @@ class MediaPlayerEventManager : public EventManager ...@@ -419,7 +419,7 @@ class MediaPlayerEventManager : public EventManager
return handle( libvlc_MediaPlayerSeekableChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data) return handle( libvlc_MediaPlayerSeekableChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
{ {
auto callback = static_cast<DecayPtr<Func>>( data ); auto callback = static_cast<DecayPtr<Func>>( data );
(*callback)( e->u.media_player_seekable_changed.new_seekable ); (*callback)( e->u.media_player_seekable_changed.new_seekable != 0 );
}); });
} }
...@@ -474,7 +474,7 @@ class MediaPlayerEventManager : public EventManager ...@@ -474,7 +474,7 @@ class MediaPlayerEventManager : public EventManager
return handle( libvlc_MediaPlayerScrambledChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data) return handle( libvlc_MediaPlayerScrambledChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
{ {
auto callback = static_cast<DecayPtr<Func>>( data ); auto callback = static_cast<DecayPtr<Func>>( data );
(*callback)( e->u.media_player_scrambled_changed.new_scrambled ); (*callback)( e->u.media_player_scrambled_changed.new_scrambled != 0 );
}); });
} }
......
...@@ -293,7 +293,7 @@ public: ...@@ -293,7 +293,7 @@ public:
*/ */
bool stats(libvlc_media_stats_t * p_stats) bool stats(libvlc_media_stats_t * p_stats)
{ {
return libvlc_media_get_stats(*this,p_stats); return libvlc_media_get_stats(*this, p_stats) != 0;
} }
/** /**
...@@ -372,7 +372,7 @@ public: ...@@ -372,7 +372,7 @@ public:
*/ */
bool isParsed() bool isParsed()
{ {
return libvlc_media_is_parsed(*this); return libvlc_media_is_parsed(*this) != 0;
} }
/** /**
......
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
*/ */
bool isRunning() bool isRunning()
{ {
return libvlc_media_discoverer_is_running(*this); return libvlc_media_discoverer_is_running(*this) != 0;
} }
private: private:
......
...@@ -199,7 +199,7 @@ public: ...@@ -199,7 +199,7 @@ public:
*/ */
bool isReadonly() bool isReadonly()
{ {
return libvlc_media_list_is_readonly(*this); return libvlc_media_list_is_readonly(*this) != 0;
} }
/** /**
......
...@@ -391,7 +391,7 @@ public: ...@@ -391,7 +391,7 @@ public:
*/ */
bool willPlay() bool willPlay()
{ {
return libvlc_media_player_will_play(*this); return libvlc_media_player_will_play(*this) != 0;
} }
/** /**
...@@ -518,7 +518,7 @@ public: ...@@ -518,7 +518,7 @@ public:
*/ */
bool isSeekable() bool isSeekable()
{ {
return libvlc_media_player_is_seekable(*this); return libvlc_media_player_is_seekable(*this) != 0;
} }
/** /**
...@@ -528,7 +528,7 @@ public: ...@@ -528,7 +528,7 @@ public:
*/ */
bool canPause() bool canPause()
{ {
return libvlc_media_player_can_pause(*this); return libvlc_media_player_can_pause(*this) != 0;
} }
/** /**
...@@ -540,7 +540,7 @@ public: ...@@ -540,7 +540,7 @@ public:
*/ */
bool programScrambled() bool programScrambled()
{ {
return libvlc_media_player_program_scrambled(*this); return libvlc_media_player_program_scrambled(*this) != 0;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment