Silence warnings

This commit is contained in:
Tomas Jakobsson 2019-03-09 00:23:13 +01:00
parent d45d339bb8
commit 5cc6bafd7d
8 changed files with 17 additions and 17 deletions

View file

@ -292,7 +292,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
{
SystemData* curSys = rootFolder->getSystem();
while (rootFolder->getChildren().size() > limit)
while ((int)rootFolder->getChildren().size() > limit)
{
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);

View file

@ -199,7 +199,7 @@ std::string getBoxartImage(const Value& v)
{
return "";
}
for (int i = 0; i < v.Size(); ++i)
for (int i = 0; i < (int)v.Size(); ++i)
{
auto& im = v[i];
std::string type = getStringOrThrow(im, "type");
@ -220,7 +220,7 @@ std::string getDeveloperString(const Value& v)
}
std::string out = "";
bool first = true;
for (int i = 0; i < v.Size(); ++i)
for (int i = 0; i < (int)v.Size(); ++i)
{
auto mapIt = resources.gamesdb_new_developers_map.find(getIntOrThrow(v[i]));
if (mapIt == resources.gamesdb_new_developers_map.cend())
@ -245,7 +245,7 @@ std::string getPublisherString(const Value& v)
}
std::string out = "";
bool first = true;
for (int i = 0; i < v.Size(); ++i)
for (int i = 0; i < (int)v.Size(); ++i)
{
auto mapIt = resources.gamesdb_new_publishers_map.find(getIntOrThrow(v[i]));
if (mapIt == resources.gamesdb_new_publishers_map.cend())
@ -270,7 +270,7 @@ std::string getGenreString(const Value& v)
}
std::string out = "";
bool first = true;
for (int i = 0; i < v.Size(); ++i)
for (int i = 0; i < (int)v.Size(); ++i)
{
auto mapIt = resources.gamesdb_new_genres_map.find(getIntOrThrow(v[i]));
if (mapIt == resources.gamesdb_new_genres_map.cend())
@ -381,7 +381,7 @@ void TheGamesDBJSONRequest::process(const std::unique_ptr<HttpReq>& req, std::ve
resources.ensureResources();
for (int i = 0; i < games.Size(); ++i)
for (int i = 0; i < (int)games.Size(); ++i)
{
auto& v = games[i];
try

View file

@ -169,7 +169,7 @@ void ScreenScraperRequest::process(const std::unique_ptr<HttpReq>& req, std::vec
}
void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, std::vector<ScraperSearchResult>& results)
void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, std::vector<ScraperSearchResult>& out_results)
{
pugi::xml_node data = xmldoc.child("Data");
pugi::xml_node game = data.child("jeu");
@ -285,7 +285,7 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, std::ve
}
results.push_back(result);
out_results.push_back(result);
} // game
}

View file

@ -52,7 +52,7 @@ bool UIModeController::listen(InputConfig * config, Input input)
mPassKeyCounter = 0; // current input is incorrect, reset counter
}
if (mPassKeyCounter == (mPassKeySequence.length()))
if (mPassKeyCounter == (int)mPassKeySequence.length())
{
unlockUIMode();
return true;

View file

@ -438,7 +438,7 @@ void ViewController::preload()
i++;
char buffer[100];
sprintf (buffer, "Loading '%s' (%d/%d)",
(*it)->getFullName().c_str(), i, SystemData::sSystemVector.size());
(*it)->getFullName().c_str(), i, (int)SystemData::sSystemVector.size());
mWindow->renderLoadingScreen(std::string(buffer));
}

View file

@ -314,7 +314,7 @@ void GridGameListView::remove(FileData *game, bool deleteFile)
int gamePos = (int)std::distance(siblings.cbegin(), gameIter);
if (gameIter != siblings.cend())
{
if ((gamePos + 1) < siblings.size())
if ((gamePos + 1) < (int)siblings.size())
{
setCursor(siblings.at(gamePos + 1));
} else if ((gamePos - 1) > 0) {

View file

@ -56,7 +56,7 @@ void GridTileComponent::update()
resize();
}
void GridTileComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element, unsigned int properties)
void GridTileComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& /*element*/, unsigned int /*properties*/)
{
Vector2f screen = Vector2f((float)Renderer::getScreenWidth(), (float)Renderer::getScreenHeight());

View file

@ -338,7 +338,7 @@ void ImageGridComponent<T>::updateTiles()
// Stop updating the tiles at highest scroll speed
if (mScrollTier == 3)
{
for (int ti = 0; ti < mTiles.size(); ti++)
for (int ti = 0; ti < (int)mTiles.size(); ti++)
{
std::shared_ptr<GridTileComponent> tile = mTiles.at(ti);
@ -354,12 +354,12 @@ void ImageGridComponent<T>::updateTiles()
// If going down, update from top to bottom
// If going up, update from bottom to top
int ti = scrollDirection == 1 ? 0 : mTiles.size() - 1;
int end = scrollDirection == 1 ? mTiles.size() : -1;
int ti = scrollDirection == 1 ? 0 : (int)mTiles.size() - 1;
int end = scrollDirection == 1 ? (int)mTiles.size() : -1;
int img = getStartPosition();
if (scrollDirection == -1)
img += mTiles.size() - 1;
img += (int)mTiles.size() - 1;
// Calculate buffer size depending on scroll speed and direction
int bufferBehind = (texBuffersForward[3] - texBuffersBehind[mScrollTier]) * mGridDimension.x();
@ -387,7 +387,7 @@ void ImageGridComponent<T>::updateTileAtPos(int tilePos, int imgPos, int bufferT
// If we have more tiles than we have to display images on screen, hide them
if(imgPos < 0 || imgPos >= size()
|| tilePos < bufferTop || tilePos >= mTiles.size() - bufferBot) // Same for tiles out of the buffer
|| tilePos < bufferTop || tilePos >= (int)mTiles.size() - bufferBot) // Same for tiles out of the buffer
{
tile->setSelected(false);
tile->setImage("");