Skip to content

Commit 92b7bc4

Browse files
authored
Merge pull request Aloshi#545 from tomaz82/silence_warnings
Silence warnings
2 parents d45d339 + 5cc6baf commit 92b7bc4

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

es-app/src/CollectionSystemManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
292292
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
293293
{
294294
SystemData* curSys = rootFolder->getSystem();
295-
while (rootFolder->getChildren().size() > limit)
295+
while ((int)rootFolder->getChildren().size() > limit)
296296
{
297297
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
298298
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);

es-app/src/scrapers/GamesDBJSONScraper.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ std::string getBoxartImage(const Value& v)
199199
{
200200
return "";
201201
}
202-
for (int i = 0; i < v.Size(); ++i)
202+
for (int i = 0; i < (int)v.Size(); ++i)
203203
{
204204
auto& im = v[i];
205205
std::string type = getStringOrThrow(im, "type");
@@ -220,7 +220,7 @@ std::string getDeveloperString(const Value& v)
220220
}
221221
std::string out = "";
222222
bool first = true;
223-
for (int i = 0; i < v.Size(); ++i)
223+
for (int i = 0; i < (int)v.Size(); ++i)
224224
{
225225
auto mapIt = resources.gamesdb_new_developers_map.find(getIntOrThrow(v[i]));
226226
if (mapIt == resources.gamesdb_new_developers_map.cend())
@@ -245,7 +245,7 @@ std::string getPublisherString(const Value& v)
245245
}
246246
std::string out = "";
247247
bool first = true;
248-
for (int i = 0; i < v.Size(); ++i)
248+
for (int i = 0; i < (int)v.Size(); ++i)
249249
{
250250
auto mapIt = resources.gamesdb_new_publishers_map.find(getIntOrThrow(v[i]));
251251
if (mapIt == resources.gamesdb_new_publishers_map.cend())
@@ -270,7 +270,7 @@ std::string getGenreString(const Value& v)
270270
}
271271
std::string out = "";
272272
bool first = true;
273-
for (int i = 0; i < v.Size(); ++i)
273+
for (int i = 0; i < (int)v.Size(); ++i)
274274
{
275275
auto mapIt = resources.gamesdb_new_genres_map.find(getIntOrThrow(v[i]));
276276
if (mapIt == resources.gamesdb_new_genres_map.cend())
@@ -381,7 +381,7 @@ void TheGamesDBJSONRequest::process(const std::unique_ptr<HttpReq>& req, std::ve
381381
resources.ensureResources();
382382

383383

384-
for (int i = 0; i < games.Size(); ++i)
384+
for (int i = 0; i < (int)games.Size(); ++i)
385385
{
386386
auto& v = games[i];
387387
try

es-app/src/scrapers/ScreenScraper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void ScreenScraperRequest::process(const std::unique_ptr<HttpReq>& req, std::vec
169169
}
170170

171171

172-
void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, std::vector<ScraperSearchResult>& results)
172+
void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, std::vector<ScraperSearchResult>& out_results)
173173
{
174174
pugi::xml_node data = xmldoc.child("Data");
175175
pugi::xml_node game = data.child("jeu");
@@ -285,7 +285,7 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, std::ve
285285

286286
}
287287

288-
results.push_back(result);
288+
out_results.push_back(result);
289289
} // game
290290
}
291291

es-app/src/views/UIModeController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ bool UIModeController::listen(InputConfig * config, Input input)
5252
mPassKeyCounter = 0; // current input is incorrect, reset counter
5353
}
5454

55-
if (mPassKeyCounter == (mPassKeySequence.length()))
55+
if (mPassKeyCounter == (int)mPassKeySequence.length())
5656
{
5757
unlockUIMode();
5858
return true;

es-app/src/views/ViewController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void ViewController::preload()
438438
i++;
439439
char buffer[100];
440440
sprintf (buffer, "Loading '%s' (%d/%d)",
441-
(*it)->getFullName().c_str(), i, SystemData::sSystemVector.size());
441+
(*it)->getFullName().c_str(), i, (int)SystemData::sSystemVector.size());
442442
mWindow->renderLoadingScreen(std::string(buffer));
443443
}
444444

es-app/src/views/gamelist/GridGameListView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ void GridGameListView::remove(FileData *game, bool deleteFile)
314314
int gamePos = (int)std::distance(siblings.cbegin(), gameIter);
315315
if (gameIter != siblings.cend())
316316
{
317-
if ((gamePos + 1) < siblings.size())
317+
if ((gamePos + 1) < (int)siblings.size())
318318
{
319319
setCursor(siblings.at(gamePos + 1));
320320
} else if ((gamePos - 1) > 0) {

es-core/src/components/GridTileComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void GridTileComponent::update()
5656
resize();
5757
}
5858

59-
void GridTileComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element, unsigned int properties)
59+
void GridTileComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& /*element*/, unsigned int /*properties*/)
6060
{
6161
Vector2f screen = Vector2f((float)Renderer::getScreenWidth(), (float)Renderer::getScreenHeight());
6262

es-core/src/components/ImageGridComponent.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void ImageGridComponent<T>::updateTiles()
338338
// Stop updating the tiles at highest scroll speed
339339
if (mScrollTier == 3)
340340
{
341-
for (int ti = 0; ti < mTiles.size(); ti++)
341+
for (int ti = 0; ti < (int)mTiles.size(); ti++)
342342
{
343343
std::shared_ptr<GridTileComponent> tile = mTiles.at(ti);
344344

@@ -354,12 +354,12 @@ void ImageGridComponent<T>::updateTiles()
354354

355355
// If going down, update from top to bottom
356356
// If going up, update from bottom to top
357-
int ti = scrollDirection == 1 ? 0 : mTiles.size() - 1;
358-
int end = scrollDirection == 1 ? mTiles.size() : -1;
357+
int ti = scrollDirection == 1 ? 0 : (int)mTiles.size() - 1;
358+
int end = scrollDirection == 1 ? (int)mTiles.size() : -1;
359359

360360
int img = getStartPosition();
361361
if (scrollDirection == -1)
362-
img += mTiles.size() - 1;
362+
img += (int)mTiles.size() - 1;
363363

364364
// Calculate buffer size depending on scroll speed and direction
365365
int bufferBehind = (texBuffersForward[3] - texBuffersBehind[mScrollTier]) * mGridDimension.x();
@@ -387,7 +387,7 @@ void ImageGridComponent<T>::updateTileAtPos(int tilePos, int imgPos, int bufferT
387387

388388
// If we have more tiles than we have to display images on screen, hide them
389389
if(imgPos < 0 || imgPos >= size()
390-
|| tilePos < bufferTop || tilePos >= mTiles.size() - bufferBot) // Same for tiles out of the buffer
390+
|| tilePos < bufferTop || tilePos >= (int)mTiles.size() - bufferBot) // Same for tiles out of the buffer
391391
{
392392
tile->setSelected(false);
393393
tile->setImage("");

0 commit comments

Comments
 (0)