UI: Fix some sign/size comparison warnings.

Mostly size_t vs int.
This commit is contained in:
Unknown W. Brackets committed 2022-01-06 20:40:29 -08:00
1 parent b2bb0be05d
commit a397bf811b
6 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -349,7 +349,7 @@ void GameSettingsScreen::CreateViews() {
graphicsSettings->Add(new ItemHeader(gr->T("Postprocessing effect")));
std::set<std::string> alreadyAddedShader;
for (int i = 0; i < g_Config.vPostShaderNames.size() + 1 && i < ARRAY_SIZE(shaderNames_); ++i) {
for (int i = 0; i < (int)g_Config.vPostShaderNames.size() + 1 && i < ARRAY_SIZE(shaderNames_); ++i) {
// Vector element pointer get invalidated on resize, cache name to have always a valid reference in the rendering thread
shaderNames_[i] = i == g_Config.vPostShaderNames.size() ? "Off" : g_Config.vPostShaderNames[i];
postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&shaderNames_[i], StringFromFormat("%s #%d", gr->T("Postprocessing Shader"), i + 1), &PostShaderTranslateName));