Skip to content

Commit

Permalink
[Cores] Use initialization list.
Browse files Browse the repository at this point in the history
  • Loading branch information
ace20022 committed Apr 5, 2013
1 parent 658ef93 commit 666cf54
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.h
Expand Up @@ -61,7 +61,7 @@ extern "C" {
class CDVDCodecOption
{
public:
CDVDCodecOption(std::string name, std::string value) { m_name = name; m_value = value; }
CDVDCodecOption(const std::string& name, const std::string& value) : m_name(name), m_value(value) {}
std::string m_name;
std::string m_value;
};
Expand Down
5 changes: 1 addition & 4 deletions xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodec.h
Expand Up @@ -39,10 +39,7 @@ class CDVDOverlayCodec
{
public:

CDVDOverlayCodec(const char* name)
{
m_codecName = name;
}
CDVDOverlayCodec(const char* name) : m_codecName(name) {}

virtual ~CDVDOverlayCodec() {}

Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/dvdplayer/DVDMessage.h
Expand Up @@ -211,7 +211,7 @@ class CDVDMsgPlayerSetSubtitleStream : public CDVDMsg
class CDVDMsgPlayerSetState : public CDVDMsg
{
public:
CDVDMsgPlayerSetState(std::string& state) : CDVDMsg(PLAYER_SET_STATE) { m_state = state; }
CDVDMsgPlayerSetState(std::string& state) : CDVDMsg(PLAYER_SET_STATE), m_state(state) {}
std::string GetState() { return m_state; }
private:
std::string m_state;
Expand Down
3 changes: 1 addition & 2 deletions xbmc/cores/dvdplayer/DVDMessageQueue.cpp
Expand Up @@ -27,9 +27,8 @@

using namespace std;

CDVDMessageQueue::CDVDMessageQueue(const string &owner) : m_hEvent(true)
CDVDMessageQueue::CDVDMessageQueue(const string &owner) : m_hEvent(true), m_owner(owner)
{
m_owner = owner;
m_iDataSize = 0;
m_bAbortRequest = false;
m_bInitialized = false;
Expand Down
5 changes: 1 addition & 4 deletions xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h
Expand Up @@ -42,10 +42,7 @@ class CDVDSubtitleParserCollection
: public CDVDSubtitleParser
{
public:
CDVDSubtitleParserCollection(const std::string& strFile)
{
m_filename = strFile;
}
CDVDSubtitleParserCollection(const std::string& strFile) : m_filename(strFile) {}
virtual ~CDVDSubtitleParserCollection() { }
virtual CDVDOverlay* Parse(double iPts)
{
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/omxplayer/OMXPlayerVideo.cpp
Expand Up @@ -70,6 +70,7 @@ OMXPlayerVideo::OMXPlayerVideo(OMXClock *av_clock,
: CThread("COMXPlayerVideo")
, m_messageQueue("video")
, m_messageParent(parent)
, m_codecname("")
{
m_av_clock = av_clock;
m_pOverlayContainer = pOverlayContainer;
Expand All @@ -80,7 +81,6 @@ OMXPlayerVideo::OMXPlayerVideo(OMXClock *av_clock,
m_hdmi_clock_sync = false;
m_speed = DVD_PLAYSPEED_NORMAL;
m_stalled = false;
m_codecname = "";
m_iSubtitleDelay = 0;
m_FlipTimeStamp = 0.0;
m_bRenderSubs = false;
Expand Down
3 changes: 1 addition & 2 deletions xbmc/cores/omxplayer/OMXVideo.cpp
Expand Up @@ -76,14 +76,13 @@

#define MAX_TEXT_LENGTH 1024

COMXVideo::COMXVideo()
COMXVideo::COMXVideo() : m_video_codec_name("")
{
m_is_open = false;
m_Pause = false;
m_extradata = NULL;
m_extrasize = 0;
m_video_convert = false;
m_video_codec_name = "";
m_deinterlace = false;
m_hdmi_clock_sync = false;
m_drop_state = false;
Expand Down

0 comments on commit 666cf54

Please sign in to comment.