mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
sys: Enable -Wall, -Wextra, -Werror and fix all warnings on all Platforms (#483)
* sys: Make ImHex compile with -Wall -Wextra -Werror * sys: Fixed various build errors on Linux * sys: Explicitly ignore return value of `system` function * sys: More fixes for the warnings GitHub Actions enables somehow * sys: More fixes * sys: Remove -Werror again to see all GitHub Actions warnings * sys: Hopefully fixed all remaining warnings * sys: Added back -Werror * git: Change windows icon in GitHub Actions
This commit is contained in:
@@ -238,7 +238,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::IconButton(ICON_VS_FOLDER_OPENED, ImGui::GetStyleColorVec4(ImGuiCol_Text))) {
|
||||
return fs::openFileBrowser("hex.builtin.setting.font.font_path", fs::DialogMode::Open, { {"TTF Font", "ttf"} },
|
||||
return fs::openFileBrowser(fs::DialogMode::Open, { {"TTF Font", "ttf"} },
|
||||
[&](const std::fs::path &path) {
|
||||
fontPath = path.string();
|
||||
setting = fontPath;
|
||||
@@ -275,8 +275,10 @@ namespace hex::plugin::builtin {
|
||||
ContentRegistry::Settings::addCategoryDescription(dirsSetting, "hex.builtin.setting.folders.description");
|
||||
|
||||
ContentRegistry::Settings::add(dirsSetting, dirsSetting, std::vector<std::string> {}, [](auto name, nlohmann::json &setting) {
|
||||
hex::unused(name);
|
||||
|
||||
static std::vector<std::string> folders = setting;
|
||||
static int currentItemIndex = 0;
|
||||
static size_t currentItemIndex = 0;
|
||||
|
||||
if (!ImGui::BeginListBox("", ImVec2(-38, -FLT_MIN))) {
|
||||
return false;
|
||||
@@ -292,7 +294,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::BeginGroup();
|
||||
|
||||
if (ImGui::IconButton(ICON_VS_NEW_FOLDER, ImGui::GetCustomColorVec4(ImGuiCustomCol_DescButton), ImVec2(30, 30))) {
|
||||
fs::openFileBrowser("Select include folder", fs::DialogMode::Folder, {}, [&](const std::fs::path &path) {
|
||||
fs::openFileBrowser(fs::DialogMode::Folder, {}, [&](const std::fs::path &path) {
|
||||
auto pathStr = path.string();
|
||||
|
||||
if (std::find(folders.begin(), folders.end(), pathStr) == folders.end()) {
|
||||
|
||||
Reference in New Issue
Block a user