mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Silence warnings
This commit is contained in:
parent
d45d339bb8
commit
5cc6bafd7d
|
@ -292,7 +292,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
|
||||||
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
|
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
|
||||||
{
|
{
|
||||||
SystemData* curSys = rootFolder->getSystem();
|
SystemData* curSys = rootFolder->getSystem();
|
||||||
while (rootFolder->getChildren().size() > limit)
|
while ((int)rootFolder->getChildren().size() > limit)
|
||||||
{
|
{
|
||||||
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
|
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
|
||||||
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);
|
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);
|
||||||
|
|
|
@ -199,7 +199,7 @@ std::string getBoxartImage(const Value& v)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
for (int i = 0; i < v.Size(); ++i)
|
for (int i = 0; i < (int)v.Size(); ++i)
|
||||||
{
|
{
|
||||||
auto& im = v[i];
|
auto& im = v[i];
|
||||||
std::string type = getStringOrThrow(im, "type");
|
std::string type = getStringOrThrow(im, "type");
|
||||||
|
@ -220,7 +220,7 @@ std::string getDeveloperString(const Value& v)
|
||||||
}
|
}
|
||||||
std::string out = "";
|
std::string out = "";
|
||||||
bool first = true;
|
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]));
|
auto mapIt = resources.gamesdb_new_developers_map.find(getIntOrThrow(v[i]));
|
||||||
if (mapIt == resources.gamesdb_new_developers_map.cend())
|
if (mapIt == resources.gamesdb_new_developers_map.cend())
|
||||||
|
@ -245,7 +245,7 @@ std::string getPublisherString(const Value& v)
|
||||||
}
|
}
|
||||||
std::string out = "";
|
std::string out = "";
|
||||||
bool first = true;
|
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]));
|
auto mapIt = resources.gamesdb_new_publishers_map.find(getIntOrThrow(v[i]));
|
||||||
if (mapIt == resources.gamesdb_new_publishers_map.cend())
|
if (mapIt == resources.gamesdb_new_publishers_map.cend())
|
||||||
|
@ -270,7 +270,7 @@ std::string getGenreString(const Value& v)
|
||||||
}
|
}
|
||||||
std::string out = "";
|
std::string out = "";
|
||||||
bool first = true;
|
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]));
|
auto mapIt = resources.gamesdb_new_genres_map.find(getIntOrThrow(v[i]));
|
||||||
if (mapIt == resources.gamesdb_new_genres_map.cend())
|
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();
|
resources.ensureResources();
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < games.Size(); ++i)
|
for (int i = 0; i < (int)games.Size(); ++i)
|
||||||
{
|
{
|
||||||
auto& v = games[i];
|
auto& v = games[i];
|
||||||
try
|
try
|
||||||
|
|
|
@ -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 data = xmldoc.child("Data");
|
||||||
pugi::xml_node game = data.child("jeu");
|
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
|
} // game
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ bool UIModeController::listen(InputConfig * config, Input input)
|
||||||
mPassKeyCounter = 0; // current input is incorrect, reset counter
|
mPassKeyCounter = 0; // current input is incorrect, reset counter
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mPassKeyCounter == (mPassKeySequence.length()))
|
if (mPassKeyCounter == (int)mPassKeySequence.length())
|
||||||
{
|
{
|
||||||
unlockUIMode();
|
unlockUIMode();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -438,7 +438,7 @@ void ViewController::preload()
|
||||||
i++;
|
i++;
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
sprintf (buffer, "Loading '%s' (%d/%d)",
|
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));
|
mWindow->renderLoadingScreen(std::string(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ void GridGameListView::remove(FileData *game, bool deleteFile)
|
||||||
int gamePos = (int)std::distance(siblings.cbegin(), gameIter);
|
int gamePos = (int)std::distance(siblings.cbegin(), gameIter);
|
||||||
if (gameIter != siblings.cend())
|
if (gameIter != siblings.cend())
|
||||||
{
|
{
|
||||||
if ((gamePos + 1) < siblings.size())
|
if ((gamePos + 1) < (int)siblings.size())
|
||||||
{
|
{
|
||||||
setCursor(siblings.at(gamePos + 1));
|
setCursor(siblings.at(gamePos + 1));
|
||||||
} else if ((gamePos - 1) > 0) {
|
} else if ((gamePos - 1) > 0) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ void GridTileComponent::update()
|
||||||
resize();
|
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());
|
Vector2f screen = Vector2f((float)Renderer::getScreenWidth(), (float)Renderer::getScreenHeight());
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,7 @@ void ImageGridComponent<T>::updateTiles()
|
||||||
// Stop updating the tiles at highest scroll speed
|
// Stop updating the tiles at highest scroll speed
|
||||||
if (mScrollTier == 3)
|
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);
|
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 down, update from top to bottom
|
||||||
// If going up, update from bottom to top
|
// If going up, update from bottom to top
|
||||||
int ti = scrollDirection == 1 ? 0 : mTiles.size() - 1;
|
int ti = scrollDirection == 1 ? 0 : (int)mTiles.size() - 1;
|
||||||
int end = scrollDirection == 1 ? mTiles.size() : -1;
|
int end = scrollDirection == 1 ? (int)mTiles.size() : -1;
|
||||||
|
|
||||||
int img = getStartPosition();
|
int img = getStartPosition();
|
||||||
if (scrollDirection == -1)
|
if (scrollDirection == -1)
|
||||||
img += mTiles.size() - 1;
|
img += (int)mTiles.size() - 1;
|
||||||
|
|
||||||
// Calculate buffer size depending on scroll speed and direction
|
// Calculate buffer size depending on scroll speed and direction
|
||||||
int bufferBehind = (texBuffersForward[3] - texBuffersBehind[mScrollTier]) * mGridDimension.x();
|
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 we have more tiles than we have to display images on screen, hide them
|
||||||
if(imgPos < 0 || imgPos >= size()
|
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->setSelected(false);
|
||||||
tile->setImage("");
|
tile->setImage("");
|
||||||
|
|
Loading…
Reference in a new issue