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

Fix implicit int -> bool conversions

parent 0f6e7790
...@@ -137,7 +137,7 @@ void EventManager::handleMediaEvent(const libvlc_event_t* event, void* data) ...@@ -137,7 +137,7 @@ void EventManager::handleMediaEvent(const libvlc_event_t* event, void* data)
cb->durationChanged( event->u.media_duration_changed.new_duration ); cb->durationChanged( event->u.media_duration_changed.new_duration );
break; break;
case libvlc_MediaParsedChanged: case libvlc_MediaParsedChanged:
cb->parsedChanged( event->u.media_parsed_changed.new_status ); cb->parsedChanged( event->u.media_parsed_changed.new_status != 0 );
break; break;
case libvlc_MediaFreed: case libvlc_MediaFreed:
cb->freed( Media( event->u.media_freed.md, true ) ); cb->freed( Media( event->u.media_freed.md, true ) );
...@@ -198,10 +198,10 @@ void EventManager::handleMediaPlayerEvent(const libvlc_event_t* event, void* dat ...@@ -198,10 +198,10 @@ void EventManager::handleMediaPlayerEvent(const libvlc_event_t* event, void* dat
cb->positionChanged( event->u.media_player_position_changed.new_position ); cb->positionChanged( event->u.media_player_position_changed.new_position );
break; break;
case libvlc_MediaPlayerSeekableChanged: case libvlc_MediaPlayerSeekableChanged:
cb->seekableChanged( event->u.media_player_seekable_changed.new_seekable ); cb->seekableChanged( event->u.media_player_seekable_changed.new_seekable != 0 );
break; break;
case libvlc_MediaPlayerPausableChanged: case libvlc_MediaPlayerPausableChanged:
cb->pausableChanged( event->u.media_player_seekable_changed.new_seekable ); cb->pausableChanged( event->u.media_player_seekable_changed.new_seekable != 0 );
break; break;
case libvlc_MediaPlayerTitleChanged: case libvlc_MediaPlayerTitleChanged:
cb->titleChanged( event->u.media_player_title_changed.new_title ); cb->titleChanged( event->u.media_player_title_changed.new_title );
......
...@@ -152,7 +152,7 @@ libvlc_state_t Media::state() ...@@ -152,7 +152,7 @@ libvlc_state_t Media::state()
bool Media::stats(libvlc_media_stats_t * p_stats) bool Media::stats(libvlc_media_stats_t * p_stats)
{ {
return libvlc_media_get_stats(m_obj, p_stats); return libvlc_media_get_stats(m_obj, p_stats) != 0;
} }
EventManager& Media::eventManager() EventManager& Media::eventManager()
...@@ -182,7 +182,7 @@ void Media::parseAsync() ...@@ -182,7 +182,7 @@ void Media::parseAsync()
bool Media::isParsed() bool Media::isParsed()
{ {
return libvlc_media_is_parsed(m_obj); return libvlc_media_is_parsed(m_obj) != 0;
} }
void Media::setUserData(void * p_new_user_data) void Media::setUserData(void * p_new_user_data)
......
...@@ -211,7 +211,7 @@ int MediaPlayer::chapterCount() ...@@ -211,7 +211,7 @@ int MediaPlayer::chapterCount()
bool MediaPlayer::willPlay() bool MediaPlayer::willPlay()
{ {
return libvlc_media_player_will_play(m_obj); return libvlc_media_player_will_play(m_obj) != 0;
} }
int MediaPlayer::chapterCountForTitle(int i_title) int MediaPlayer::chapterCountForTitle(int i_title)
...@@ -271,17 +271,17 @@ unsigned MediaPlayer::hasVout() ...@@ -271,17 +271,17 @@ unsigned MediaPlayer::hasVout()
bool MediaPlayer::isSeekable() bool MediaPlayer::isSeekable()
{ {
return libvlc_media_player_is_seekable(m_obj); return libvlc_media_player_is_seekable(m_obj) != 0;
} }
bool MediaPlayer::canPause() bool MediaPlayer::canPause()
{ {
return libvlc_media_player_can_pause(m_obj); return libvlc_media_player_can_pause(m_obj) != 0;
} }
bool MediaPlayer::programScrambled() bool MediaPlayer::programScrambled()
{ {
return libvlc_media_player_program_scrambled(m_obj); return libvlc_media_player_program_scrambled(m_obj) != 0;
} }
void MediaPlayer::nextFrame() void MediaPlayer::nextFrame()
......
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