From f401ea9aaeaf4e51bee77d3b2348b5528d50864a Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 31 Dec 2021 07:56:31 -0800 Subject: [PATCH] [wpigui] Remove wpiutil linkage (#3851) It was only being used for fs::remove() (added in #3463), which is easily replaced by std::remove(). The code change does not affect the WPILib tools, as this code is not used when JSON save files are used. --- wpigui/.styleguide | 1 - wpigui/CMakeLists.txt | 2 +- wpigui/build.gradle | 2 -- wpigui/src/main/native/cpp/wpigui.cpp | 3 +-- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/wpigui/.styleguide b/wpigui/.styleguide index 225b12a846..9a462a3759 100644 --- a/wpigui/.styleguide +++ b/wpigui/.styleguide @@ -27,5 +27,4 @@ includeOtherLibs { ^imgui ^implot ^stb - ^wpi/ } diff --git a/wpigui/CMakeLists.txt b/wpigui/CMakeLists.txt index ec4628977c..59c4d6fafb 100644 --- a/wpigui/CMakeLists.txt +++ b/wpigui/CMakeLists.txt @@ -15,7 +15,7 @@ set_property(TARGET wpigui PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET wpigui PROPERTY FOLDER "libraries") wpilib_target_warnings(wpigui) -target_link_libraries(wpigui PUBLIC imgui wpiutil) +target_link_libraries(wpigui PUBLIC imgui) target_include_directories(wpigui PUBLIC $ diff --git a/wpigui/build.gradle b/wpigui/build.gradle index 5b8c4b2abc..5959b67026 100644 --- a/wpigui/build.gradle +++ b/wpigui/build.gradle @@ -62,7 +62,6 @@ if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxra } binaries.all { nativeUtils.useRequiredLibrary(it, 'imgui_static') - lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared' if (it.targetPlatform.name == nativeUtils.wpi.platforms.roborio || it.targetPlatform.name == nativeUtils.wpi.platforms.raspbian || it.targetPlatform.name == nativeUtils.wpi.platforms.aarch64bionic) { it.buildable = false return @@ -120,7 +119,6 @@ if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxra binaries.all { lib library: 'wpigui' nativeUtils.useRequiredLibrary(it, 'imgui_static') - lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared' } } } diff --git a/wpigui/src/main/native/cpp/wpigui.cpp b/wpigui/src/main/native/cpp/wpigui.cpp index cf77ee6240..b1e11437e6 100644 --- a/wpigui/src/main/native/cpp/wpigui.cpp +++ b/wpigui/src/main/native/cpp/wpigui.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include "wpigui_internal.h" @@ -320,7 +319,7 @@ void gui::Main() { // Delete the save file if requested. if (!gContext->saveSettings && gContext->resetOnExit) { - fs::remove(fs::path{gContext->iniPath}); + std::remove(gContext->iniPath.c_str()); } glfwDestroyWindow(gContext->window);