From f22e1046bf5d6508f90457ff627a4f441e1ac320 Mon Sep 17 00:00:00 2001 From: Joel16 Date: Sat, 29 Jan 2022 20:24:01 -0500 Subject: [PATCH] app: Clean-up warnings --- include/windows.h | 2 +- source/fs.cpp | 2 +- source/tabs/filebrowser.cpp | 1 - source/window.cpp | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/windows.h b/include/windows.h index 7e84a02..2a1c3cb 100644 --- a/include/windows.h +++ b/include/windows.h @@ -26,7 +26,7 @@ typedef struct { SceOff selected = 0; std::vector entries; std::vector textures; - int frame_count = 0; + unsigned int frame_count = 0; float zoom_factor = 1.0f; } WindowData; diff --git a/source/fs.cpp b/source/fs.cpp index d72d57e..5388f10 100644 --- a/source/fs.cpp +++ b/source/fs.cpp @@ -144,7 +144,7 @@ namespace FS { } static int GetPrevPath(char path[256]) { - if (cfg.cwd.c_str() == "") + if (cfg.cwd == "") return -1; // Remove upmost directory diff --git a/source/tabs/filebrowser.cpp b/source/tabs/filebrowser.cpp index 59d24e9..be898ac 100644 --- a/source/tabs/filebrowser.cpp +++ b/source/tabs/filebrowser.cpp @@ -48,7 +48,6 @@ namespace FileBrowser { } namespace Tabs { - static int device = 0; static const ImVec2 tex_size = ImVec2(22, 22); static const char *devices[] = { "os0:", "pd0:", "sa0:", "tm0:", "ud0:", "ur0:", "ux0:", "vd0:", "vs0:"}; diff --git a/source/window.cpp b/source/window.cpp index 905cc78..dc60585 100644 --- a/source/window.cpp +++ b/source/window.cpp @@ -23,7 +23,7 @@ namespace Windows { }; static void ClearTextures(WindowData &data) { - for (int i = 0; i < data.textures.size(); i++) + for (unsigned int i = 0; i < data.textures.size(); i++) Textures::Free(data.textures[i]); data.textures.clear(); @@ -67,7 +67,7 @@ namespace Windows { if (data.selected == data.entries.size()) return ret; - for (int i = data.selected + 1; i < data.entries.size(); i++) { + for (unsigned int i = data.selected + 1; i < data.entries.size(); i++) { if (!(ret = Windows::HandleScroll(data, i))) continue; else