eliminate remained compiler warnings
This commit is contained in:
@@ -475,7 +475,7 @@ string DisplayColumns(string st)
|
||||
if (result.length() > where)
|
||||
result = result.substr(0, where);
|
||||
else
|
||||
for (int i = result.length(); i <= where && i < COLS; i++, result += ' ') { }
|
||||
for (size_t i = result.length(); i <= where && i < size_t(COLS); i++, result += ' ') { }
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ template <class T> void Menu<T>::Refresh()
|
||||
return;
|
||||
}
|
||||
int MaxBeginning = itsOptions.size() < itsHeight ? 0 : itsOptions.size()-itsHeight;
|
||||
if (itsHighlight > itsBeginning+itsHeight-1)
|
||||
if (itsHighlight > itsBeginning+int(itsHeight)-1)
|
||||
itsBeginning = itsHighlight-itsHeight+1;
|
||||
if (itsBeginning < 0)
|
||||
itsBeginning = 0;
|
||||
|
||||
@@ -853,7 +853,7 @@ int Connection::CheckForErrors()
|
||||
{
|
||||
// this is to avoid setting too small max size as we check it before fetching current status
|
||||
// setting real max playlist length is in UpdateStatus()
|
||||
if (itsConnection->errorCode == MPD_ACK_ERROR_PLAYLIST_MAX && itsMaxPlaylistLength == -1)
|
||||
if (itsConnection->errorCode == MPD_ACK_ERROR_PLAYLIST_MAX && itsMaxPlaylistLength == size_t(-1))
|
||||
itsMaxPlaylistLength = 0;
|
||||
|
||||
if (itsErrorHandler)
|
||||
|
||||
@@ -123,8 +123,8 @@ namespace MPD
|
||||
long long GetOldPlaylistID() const { return isConnected && itsOldStatus ? itsOldStatus->playlist : -1; }
|
||||
int GetElapsedTime() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->elapsedTime : -1; }
|
||||
|
||||
unsigned int GetMaxPlaylistLength() const { return itsMaxPlaylistLength; }
|
||||
int GetPlaylistLength() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->playlistLength : 0; }
|
||||
size_t GetMaxPlaylistLength() const { return itsMaxPlaylistLength; }
|
||||
size_t GetPlaylistLength() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->playlistLength : 0; }
|
||||
void GetPlaylistChanges(long long, SongList &) const;
|
||||
|
||||
const std::string & GetErrorMessage() const { return itsErrorMessage; }
|
||||
@@ -185,7 +185,7 @@ namespace MPD
|
||||
|
||||
std::string itsErrorMessage;
|
||||
int itsErrorCode;
|
||||
unsigned int itsMaxPlaylistLength;
|
||||
size_t itsMaxPlaylistLength;
|
||||
|
||||
std::string itsHost;
|
||||
int itsPort;
|
||||
|
||||
@@ -2114,7 +2114,7 @@ int main(int argc, char *argv[])
|
||||
mPlaylist->GetSelected(list);
|
||||
|
||||
for (vector<size_t>::iterator it = list.begin(); it != list.end(); it++)
|
||||
if (*it == now_playing && list.front() > 0)
|
||||
if (*it == size_t(now_playing) && list.front() > 0)
|
||||
mPlaylist->BoldOption(now_playing, 0);
|
||||
|
||||
vector<size_t> origs(list);
|
||||
@@ -2217,7 +2217,7 @@ int main(int argc, char *argv[])
|
||||
mPlaylist->GetSelected(list);
|
||||
|
||||
for (vector<size_t>::iterator it = list.begin(); it != list.end(); it++)
|
||||
if (*it == now_playing && list.back() < mPlaylist->Size()-1)
|
||||
if (*it == size_t(now_playing) && list.back() < mPlaylist->Size()-1)
|
||||
mPlaylist->BoldOption(now_playing, 0);
|
||||
|
||||
vector<size_t> origs(list);
|
||||
@@ -2244,7 +2244,7 @@ int main(int argc, char *argv[])
|
||||
size_t from, to;
|
||||
from = to = mPlaylist->Choice();
|
||||
// unbold now playing as if song changes during move, this won't be unbolded.
|
||||
if (to == now_playing && to < mPlaylist->Size()-1)
|
||||
if (to == size_t(now_playing) && to < mPlaylist->Size()-1)
|
||||
mPlaylist->BoldOption(now_playing, 0);
|
||||
while (Keypressed(input, Key.MvSongDown) && to < mPlaylist->Size()-1)
|
||||
{
|
||||
@@ -2938,7 +2938,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
for (size_t i = 0; i < mPlaylist->Size(); i++)
|
||||
{
|
||||
if (!mPlaylist->isSelected(i) && i != now_playing)
|
||||
if (!mPlaylist->isSelected(i) && i != size_t(now_playing))
|
||||
Mpd->QueueDeleteSongId(mPlaylist->at(i).GetID());
|
||||
}
|
||||
// if mpd deletes now playing song deletion will be sluggishly slow
|
||||
|
||||
Reference in New Issue
Block a user