From 204609c4d0a42ec5dda4f4492bd9bd93de7ca5d8 Mon Sep 17 00:00:00 2001 From: Stepland <10530295-Buggyroom@users.noreply.gitlab.com> Date: Wed, 2 Mar 2022 23:59:19 +0100 Subject: [PATCH] Switch to #pragma once because fuck you here's why --- src/chart.hpp | 5 +---- src/chart_with_history.hpp | 5 +---- src/editor_state.hpp | 5 +---- src/fumen.hpp | 5 +---- src/history_actions.hpp | 7 +------ src/imgui/custom.hpp | 7 ++----- src/ln_marker.hpp | 5 +---- src/marker.hpp | 6 ++---- src/note.hpp | 5 +---- src/notes_clipboard.hpp | 5 +---- src/notification.hpp | 5 +---- src/notifications_queue.hpp | 5 +---- src/precise_music.hpp | 7 ++----- src/preferences.hpp | 5 +---- src/sound_effect.hpp | 5 +---- src/time_selection.hpp | 5 +---- src/toolbox.hpp | 5 +---- src/widgets/blank_screen.hpp | 5 +---- src/widgets/density_graph.hpp | 5 +---- src/widgets/linear_view.hpp | 5 +---- src/widgets/playfield.hpp | 5 +---- 21 files changed, 24 insertions(+), 88 deletions(-) diff --git a/src/chart.hpp b/src/chart.hpp index 014e113..b15c404 100644 --- a/src/chart.hpp +++ b/src/chart.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_CHART_H -#define FEIS_CHART_H +#pragma once #include #include @@ -33,5 +32,3 @@ public: private: int resolution; }; - -#endif // FEIS_CHART_H diff --git a/src/chart_with_history.hpp b/src/chart_with_history.hpp index b2876b2..f8c784f 100644 --- a/src/chart_with_history.hpp +++ b/src/chart_with_history.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_CHARTWITHHIST_H -#define FEIS_CHARTWITHHIST_H +#pragma once #include "chart.hpp" #include "history.hpp" @@ -24,5 +23,3 @@ struct Chart_with_History { std::optional makeLongNoteDummy(int current_tick) const; std::optional makeCurrentLongNote() const; }; - -#endif // FEIS_CHARTWITHHIST_H diff --git a/src/editor_state.hpp b/src/editor_state.hpp index 66f0e76..78d91ec 100644 --- a/src/editor_state.hpp +++ b/src/editor_state.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_EDITORSTATE_H -#define FEIS_EDITORSTATE_H +#pragma once #include #include @@ -173,5 +172,3 @@ namespace ESHelper { bool showCustomDifName = false; }; } - -#endif // FEIS_EDITORSTATE_H diff --git a/src/fumen.hpp b/src/fumen.hpp index d42bb39..6997ce5 100644 --- a/src/fumen.hpp +++ b/src/fumen.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_FUMEN_H -#define FEIS_FUMEN_H +#pragma once #include #include @@ -56,5 +55,3 @@ public: float getChartRuntime(Chart c); }; - -#endif // FEIS_FUMEN_H diff --git a/src/history_actions.hpp b/src/history_actions.hpp index 8975bb5..476c3c4 100644 --- a/src/history_actions.hpp +++ b/src/history_actions.hpp @@ -1,7 +1,4 @@ - - -#ifndef FEIS_HISTORYSTATE_H -#define FEIS_HISTORYSTATE_H +#pragma once #include #include @@ -60,5 +57,3 @@ protected: }; std::string get_message(const std::shared_ptr& awm); - -#endif // FEIS_HISTORYSTATE_H diff --git a/src/imgui/custom.hpp b/src/imgui/custom.hpp index bdc1ec3..279afdb 100644 --- a/src/imgui/custom.hpp +++ b/src/imgui/custom.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_IMGUI_CUSTOM_H -#define FEIS_IMGUI_CUSTOM_H +#pragma once #include #include @@ -8,6 +7,4 @@ // My own custom SFML overloads for ImGui namespace ImGui { IMGUI_SFML_API bool ColorEdit4(const char* label, sf::Color& col, ImGuiColorEditFlags flags = 0); -} - -#endif // FEIS_IMGUI_CUSTOM_H \ No newline at end of file +} \ No newline at end of file diff --git a/src/ln_marker.hpp b/src/ln_marker.hpp index 8009b41..711243d 100644 --- a/src/ln_marker.hpp +++ b/src/ln_marker.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_LNMARKER_H -#define FEIS_LNMARKER_H +#pragma once #include #include @@ -73,5 +72,3 @@ private: } } }; - -#endif // FEIS_LNMARKER_H diff --git a/src/marker.hpp b/src/marker.hpp index 8cd4295..695c5b5 100644 --- a/src/marker.hpp +++ b/src/marker.hpp @@ -1,5 +1,5 @@ -#ifndef FEIS_MARKER_H -#define FEIS_MARKER_H +#pragma once + #include #include #include @@ -51,5 +51,3 @@ private: }; Marker first_available_marker_from_folder(std::filesystem::path assets_folder); - -#endif // FEIS_MARKER_H diff --git a/src/note.hpp b/src/note.hpp index 83a8f38..f769d0c 100644 --- a/src/note.hpp +++ b/src/note.hpp @@ -13,8 +13,7 @@ // based chart validation. since it removes the need for a fancy consistency // check between the note and its tail positions -#ifndef FEIS_NOTE_H -#define FEIS_NOTE_H +#pragma once /* * A Note has : @@ -75,5 +74,3 @@ private: void initAsClosestLongNote(const Note& start, int end_timing, int wanted_tail_pos); }; - -#endif // FEIS_NOTE_H diff --git a/src/notes_clipboard.hpp b/src/notes_clipboard.hpp index 004a994..911864b 100644 --- a/src/notes_clipboard.hpp +++ b/src/notes_clipboard.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_NOTESCLIPBOARD_H -#define FEIS_NOTESCLIPBOARD_H +#pragma once #include @@ -17,5 +16,3 @@ public: private: std::set contents; }; - -#endif // FEIS_NOTESCLIPBOARD_H diff --git a/src/notification.hpp b/src/notification.hpp index 0df5186..1628abc 100644 --- a/src/notification.hpp +++ b/src/notification.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_NOTIFICATION_H -#define FEIS_NOTIFICATION_H +#pragma once #include @@ -55,5 +54,3 @@ public: const std::string message; }; - -#endif // FEIS_NOTIFICATION_H diff --git a/src/notifications_queue.hpp b/src/notifications_queue.hpp index b5e5c33..430bb19 100644 --- a/src/notifications_queue.hpp +++ b/src/notifications_queue.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_NOTIFICATIONSQUEUE_H -#define FEIS_NOTIFICATIONSQUEUE_H +#pragma once #include #include @@ -26,5 +25,3 @@ private: const unsigned int max_size; std::deque> queue; }; - -#endif // FEIS_NOTIFICATIONSQUEUE_H diff --git a/src/precise_music.hpp b/src/precise_music.hpp index cc1ae7e..757c2eb 100644 --- a/src/precise_music.hpp +++ b/src/precise_music.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_PRECISE_MUSIC_H -#define FEIS_PRECISE_MUSIC_H +#pragma once #include #include @@ -17,6 +16,4 @@ struct PreciseMusic : sf::Music { void play(); protected: LPALGETSOURCEDVSOFT alGetSourcedvSOFT; -}; - -#endif // FEIS_PRECISE_MUSIC_H \ No newline at end of file +}; \ No newline at end of file diff --git a/src/preferences.hpp b/src/preferences.hpp index 23775cf..307aa55 100644 --- a/src/preferences.hpp +++ b/src/preferences.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_PREFERENCES_H -#define FEIS_PREFERENCES_H +#pragma once #include #include @@ -21,5 +20,3 @@ public: MarkerEndingState markerEndingState; const std::filesystem::path file_path; }; - -#endif // FEIS_PREFERENCES_H diff --git a/src/sound_effect.hpp b/src/sound_effect.hpp index 735cbef..2823c70 100644 --- a/src/sound_effect.hpp +++ b/src/sound_effect.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_SOUNDEFFECT_H -#define FEIS_SOUNDEFFECT_H +#pragma once #include #include @@ -32,5 +31,3 @@ private: sf::Sound sound; int volume; }; - -#endif // FEIS_SOUNDEFFECT_H diff --git a/src/time_selection.hpp b/src/time_selection.hpp index 2abd6d6..95189ca 100644 --- a/src/time_selection.hpp +++ b/src/time_selection.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_TIMESELECTION_H -#define FEIS_TIMESELECTION_H +#pragma once #include @@ -13,5 +12,3 @@ struct TimeSelection { }; typedef std::variant SelectionState; - -#endif // FEIS_TIMESELECTION_H diff --git a/src/toolbox.hpp b/src/toolbox.hpp index 7c59172..15d3992 100644 --- a/src/toolbox.hpp +++ b/src/toolbox.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_TOOLBOX_H -#define FEIS_TOOLBOX_H +#pragma once #define IM_MAX(_A, _B) (((_A) >= (_B)) ? (_A) : (_B)) @@ -98,5 +97,3 @@ private: T low_output; T high_output; }; - -#endif // FEIS_TOOLBOX_H diff --git a/src/widgets/blank_screen.hpp b/src/widgets/blank_screen.hpp index c7bc27c..2dcfb4b 100644 --- a/src/widgets/blank_screen.hpp +++ b/src/widgets/blank_screen.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_BLANKSCREEN_H -#define FEIS_BLANKSCREEN_H +#pragma once #include @@ -15,5 +14,3 @@ private: sf::Texture tex_FEIS_logo; sf::Sprite FEIS_logo; }; - -#endif // FEIS_BLANKSCREEN_H diff --git a/src/widgets/density_graph.hpp b/src/widgets/density_graph.hpp index 4571a7d..fe802ca 100644 --- a/src/widgets/density_graph.hpp +++ b/src/widgets/density_graph.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_DENSITYGRAPH_H -#define FEIS_DENSITYGRAPH_H +#pragma once #include #include @@ -37,5 +36,3 @@ private: void computeDensities(int height, float chartRuntime, Chart& chart, float BPM, int resolution); void updateGraphTexture(); }; - -#endif // FEIS_DENSITYGRAPH_H diff --git a/src/widgets/linear_view.hpp b/src/widgets/linear_view.hpp index ed6a892..e887f72 100644 --- a/src/widgets/linear_view.hpp +++ b/src/widgets/linear_view.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_LINEARVIEW_H -#define FEIS_LINEARVIEW_H +#pragma once #include #include @@ -63,5 +62,3 @@ private: int zoom = 0; const std::filesystem::path font_path; }; - -#endif // FEIS_LINEARVIEW_H diff --git a/src/widgets/playfield.hpp b/src/widgets/playfield.hpp index 6a4ff66..bcc455b 100644 --- a/src/widgets/playfield.hpp +++ b/src/widgets/playfield.hpp @@ -1,5 +1,4 @@ -#ifndef FEIS_PLAYFIELD_H -#define FEIS_PLAYFIELD_H +#pragma once #include #include @@ -50,5 +49,3 @@ public: private: const std::filesystem::path texture_path; }; - -#endif // FEIS_PLAYFIELD_H