Skip to content

Commit

Permalink
[WIN32] changed: use const and init lists where appropriated + cosmet…
Browse files Browse the repository at this point in the history
…ics.
  • Loading branch information
WiSo committed Jan 29, 2012
1 parent c3a1fef commit be630d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
5 changes: 1 addition & 4 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,10 +1033,7 @@ bool CApplication::InitDirectoriesWin32()
VECSOURCES::const_iterator it;
for(it=vShare.begin();it!=vShare.end();++it)
if(g_mediaManager.GetDriveStatus(it->strPath) == DRIVE_CLOSED_MEDIA_PRESENT)
{
CDetectDisc* discdetection = new CDetectDisc(it->strPath, false);
CJobManager::GetInstance().AddJob(discdetection, NULL);
}
CJobManager::GetInstance().AddJob(new CDetectDisc(it->strPath, false), NULL);
// remove end

return true;
Expand Down
5 changes: 2 additions & 3 deletions xbmc/storage/DetectDVDType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,9 @@ const CStdString &CDetectDVDMedia::GetDVDPath()
return m_diskPath;
}

CDetectDisc::CDetectDisc(const CStdString &strPath, bool bautorun)
CDetectDisc::CDetectDisc(const CStdString &strPath, const bool bautorun)
: m_strPath(strPath), m_bautorun(bautorun)
{
m_strPath = strPath;
m_bautorun = bautorun;
}

bool CDetectDisc::DoWork()
Expand Down
2 changes: 1 addition & 1 deletion xbmc/storage/DetectDVDType.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CDetectDVDMedia : public CThread
class CDetectDisc : public CJob
{
public:
CDetectDisc(const CStdString &strPath, bool bautorun);
CDetectDisc(const CStdString &strPath, const bool bautorun);
bool DoWork();

private:
Expand Down
5 changes: 1 addition & 4 deletions xbmc/windowing/windows/WinEventsWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,7 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
case SHCNE_MEDIAINSERTED:
CLog::Log(LOGDEBUG, __FUNCTION__": Drive %s Media has arrived.", drivePath);
if (GetDriveType(drivePath) == DRIVE_CDROM)
{
CDetectDisc* discdetection = new CDetectDisc(drivePath, true);
CJobManager::GetInstance().AddJob(discdetection, NULL);
}
CJobManager::GetInstance().AddJob(new CDetectDisc(drivePath, true), NULL);
else
CWin32StorageProvider::SetEvent();
break;
Expand Down

0 comments on commit be630d3

Please sign in to comment.