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

MediaList: remove unnecessary temporary variables

parent b55f5c00
......@@ -4,6 +4,7 @@
* Copyright © 2014 the VideoLAN team
*
* Authors: Alexey Sokolov <alexey@alexeysokolov.co.cc>
* Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
......@@ -20,22 +21,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#include <vlc.hpp>
namespace VLC {
namespace VLC
{
MediaList::MediaList(const MediaList& another)
MediaList::MediaList(const MediaList& another)
{
m_obj = another.m_obj;
retain();
}
const MediaList& MediaList::operator=(const MediaList& another)
const MediaList& MediaList::operator=(const MediaList& another)
{
if (this == &another)
if (this == &another)
{
return *this;
}
......@@ -45,12 +44,12 @@ const MediaList& MediaList::operator=(const MediaList& another)
return *this;
}
bool MediaList::operator==(const MediaList& another) const
bool MediaList::operator==(const MediaList& another) const
{
return m_obj == another.m_obj;
}
MediaList::~MediaList()
MediaList::~MediaList()
{
release();
}
......@@ -94,68 +93,52 @@ void MediaList::setMedia( Media &md )
int MediaList::addMedia(Media& p_md)
{
int c_result = libvlc_media_list_add_media( m_obj, p_md );
int result = c_result;
return result;
return libvlc_media_list_add_media( m_obj, p_md );
}
int MediaList::insertMedia( Media& md, int pos )
{
int c_result = libvlc_media_list_insert_media( m_obj, md, pos );
int result = c_result;
return result;
return libvlc_media_list_insert_media( m_obj, md, pos );
}
int MediaList::removeIndex(int i_pos)
int MediaList::removeIndex(int i_pos)
{
int c_result = libvlc_media_list_remove_index(m_obj, i_pos);
int result = c_result;
return result;
return libvlc_media_list_remove_index(m_obj, i_pos);
}
int MediaList::count()
int MediaList::count()
{
int c_result = libvlc_media_list_count(m_obj);
int result = c_result;
return result;
return libvlc_media_list_count(m_obj);
}
Media MediaList::itemAtIndex(int i_pos)
Media MediaList::itemAtIndex(int i_pos)
{
libvlc_media_t * c_result = libvlc_media_list_item_at_index(m_obj, i_pos);
Media result = c_result;
return result;
return libvlc_media_list_item_at_index(m_obj, i_pos);
}
int MediaList::indexOfItem( Media &md )
{
int c_result = libvlc_media_list_index_of_item( m_obj, md );
int result = c_result;
return result;
return libvlc_media_list_index_of_item( m_obj, md );
}
bool MediaList::isReadonly()
bool MediaList::isReadonly()
{
int c_result = libvlc_media_list_is_readonly(m_obj);
bool result = c_result;
return result;
return libvlc_media_list_is_readonly(m_obj);
}
void MediaList::lock()
void MediaList::lock()
{
libvlc_media_list_lock(m_obj);
}
void MediaList::unlock()
void MediaList::unlock()
{
libvlc_media_list_unlock(m_obj);
}
libvlc_event_manager_t * MediaList::eventManager()
libvlc_event_manager_t * MediaList::eventManager()
{
libvlc_event_manager_t * c_result = libvlc_media_list_event_manager(m_obj);
libvlc_event_manager_t * result = c_result;
return result;
return libvlc_media_list_event_manager(m_obj);
}
MediaList::MediaList( Internal::InternalPtr ptr )
......@@ -163,12 +146,12 @@ MediaList::MediaList( Internal::InternalPtr ptr )
{
}
void MediaList::release()
void MediaList::release()
{
libvlc_media_list_release(m_obj);
}
void MediaList::retain()
void MediaList::retain()
{
libvlc_media_list_retain(m_obj);
}
......
......@@ -4,6 +4,7 @@
* Copyright © 2014 the VideoLAN team
*
* Authors: Alexey Sokolov <alexey@alexeysokolov.co.cc>
* Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
......@@ -20,20 +21,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#ifndef LIBVLC_CXX_MEDIALIST_H
#define LIBVLC_CXX_MEDIALIST_H
#include <libvlc_common.hpp>
#include "libvlcpp.hpp"
namespace VLC
namespace VLC
{
class MediaList : public Internal<libvlc_media_list_t>
{
public:
......
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