Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
83d3221
gui: Enable `-Wextra`
delet-this Apr 18, 2026
b9b1c25
gui: Silence `-Wunused-parameter` for now
delet-this Apr 18, 2026
203e046
gui: Fix ub on copying uninitialized value (`-Wuninitialized`)
delet-this Apr 18, 2026
4834ba9
gui: Enable `-pedantic`
delet-this Apr 18, 2026
a26e031
gui: Silence `-Woverlength-strings` on clang++
delet-this Apr 18, 2026
007984b
gui: Enable `-Wnon-virtual-dtor`
delet-this Apr 18, 2026
f767b47
gui: Enable `-Woverloaded-virtual`
delet-this Apr 18, 2026
60c63f4
gui: Enable `-Wmisleading-indentation`
delet-this Apr 18, 2026
b4c3502
gui: Enable `-Wduplicated-cond`
delet-this Apr 18, 2026
2e066cb
gui: Enable `-Wduplicated-branches`
delet-this Apr 18, 2026
770e3a6
gui: Enable `-Wuseless-cast`
delet-this Apr 18, 2026
a8a78cc
gui: Enable `-Wformat=2`
delet-this Apr 18, 2026
f15274d
gui: Enable `-Wextra-semi`
delet-this Apr 19, 2026
453ea3b
gui: Enable `-Wzero-as-null-pointer-constant`
delet-this Apr 19, 2026
b1883b5
gui: Enable `-Winit-self`
delet-this Apr 19, 2026
1977a12
gui: Enable `-Wstring-conversion`
delet-this Apr 19, 2026
f6ae9f1
gui: Enable `-Wsuggest-override`
delet-this Apr 19, 2026
8fcdf8c
gui: Enable `-Wmissing-declarations`
delet-this Apr 19, 2026
67982d1
gui: Enable `-Wdeprecated`
delet-this Apr 19, 2026
07d5656
gui: Enable `-Wlogical-op`
delet-this Apr 19, 2026
17c466f
gui: Enable `-Wcast-qual`
delet-this Apr 19, 2026
8b7e308
gui: Enable `-Wcast-align`
delet-this Apr 19, 2026
aa6cb44
gui: Enable `-Wctor-dtor-privacy`
delet-this Apr 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gui/ConfigHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <optional>
#include <unistd.h>

char *OpenFile() {
static char *OpenFile() {
char *filename = new char[512];
char cwd[1024];
char command[2048] = R"(zenity --file-selection --title="Select a config file" 2> /dev/null)";
Expand All @@ -25,7 +25,7 @@ char *OpenFile() {
return res;
}

char *SaveFile() {
static char *SaveFile() {
char *filename = new char[512];
char cwd[1024];
char command[2048] = R"(zenity --save --file-selection --title="Save Config" 2> /dev/null)";
Expand Down
4 changes: 2 additions & 2 deletions gui/CustomCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ void CustomCurve::ApplyCurveConstraints() {
}

// Cubic Bezier derivatives
ImVec2 BezierFirstOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) {
static ImVec2 BezierFirstOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) {
float u = (1 - t);
float w1 = 3 * (u * u);
float w2 = 6 * (u * t);
float w3 = 3 * (t * t);
return ((p1 - p0) * w1) + ((p2 - p1) * w2) + ((p3 - p2) * w3);
}

ImVec2 BezierSecondOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) {
static ImVec2 BezierSecondOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) {
float u = (1 - t);
float w1 = 6 * u;
float w2 = 6 * t;
Expand Down
6 changes: 3 additions & 3 deletions gui/DriverHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <ImGui/implot.h>

template<typename Ty>
bool GetParameterTy(const std::string &param_name, Ty &value) {
static bool GetParameterTy(const std::string &param_name, Ty &value) {
try {
using namespace std;
ifstream file(YEETMOUSE_PARAMS_DIR + param_name);
Expand All @@ -31,7 +31,7 @@ bool GetParameterTy(const std::string &param_name, Ty &value) {
}
}

bool GetParameterTy(const std::string &param_name, std::string &value) {
static bool GetParameterTy(const std::string &param_name, std::string &value) {
try {
using namespace std;
ifstream file(YEETMOUSE_PARAMS_DIR + param_name);
Expand Down Expand Up @@ -152,7 +152,7 @@ namespace DriverHelper {
}

bool SaveParameters() {
return SetParameterTy("update", (int) 1);
return SetParameterTy("update", 1);
}

bool SavePersistentParameters() {
Expand Down
4 changes: 2 additions & 2 deletions gui/FunctionHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CachedFunction {
CachedFunction(float xStride, Parameters *params);

CachedFunction() {
};
}

float EvalFuncAt(float x) const;

Expand Down Expand Up @@ -53,7 +53,7 @@ class CachedFunction {
static constexpr bool velocity = true;

std::vector<double> data;
double xStart;
double xStart = 1.0;
Comment thread
delet-this marked this conversation as resolved.
} synchronous_data;

bool SynchronousBuildLUT();
Expand Down
8 changes: 7 additions & 1 deletion gui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ CXXFLAGS = -std=c++17 -I . -isystem External

# ImPlot has few of these
IMGUIFLAGS = -Wformat=0 -Wno-format-security
WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wcast-qual -Wcast-align -Wctor-dtor-privacy -Wno-sign-compare -Wno-unused-parameter

ifeq (g++, $(CXX))
WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast -Wlogical-op
endif

ifneq (,$(findstring clang,$(CXX)))
# ImGui produces many of these
IMGUIFLAGS += -Wno-nontrivial-memcall
WARNFLAGS += -Wstring-conversion -Wsuggest-override -Wno-overlength-strings
endif

WARNFLAGS = -Wall -Wno-sign-compare
OPTIMIZATION_FLAGS = -O2 -flto=auto
DEBUG_FLAGS = -g -O0

Expand Down
2 changes: 1 addition & 1 deletion gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static void glfw_error_callback(int error, const char* description)

// Use the default initialization that comes with ImGui as an Example

void SetupImGuiStyle()
static void SetupImGuiStyle()
{
// nice dark style from ImThemes
ImGuiStyle& style = ImGui::GetStyle();
Expand Down
2 changes: 1 addition & 1 deletion gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void ResetParameters();
if(selected_device >= devices.size()) \
selected_device = devices.size() - 1;}

int OnGui() {
static int OnGui() {
using namespace std::chrono;

ImGuiContext &g = *GImGui;
Expand Down
Loading