Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/apps
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2011-08-11 00:08:23 +0400
committerUnderground78 <underground78@users.sourceforge.net>2011-08-11 00:08:23 +0400
commit8caf4b5aaf91b5ffabc65d2ac2f000d8603ba233 (patch)
tree9abcc8e8d78463d09ff1b69ec0443c71361a55e1 /src/apps
parent3f21c3923cc0793b068cf74094225dabbd5c7dbb (diff)
Fix ~130 C4018 warnings (signed/unsigned mismatch).
Patch partially by XhmikosR. git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3637 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps')
-rw-r--r--src/apps/mplayerc/MainFrm.cpp10
-rw-r--r--src/apps/mplayerc/MediaFormats.cpp14
-rw-r--r--src/apps/mplayerc/PPageFullscreen.cpp12
-rw-r--r--src/apps/mplayerc/PPageTweaks.cpp2
-rw-r--r--src/apps/mplayerc/PlayerCaptureDialog.cpp2
-rw-r--r--src/apps/mplayerc/PlayerPlaylistBar.cpp4
-rw-r--r--src/apps/mplayerc/PlayerSubresyncBar.cpp8
-rw-r--r--src/apps/mplayerc/Playlist.cpp10
-rw-r--r--src/apps/mplayerc/SelectMediaType.cpp2
-rw-r--r--src/apps/mplayerc/TunerScanDlg.cpp2
-rw-r--r--src/apps/mplayerc/mplayerc.cpp2
11 files changed, 34 insertions, 34 deletions
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index e242f707e..271de2fdd 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -4051,7 +4051,7 @@ void CMainFrame::OnDvdSub(UINT nID)
nNextStream = (nID==0?0:ulStreamsAvailable-1);
}
- if (!bIsDisabled && ((nNextStream < 0) || (nNextStream >= ulStreamsAvailable))) {
+ if (!bIsDisabled && ((nNextStream < 0) || ((ULONG)nNextStream >= ulStreamsAvailable))) {
pDVDC->SetSubpictureState(FALSE, DVD_CMD_FLAG_Block, NULL);
m_OSD.DisplayMessage (OSD_TOPLEFT, ResStr(IDS_SUBTITLE_STREAM_OFF));
} else {
@@ -8303,7 +8303,7 @@ void CMainFrame::OnNavigateSkip(UINT nID)
}
}
- if (i >= 0 && i < nChapters) {
+ if (i >= 0 && (DWORD)i < nChapters) {
SeekTo(rt);
SendStatusMessage(ResStr(IDS_AG_CHAPTER2) + CString(name), 3000);
@@ -9319,7 +9319,7 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
iMonitor--;
CAtlArray<HMONITOR> ml;
EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (LPARAM)&ml);
- if (iMonitor < ml.GetCount()) {
+ if ((size_t)iMonitor < ml.GetCount()) {
hMonitor = ml[iMonitor];
}
}
@@ -11910,7 +11910,7 @@ int CMainFrame::SearchInDir(bool DirForward)
}
qsort(f_array.GetData(), f_array.GetCount(), sizeof(fileName), compare);
- for (int i = 0; i < f_array.GetCount(); i++) {
+ for (size_t i = 0; i < f_array.GetCount(); i++) {
sl.AddTail(f_array[i].fn);
}
@@ -13570,7 +13570,7 @@ void CMainFrame::SeekTo(REFERENCE_TIME rtPos, bool fSeekToKeyFrame)
if (fSeekToKeyFrame) {
if (!m_kfs.IsEmpty()) {
int i = rangebsearch(rtPos, m_kfs);
- if (i >= 0 && i < m_kfs.GetCount()) {
+ if (i >= 0 && (size_t)i < m_kfs.GetCount()) {
rtPos = m_kfs[i];
}
}
diff --git a/src/apps/mplayerc/MediaFormats.cpp b/src/apps/mplayerc/MediaFormats.cpp
index c3d312ec7..08062e3a0 100644
--- a/src/apps/mplayerc/MediaFormats.cpp
+++ b/src/apps/mplayerc/MediaFormats.cpp
@@ -272,7 +272,7 @@ void CMediaFormats::UpdateData(bool fSave)
m_fRtspFileExtFirst = !!AfxGetApp()->GetProfileInt(_T("FileFormats"), _T("RtspFileExtFirst"), 1);
}
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
GetAt(i).UpdateData(fSave);
}
}
@@ -314,7 +314,7 @@ engine_t CMediaFormats::GetEngine(CString path)
}
}
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
CMediaFormatCategory& mfc = GetAt(i);
if (mfc.FindExt(ext)) {
return mfc.GetEngineType();
@@ -334,7 +334,7 @@ bool CMediaFormats::FindExt(CString ext, bool fAudioOnly)
ext.TrimLeft(_T("."));
if (!ext.IsEmpty()) {
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
CMediaFormatCategory& mfc = GetAt(i);
if ((!fAudioOnly || mfc.IsAudioOnly()) && mfc.FindExt(ext)) {
return(true);
@@ -352,7 +352,7 @@ void CMediaFormats::GetFilter(CString& filter, CAtlArray<CString>& mask)
filter += ResStr(IDS_AG_MEDIAFILES);
mask.Add(_T(""));
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
strTemp = GetAt(i).GetFilter() + _T(";");
mask[0] += strTemp;
filter += strTemp;
@@ -361,7 +361,7 @@ void CMediaFormats::GetFilter(CString& filter, CAtlArray<CString>& mask)
filter.TrimRight(_T(";"));
filter += _T("|");
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
CMediaFormatCategory& mfc = GetAt(i);
filter += mfc.GetDescription() + _T("|" + GetAt(i).GetFilter() + _T("|"));
mask.Add(mfc.GetFilter());
@@ -379,7 +379,7 @@ void CMediaFormats::GetAudioFilter(CString& filter, CAtlArray<CString>& mask)
filter += ResStr(IDS_AG_AUDIOFILES);
mask.Add(_T(""));
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
CMediaFormatCategory& mfc = GetAt(i);
if (!mfc.IsAudioOnly() || mfc.GetEngineType() != DirectShow) {
continue;
@@ -393,7 +393,7 @@ void CMediaFormats::GetAudioFilter(CString& filter, CAtlArray<CString>& mask)
filter.TrimRight(_T(";"));
filter += _T("|");
- for (int i = 0; i < GetCount(); i++) {
+ for (size_t i = 0; i < GetCount(); i++) {
CMediaFormatCategory& mfc = GetAt(i);
if (!mfc.IsAudioOnly() || mfc.GetEngineType() != DirectShow) {
continue;
diff --git a/src/apps/mplayerc/PPageFullscreen.cpp b/src/apps/mplayerc/PPageFullscreen.cpp
index bedc9f461..6875f4f73 100644
--- a/src/apps/mplayerc/PPageFullscreen.cpp
+++ b/src/apps/mplayerc/PPageFullscreen.cpp
@@ -162,22 +162,22 @@ BOOL CPPageFullscreen::OnApply()
m_AutoChangeFullscrRes.bEnabled = !!m_fSetFullscreenRes;
if (m_AutoChangeFullscrRes.bEnabled) {
- if (iSel_24 >= 0 && iSel_24 < m_dms.GetCount()) {
+ if (iSel_24 >= 0 && (size_t)iSel_24 < m_dms.GetCount()) {
m_AutoChangeFullscrRes.dmFullscreenRes24Hz = m_dms[m_dispmode24combo.GetCurSel()];
}
- if (iSel_25 >= 0 && iSel_25 < m_dms.GetCount()) {
+ if (iSel_25 >= 0 && (size_t)iSel_25 < m_dms.GetCount()) {
m_AutoChangeFullscrRes.dmFullscreenRes25Hz = m_dms[m_dispmode25combo.GetCurSel()];
}
- if (iSel_30 >= 0 && iSel_30 < m_dms.GetCount()) {
+ if (iSel_30 >= 0 && (size_t)iSel_30 < m_dms.GetCount()) {
m_AutoChangeFullscrRes.dmFullscreenRes30Hz = m_dms[m_dispmode30combo.GetCurSel()];
}
- if (iSel_Other >= 0 && iSel_Other < m_dms.GetCount()) {
+ if (iSel_Other >= 0 && (size_t)iSel_Other < m_dms.GetCount()) {
m_AutoChangeFullscrRes.dmFullscreenResOther = m_dms[m_dispmodeOthercombo.GetCurSel()];
}
- if (iSel_23 >= 0 && iSel_23 < m_dms.GetCount()) {
+ if (iSel_23 >= 0 && (size_t)iSel_23 < m_dms.GetCount()) {
m_AutoChangeFullscrRes.dmFullscreenRes23d976Hz = m_dms[m_dispmode23d976combo.GetCurSel()];
}
- if (iSel_29 >= 0 && iSel_29 < m_dms.GetCount()) {
+ if (iSel_29 >= 0 && (size_t)iSel_29 < m_dms.GetCount()) {
m_AutoChangeFullscrRes.dmFullscreenRes29d97Hz = m_dms[m_dispmode29d97combo.GetCurSel()];
}
}
diff --git a/src/apps/mplayerc/PPageTweaks.cpp b/src/apps/mplayerc/PPageTweaks.cpp
index 0ef49fc18..40e5d6811 100644
--- a/src/apps/mplayerc/PPageTweaks.cpp
+++ b/src/apps/mplayerc/PPageTweaks.cpp
@@ -124,7 +124,7 @@ BOOL CPPageTweaks::OnInitDialog()
CAtlArray<CString> fntl;
EnumFontFamilies(dc, NULL,(FONTENUMPROC)EnumFontProc, (LPARAM)&fntl);
DeleteDC(dc);
- for (int i=0; i< fntl.GetCount(); i++) {
+ for (size_t i=0; i< fntl.GetCount(); i++) {
if (i>0 && fntl[i-1] == fntl[i]) {
continue;
}
diff --git a/src/apps/mplayerc/PlayerCaptureDialog.cpp b/src/apps/mplayerc/PlayerCaptureDialog.cpp
index 143f748e3..5339cb279 100644
--- a/src/apps/mplayerc/PlayerCaptureDialog.cpp
+++ b/src/apps/mplayerc/PlayerCaptureDialog.cpp
@@ -1134,7 +1134,7 @@ void CPlayerCaptureDialog::SetupAudioControls(
if (pAMAIM.GetCount() > 0) {
m_pAMAIM.Copy(pAMAIM);
- size_t iSel = -1;
+ size_t iSel = MAXSIZE_T;
for (size_t i = 0; i < m_pAMAIM.GetCount(); i++) {
CComQIPtr<IPin> pPin = m_pAMAIM[i];
diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp
index 4a394b331..8c0dc6efa 100644
--- a/src/apps/mplayerc/PlayerPlaylistBar.cpp
+++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp
@@ -175,7 +175,7 @@ static bool SearchFiles(CString mask, CAtlList<CString>& sl)
CString path = dir + fd.cFileName;
if (!fFilterKnownExts || mf.FindExt(ext)) {
- for (int i = 0; i < mf.GetCount(); i++) {
+ for (size_t i = 0; i < mf.GetCount(); i++) {
CMediaFormatCategory& mfc = mf.GetAt(i);
/* playlist files are skipped when playing the contents of an entire directory */
if ((mfc.FindExt(ext)) && (mf[i].GetLabel().CompareNoCase(_T("pls")) != 0)) {
@@ -373,7 +373,7 @@ bool CPlayerPlaylistBar::ParseMPCPlayList(CString fn)
}
qsort(idx.GetData(), idx.GetCount(), sizeof(int), s_int_comp);
- for (int i = 0; i < idx.GetCount(); i++) {
+ for (size_t i = 0; i < idx.GetCount(); i++) {
m_pl.AddTail(pli[idx[i]]);
}
diff --git a/src/apps/mplayerc/PlayerSubresyncBar.cpp b/src/apps/mplayerc/PlayerSubresyncBar.cpp
index 382e87116..0c8140b19 100644
--- a/src/apps/mplayerc/PlayerSubresyncBar.cpp
+++ b/src/apps/mplayerc/PlayerSubresyncBar.cpp
@@ -443,7 +443,7 @@ void CPlayerSubresyncBar::UpdateStrings()
void CPlayerSubresyncBar::GetCheck(int iItem, bool& fStartMod, bool& fEndMod, bool& fStartAdj, bool& fEndAdj)
{
- if (0 <= iItem && iItem < m_sts.GetCount()) {
+ if (0 <= iItem && (size_t)iItem < m_sts.GetCount()) {
int nCheck = (int)m_list.GetItemData(iItem);
fStartMod = !!(nCheck&TSMOD);
fEndMod = !!(nCheck&TEMOD);
@@ -454,7 +454,7 @@ void CPlayerSubresyncBar::GetCheck(int iItem, bool& fStartMod, bool& fEndMod, bo
void CPlayerSubresyncBar::SetCheck(int iItem, bool fStart, bool fEnd)
{
- if (0 <= iItem && iItem < m_sts.GetCount()) {
+ if (0 <= iItem && (size_t)iItem < m_sts.GetCount()) {
SubTime& st = m_subtimes[iItem];
int nCheck = (int)m_list.GetItemData(iItem) & TSEP;
@@ -1048,7 +1048,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult)
stss = styles[j];
pages[j]->GetStyle(*stss);
- for (int i = 0; i < m_sts.GetCount(); i++) {
+ for (size_t i = 0; i < m_sts.GetCount(); i++) {
if (m_sts.GetStyle(i) == stss) {
CString str;
m_list.SetItemText(i, COL_TEXT, m_sts.GetStr(i, true));
@@ -1340,7 +1340,7 @@ bool CPlayerSubresyncBar::ShiftSubtitle(int nItem, long lValue, __int64& rtPos)
bool bRet = false;
if ((nItem == 0) || (m_subtimes[nItem-1].newend < m_subtimes[nItem].newstart + lValue)) {
- for (int i= nItem; i<m_sts.GetCount(); i++) {
+ for (size_t i= nItem; i<m_sts.GetCount(); i++) {
m_subtimes[i].newstart += lValue;
m_subtimes[i].newend += lValue;
m_subtimes[i].orgstart += lValue;
diff --git a/src/apps/mplayerc/Playlist.cpp b/src/apps/mplayerc/Playlist.cpp
index 1acbf3773..a2fb81ffb 100644
--- a/src/apps/mplayerc/Playlist.cpp
+++ b/src/apps/mplayerc/Playlist.cpp
@@ -210,7 +210,7 @@ void CPlaylistItem::AutoLoadFiles()
CAtlArray<SubFile> ret;
GetSubFileNames(fn, paths, ret);
- for (int i = 0; i < ret.GetCount(); i++) {
+ for (size_t i = 0; i < ret.GetCount(); i++) {
if (!FindFileInList(m_subs, ret[i].fn)) {
m_subs.AddTail(ret[i].fn);
}
@@ -283,7 +283,7 @@ void CPlaylist::SortById()
a[i].n = GetAt(pos).m_id, a[i].pos = pos;
}
qsort(a.GetData(), a.GetCount(), sizeof(plsort_t), compare);
- for (int i = 0; i < a.GetCount(); i++) {
+ for (size_t i = 0; i < a.GetCount(); i++) {
AddTail(GetAt(a[i].pos));
__super::RemoveAt(a[i].pos);
if (m_pos == a[i].pos) {
@@ -303,7 +303,7 @@ void CPlaylist::SortByName()
a[i].pos = pos;
}
qsort(a.GetData(), a.GetCount(), sizeof(plsort2_t), compare2);
- for (int i = 0; i < a.GetCount(); i++) {
+ for (size_t i = 0; i < a.GetCount(); i++) {
AddTail(GetAt(a[i].pos));
__super::RemoveAt(a[i].pos);
if (m_pos == a[i].pos) {
@@ -321,7 +321,7 @@ void CPlaylist::SortByPath()
a[i].str = GetAt(pos).m_fns.GetHead(), a[i].pos = pos;
}
qsort(a.GetData(), a.GetCount(), sizeof(plsort2_t), compare2);
- for (int i = 0; i < a.GetCount(); i++) {
+ for (size_t i = 0; i < a.GetCount(); i++) {
AddTail(GetAt(a[i].pos));
__super::RemoveAt(a[i].pos);
if (m_pos == a[i].pos) {
@@ -341,7 +341,7 @@ void CPlaylist::Randomize()
}
qsort(a.GetData(), a.GetCount(), sizeof(plsort_t), compare);
CList<CPlaylistItem> pl;
- for (int i = 0; i < a.GetCount(); i++) {
+ for (size_t i = 0; i < a.GetCount(); i++) {
AddTail(GetAt(a[i].pos));
__super::RemoveAt(a[i].pos);
if (m_pos == a[i].pos) {
diff --git a/src/apps/mplayerc/SelectMediaType.cpp b/src/apps/mplayerc/SelectMediaType.cpp
index c585f9199..e91dc6e68 100644
--- a/src/apps/mplayerc/SelectMediaType.cpp
+++ b/src/apps/mplayerc/SelectMediaType.cpp
@@ -61,7 +61,7 @@ BOOL CSelectMediaType::OnInitDialog()
{
CCmdUIDialog::OnInitDialog();
- for (int i = 0; i < m_guids.GetCount(); i++) {
+ for (size_t i = 0; i < m_guids.GetCount(); i++) {
m_guidsctrl.AddString(GetMediaTypeName(m_guids[i]));
}
diff --git a/src/apps/mplayerc/TunerScanDlg.cpp b/src/apps/mplayerc/TunerScanDlg.cpp
index 944b160be..fc52cffbf 100644
--- a/src/apps/mplayerc/TunerScanDlg.cpp
+++ b/src/apps/mplayerc/TunerScanDlg.cpp
@@ -197,7 +197,7 @@ LRESULT CTunerScanDlg::OnNewChannel(WPARAM wParam, LPARAM lParam)
nChannelNumber = Channel.GetOriginNumber();
// Insert new channel so that channels are sorted by their logical number
for (nItem=0; nItem<m_ChannelList.GetItemCount(); nItem++) {
- if (m_ChannelList.GetItemData(nItem) > nChannelNumber) {
+ if ((int)m_ChannelList.GetItemData(nItem) > nChannelNumber) {
break;
}
}
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp
index 584d1d4a0..0b56a9bbd 100644
--- a/src/apps/mplayerc/mplayerc.cpp
+++ b/src/apps/mplayerc/mplayerc.cpp
@@ -1336,7 +1336,7 @@ void CMPlayerCApp::RegisterHotkeys()
}
nInputDeviceCount = GetRawInputDeviceList (InputDeviceList, &nInputDeviceCount, sizeof(RAWINPUTDEVICELIST));
- for (int i=0; i<nInputDeviceCount; i++) {
+ for (UINT i=0; i<nInputDeviceCount; i++) {
UINT nTemp = sizeof(DevInfo);
if (GetRawInputDeviceInfo (InputDeviceList[i].hDevice, RIDI_DEVICEINFO, &DevInfo, &nTemp)>0) {