Skip to content
Permalink
Browse files

Various cppcheck perf fixes

  • Loading branch information...
tobbi authored and popcornmix committed Mar 23, 2015
1 parent 332c2cd commit 55a91051439857273e4e4a19106ff511c6eb56b9
@@ -515,7 +515,7 @@ namespace JSONRPC
return;

stringArray.clear();
for (CVariant::const_iterator_array it = jsonStringArray.begin_array(); it != jsonStringArray.end_array(); it++)
for (CVariant::const_iterator_array it = jsonStringArray.begin_array(); it != jsonStringArray.end_array(); ++it)
stringArray.push_back(it->asString());
}

@@ -64,14 +64,14 @@ CDetectDVDMedia* CDetectDVDMedia::m_pInstance = NULL;
std::string CDetectDVDMedia::m_diskLabel = "";
std::string CDetectDVDMedia::m_diskPath = "";

CDetectDVDMedia::CDetectDVDMedia() : CThread("DetectDVDMedia")
CDetectDVDMedia::CDetectDVDMedia() : CThread("DetectDVDMedia"),
m_bStartup(true), // Do not autorun on startup
m_bAutorun(false),
m_dwLastTrayState(0),
m_cdio(CLibcdio::GetInstance())
{
m_bAutorun = false;
m_bStop = false;
m_dwLastTrayState = 0;
m_bStartup = true; // Do not autorun on startup
m_pInstance = this;
m_cdio = CLibcdio::GetInstance();
}

CDetectDVDMedia::~CDetectDVDMedia()
@@ -261,7 +261,7 @@ bool CHttpRanges::Parse(const std::string& header, uint64_t totalLength)
// split the value of the "Range" header by ","
std::vector<std::string> rangeValues = StringUtils::Split(rangesValue, ",");

for (std::vector<std::string>::const_iterator range = rangeValues.begin(); range != rangeValues.end(); range++)
for (std::vector<std::string>::const_iterator range = rangeValues.begin(); range != rangeValues.end(); ++range)
{
// there must be a "-" in the range definition
if (range->find("-") == std::string::npos)
@@ -97,13 +97,12 @@ class CSubtitlesJob: public CJob

CGUIDialogSubtitles::CGUIDialogSubtitles(void)
: CGUIDialog(WINDOW_DIALOG_SUBTITLES, "DialogSubtitles.xml")
, m_subtitles(new CFileItemList)
, m_serviceItems(new CFileItemList)
, m_pausedOnRun(false)
, m_updateSubsList(false)
{
m_loadType = KEEP_IN_MEMORY;
m_subtitles = new CFileItemList;
m_serviceItems = new CFileItemList;
m_pausedOnRun = false;
m_updateSubsList = false;
m_LastAutoDownloaded = "";
m_loadType = KEEP_IN_MEMORY;
}

CGUIDialogSubtitles::~CGUIDialogSubtitles(void)
@@ -32,14 +32,13 @@
bool CVideoSyncIos::Setup(PUPDATECLOCK func)
{
CLog::Log(LOGDEBUG, "CVideoSyncIos::%s setting up OSX", __FUNCTION__);
bool setupOk = false;

//init the vblank timestamp
m_LastVBlankTime = CurrentHostCounter();
UpdateClock = func;
m_abort = false;

setupOk = InitDisplayLink();
bool setupOk = InitDisplayLink();
if (setupOk)
{
g_Windowing.Register(this);

0 comments on commit 55a9105

Please sign in to comment.
You can’t perform that action at this time.