diff options
author | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-16 23:28:57 +0400 |
---|---|---|
committer | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-16 23:28:57 +0400 |
commit | e9e09d64fbc9c884e7e00f22bfa9de18b8748bb9 (patch) | |
tree | 1a147ec652bb6baef603d72fc6bb9129c416b38b /src/apps/mplayerc/PlayerPlaylistBar.cpp | |
parent | 3a990e7f323a3f68c286ad8b3395c681368ff46b (diff) |
Some warnings fixed (uninitialized local variable, unused local variable, comparison signed/unsigned type, assignment in if)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1886 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PlayerPlaylistBar.cpp')
-rw-r--r-- | src/apps/mplayerc/PlayerPlaylistBar.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp index 828bc3a6a..b700232fd 100644 --- a/src/apps/mplayerc/PlayerPlaylistBar.cpp +++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp @@ -140,12 +140,11 @@ static bool SearchFiles(CString mask, CAtlList<CString>& sl) CMediaFormats& mf = AfxGetAppSettings().Formats;
- bool fFilterKnownExts;
- WIN32_FILE_ATTRIBUTE_DATA fad;
- mask = (fFilterKnownExts = (GetFileAttributesEx(mask, GetFileExInfoStandard, &fad)
- && (fad.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)))
- ? CString(mask).TrimRight(_T("\\/")) + _T("\\*.*")
- : mask;
+ WIN32_FILE_ATTRIBUTE_DATA fad;
+ bool fFilterKnownExts = (GetFileAttributesEx(mask, GetFileExInfoStandard, &fad)
+ && (fad.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY));
+ if (fFilterKnownExts)
+ mask = CString(mask).TrimRight(_T("\\/")) + _T("\\*.*");
{
CString dir = mask.Left(max(mask.ReverseFind('\\'), mask.ReverseFind('/'))+1);
@@ -646,9 +645,11 @@ void CPlayerPlaylistBar::SetLast() void CPlayerPlaylistBar::SetCurValid(bool fValid)
{
- if(POSITION pos = m_pl.GetPos())
+ POSITION pos = m_pl.GetPos();
+ if(pos)
{
- if(m_pl.GetAt(pos).m_fInvalid = !fValid)
+ m_pl.GetAt(pos).m_fInvalid = !fValid;
+ if(!fValid)
{
int i = FindItem(pos);
m_list.RedrawItems(i, i);
@@ -658,7 +659,8 @@ void CPlayerPlaylistBar::SetCurValid(bool fValid) void CPlayerPlaylistBar::SetCurTime(REFERENCE_TIME rt)
{
- if(POSITION pos = m_pl.GetPos())
+ POSITION pos = m_pl.GetPos();
+ if(pos)
{
CPlaylistItem& pli = m_pl.GetAt(pos);
pli.m_duration = rt;
@@ -1153,7 +1155,7 @@ void CPlayerPlaylistBar::DropItemOnList() m_list.DeleteItem(m_nDragIndex);
CList<CPlaylistItem> tmp;
- UINT id = -1;
+ UINT id = (UINT)-1;
for(int i = 0; i < m_list.GetItemCount(); i++)
{
POSITION pos = (POSITION)m_list.GetItemData(i);
|