Skip to content

Commit 88ebdb4

Browse files
authored
[#114.1] Add iwyu enforcement to glfw_adapters and demo_app (#121)
1 parent 5a284ed commit 88ebdb4

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

examples/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ target_include_directories(glfw_adapters PUBLIC
7575

7676
target_compile_features(glfw_adapters PUBLIC cxx_std_20)
7777

78+
# Enable iwyu for glfw_adapters
79+
set_target_properties(glfw_adapters PROPERTIES
80+
CXX_INCLUDE_WHAT_YOU_USE "${IWYU_PATH};-Xiwyu;--error;-Xiwyu;--verbose=3"
81+
)
82+
7883
# === Demo App Example ===
7984

8085
add_executable(prong_demo_app
@@ -100,6 +105,11 @@ target_compile_features(prong_demo_app PRIVATE cxx_std_20)
100105
# Suppress unused function warnings for STB (header-only library with many utilities)
101106
target_compile_options(prong_demo_app PRIVATE -Wno-unused-function)
102107

108+
# Enable iwyu for prong_demo_app
109+
set_target_properties(prong_demo_app PROPERTIES
110+
CXX_INCLUDE_WHAT_YOU_USE "${IWYU_PATH};-Xiwyu;--error;-Xiwyu;--verbose=3"
111+
)
112+
103113
# Make example depend on formatting target
104114
add_dependencies(prong_demo_app format-example-sources)
105115

examples/demo_app/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#include "scenes/demo_scene.h"
1212
#include <GLFW/glfw3.h>
1313

14-
#include <cmath>
1514
#include <filesystem>
1615
#include <iostream>
1716
#include <memory>
17+
#include <string>
1818

1919
#ifdef __linux__
2020
#include <sys/types.h>

include/bombfork/prong/components/viewport.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,6 @@ class Viewport : public Component {
169169
PanChangedCallback panCallback;
170170
SelectionCallback selectionCallback;
171171

172-
// Scrollbar state
173-
bool horizontalScrollbarHover = false;
174-
bool verticalScrollbarHover = false;
175-
bool horizontalScrollbarDrag = false;
176-
bool verticalScrollbarDrag = false;
177-
178172
public:
179173
explicit Viewport() : Component(nullptr, "Viewport") {
180174
// Initialize default theme

0 commit comments

Comments
 (0)