Skip to content

Commit

Permalink
Various cppcheck perf fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi authored and popcornmix committed Jul 3, 2015
1 parent 332c2cd commit 55a9105
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion xbmc/interfaces/json-rpc/JSONUtils.h
Expand Up @@ -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());
}

Expand Down
10 changes: 5 additions & 5 deletions xbmc/storage/DetectDVDType.cpp
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion xbmc/utils/HttpRangeUtils.cpp
Expand Up @@ -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)
Expand Down
11 changes: 5 additions & 6 deletions xbmc/video/dialogs/GUIDialogSubtitles.cpp
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions xbmc/video/videosync/VideoSyncIos.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 55a9105

Please sign in to comment.