From 48f4768d33313e6a6ed48c31f95eb44feda10a51 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 26 Dec 2020 15:53:12 +1100 Subject: [PATCH] Change include guards in quantum/ to pragma once (#11239) --- quantum/api.h | 5 +---- quantum/api/api_sysex.h | 5 +---- quantum/audio/audio.h | 6 ++---- quantum/audio/luts.h | 11 ++++------- quantum/audio/muse.h | 5 +---- quantum/audio/musical_notes.h | 5 +---- quantum/audio/voices.h | 12 +++++------- quantum/color.h | 4 +--- quantum/keycode_config.h | 7 ++----- quantum/keymap.h | 5 +---- quantum/keymap_extras/keymap_nordic.h | 6 ++---- quantum/keymap_extras/keymap_plover_dvorak.h | 6 ++---- quantum/keymap_extras/keymap_steno.h | 6 ++---- quantum/led_matrix.h | 5 +---- quantum/led_tables.h | 5 +---- quantum/pointing_device.h | 5 +---- quantum/process_keycode/process_audio.h | 5 +---- quantum/process_keycode/process_clicky.h | 5 +---- quantum/process_keycode/process_combo.h | 5 +---- quantum/process_keycode/process_key_lock.h | 5 +---- quantum/process_keycode/process_leader.h | 5 +---- quantum/process_keycode/process_midi.h | 5 +---- quantum/process_keycode/process_music.h | 5 +---- quantum/process_keycode/process_printer.h | 5 +---- quantum/process_keycode/process_steno.h | 6 ++---- quantum/process_keycode/process_tap_dance.h | 6 ++---- quantum/process_keycode/process_terminal.h | 5 +---- quantum/process_keycode/process_terminal_nop.h | 5 +---- quantum/quantum_keycodes.h | 6 ++---- quantum/rgb.h | 5 +---- quantum/rgb_matrix.h | 5 +---- quantum/rgblight.h | 5 ++--- quantum/serial_link/protocol/byte_stuffer.h | 5 +---- quantum/serial_link/protocol/frame_router.h | 5 +---- quantum/serial_link/protocol/frame_validator.h | 5 +---- quantum/serial_link/protocol/physical.h | 5 +---- quantum/serial_link/protocol/transport.h | 5 +---- .../serial_link/protocol/triple_buffered_object.h | 5 +---- quantum/serial_link/system/serial_link.h | 5 +---- quantum/variable_trace.h | 4 +--- quantum/velocikey.h | 5 +---- quantum/visualizer/common_gfxconf.h | 5 +---- quantum/visualizer/default_animations.h | 5 +---- quantum/visualizer/lcd_backlight.h | 6 ++---- quantum/visualizer/lcd_backlight_keyframes.h | 5 +---- quantum/visualizer/lcd_keyframes.h | 5 +---- quantum/visualizer/led_backlight_keyframes.h | 5 +---- quantum/visualizer/resources/resources.h | 5 +---- quantum/visualizer/visualizer.h | 6 ++---- quantum/visualizer/visualizer_keyframes.h | 5 +---- 50 files changed, 68 insertions(+), 204 deletions(-) diff --git a/quantum/api.h b/quantum/api.h index 90a4de833931bc356616643529967c46bdcdaea5..0a30e9d6cc8d285d0fabaf2417a5f48ba0f029d2 100644 --- a/quantum/api.h +++ b/quantum/api.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef _API_H_ -#define _API_H_ +#pragma once #ifdef __AVR__ # include "lufa.h" @@ -54,5 +53,3 @@ __attribute__((weak)) bool process_api_quantum(uint8_t length, uint8_t* data); __attribute__((weak)) bool process_api_keyboard(uint8_t length, uint8_t* data); __attribute__((weak)) bool process_api_user(uint8_t length, uint8_t* data); - -#endif diff --git a/quantum/api/api_sysex.h b/quantum/api/api_sysex.h index 58b8cbb663c8a5bb3db0a5d73afb3a3e1891c8b5..382f4bea440e0af9ed306f2afbe3fe3ec7e773df 100644 --- a/quantum/api/api_sysex.h +++ b/quantum/api/api_sysex.h @@ -14,13 +14,10 @@ * along with this program. If not, see . */ -#ifndef _API_SYSEX_H_ -#define _API_SYSEX_H_ +#pragma once #include "api.h" void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t* bytes, uint16_t length); #define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l) - -#endif diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 805cb4f7ab7588feca47cd98aaac59f63b5c9b12..bc00cd19e6abb15de465fa34effef51399681b8a 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef AUDIO_H -#define AUDIO_H + +#pragma once #include #include @@ -103,5 +103,3 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat); #define PLAY_LOOP(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), true) bool is_playing_notes(void); - -#endif diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h index 6fdd3b4635deedb4f00e3156af05612733c27737..74980b292edf4a8ee405a88adf343e97c7254462 100644 --- a/quantum/audio/luts.h +++ b/quantum/audio/luts.h @@ -14,6 +14,8 @@ * along with this program. If not, see . */ +#pragma once + #if defined(__AVR__) # include # include @@ -23,14 +25,9 @@ # include #endif -#ifndef LUTS_H -# define LUTS_H - -# define VIBRATO_LUT_LENGTH 20 +#define VIBRATO_LUT_LENGTH 20 -# define FREQUENCY_LUT_LENGTH 349 +#define FREQUENCY_LUT_LENGTH 349 extern const float vibrato_lut[VIBRATO_LUT_LENGTH]; extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH]; - -#endif /* LUTS_H */ diff --git a/quantum/audio/muse.h b/quantum/audio/muse.h index 6f382a7fee0167b08f1a01f8fc250dd4c4eaa58f..ad2f96e43af6a6b2b6a011c9e589c9d5b269c09b 100644 --- a/quantum/audio/muse.h +++ b/quantum/audio/muse.h @@ -1,9 +1,6 @@ -#ifndef MUSE_H -#define MUSE_H +#pragma once #include "quantum.h" #include "process_audio.h" uint8_t muse_clock_pulse(void); - -#endif diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index 9742e19c434c4f1c5a2c154e2d5e50505c714d7e..8ac6aafd38fdb58a7b15a38f2ff723fcd06d6e85 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef MUSICAL_NOTES_H -#define MUSICAL_NOTES_H +#pragma once // Tempo Placeholder #define TEMPO_DEFAULT 100 @@ -229,5 +228,3 @@ #define NOTE_GF8 NOTE_FS8 #define NOTE_AF8 NOTE_GS8 #define NOTE_BF8 NOTE_AS8 - -#endif diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h index 0c45b0720e8c90276e5613e44cfa8d93a89ebc95..abafa2b404ef9d3f32524c1b5b00b2f6e1f52add 100644 --- a/quantum/audio/voices.h +++ b/quantum/audio/voices.h @@ -13,6 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +#pragma once + #include #include #if defined(__AVR__) @@ -21,14 +24,11 @@ #include "wait.h" #include "luts.h" -#ifndef VOICES_H -# define VOICES_H - float voice_envelope(float frequency); typedef enum { default_voice, -# ifdef AUDIO_VOICES +#ifdef AUDIO_VOICES something, drums, butts_fader, @@ -41,12 +41,10 @@ typedef enum { // duty_fourth_down, // duty_third_down, // duty_fifth_third_down, -# endif +#endif number_of_voices // important that this is last } voice_type; void set_voice(voice_type v); void voice_iterate(void); void voice_deiterate(void); - -#endif diff --git a/quantum/color.h b/quantum/color.h index f0ee7827572febdf39724ab362505a449ab8e0fa..7448168b3ad024c4f5c76a9ee6cf54b7cf2dc77a 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef COLOR_H -#define COLOR_H +#pragma once #include #include @@ -86,4 +85,3 @@ RGB hsv_to_rgb_nocie(HSV hsv); #ifdef RGBW void convert_rgb_to_rgbw(LED_TYPE *led); #endif -#endif // COLOR_H diff --git a/quantum/keycode_config.h b/quantum/keycode_config.h index aa75ba2c132fa6ab944d7f9569ffb6b3cac277e0..f878168c5fb4ebe671ee0a497cce0bea45aa36d7 100644 --- a/quantum/keycode_config.h +++ b/quantum/keycode_config.h @@ -14,13 +14,12 @@ * along with this program. If not, see . */ +#pragma once + #include "eeconfig.h" #include "keycode.h" #include "action_code.h" -#ifndef KEYCODE_CONFIG_H -# define KEYCODE_CONFIG_H - uint16_t keycode_config(uint16_t keycode); uint8_t mod_config(uint8_t mod); @@ -42,5 +41,3 @@ typedef union { } keymap_config_t; extern keymap_config_t keymap_config; - -#endif /* KEYCODE_CONFIG_H */ diff --git a/quantum/keymap.h b/quantum/keymap.h index 90a2398ba4a3e2da6182865f06dc81709e8a3ac4..191e81397789a537a98b8c35ee8911cdc4e35475 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KEYMAP_H -#define KEYMAP_H +#pragma once #include #include @@ -55,5 +54,3 @@ uint16_t keymap_function_id_to_action(uint16_t function_id); extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; extern const uint16_t fn_actions[]; - -#endif diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h index 8d2f76f2732252f2b1919aee9cd5e536bfce4c1b..76d2f4f6b0b3dcd7d468ff65b838f002c17e65e5 100644 --- a/quantum/keymap_extras/keymap_nordic.h +++ b/quantum/keymap_extras/keymap_nordic.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_NORDIC_H -#define KEYMAP_NORDIC_H + +#pragma once #include "keymap.h" @@ -66,5 +66,3 @@ #define NO_BSLS ALGR(KC_MINS) #define NO_MU ALGR(KC_M) - -#endif diff --git a/quantum/keymap_extras/keymap_plover_dvorak.h b/quantum/keymap_extras/keymap_plover_dvorak.h index d40ff5c6bb554968ca0c3c67349268ce47168c02..445a1231511f915626fffd7295b3a101d982f5dd 100644 --- a/quantum/keymap_extras/keymap_plover_dvorak.h +++ b/quantum/keymap_extras/keymap_plover_dvorak.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_PLOVER_DVORAK_H -#define KEYMAP_PLOVER_DVORAK_H + +#pragma once #include "keymap_dvorak.h" @@ -43,5 +43,3 @@ #define PD_O DV_V #define PD_E DV_N #define PD_U DV_M - -#endif diff --git a/quantum/keymap_extras/keymap_steno.h b/quantum/keymap_extras/keymap_steno.h index 31dcbf7064907f623f1a00d06f3268a8fa1a6d8e..b9115fb8bf9a9b1bfb3308dd5d08737cbf5004fc 100644 --- a/quantum/keymap_extras/keymap_steno.h +++ b/quantum/keymap_extras/keymap_steno.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_STENO_H -#define KEYMAP_STENO_H + +#pragma once #include "keymap.h" @@ -72,5 +72,3 @@ enum steno_keycodes { STN_ZR, STN__MAX = STN_ZR, // must be less than QK_STENO_BOLT }; - -#endif diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h index 5867ba9876515201b9307b77ad984740546e9eff..7dcdf1d482394fcbd9faf767db13ef524c14686b 100644 --- a/quantum/led_matrix.h +++ b/quantum/led_matrix.h @@ -17,8 +17,7 @@ * along with this program. If not, see . */ -#ifndef LED_MATRIX_H -#define LED_MATRIX_H +#pragma once #ifndef BACKLIGHT_ENABLE # error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE @@ -123,5 +122,3 @@ typedef struct { } led_matrix_driver_t; extern const led_matrix_driver_t led_matrix_driver; - -#endif diff --git a/quantum/led_tables.h b/quantum/led_tables.h index 8052d566cf9db7ac6228a5e423875a33903e24cb..cd3e5d74c11d974f5d2764bde11cabbf18c5ba92 100644 --- a/quantum/led_tables.h +++ b/quantum/led_tables.h @@ -13,8 +13,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef LED_TABLES_H -#define LED_TABLES_H +#pragma once #include "progmem.h" #include @@ -22,5 +21,3 @@ along with this program. If not, see . #ifdef USE_CIE1931_CURVE extern const uint8_t CIE1931_CURVE[] PROGMEM; #endif - -#endif diff --git a/quantum/pointing_device.h b/quantum/pointing_device.h index 29398ebb3acced78a144bc8a7dd8ae2bbcf875e6..aa074bb37d77aef5a1f800201e3d3ec4eddcb5d0 100644 --- a/quantum/pointing_device.h +++ b/quantum/pointing_device.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef POINTING_DEVICE_H -#define POINTING_DEVICE_H +#pragma once #include #include "host.h" @@ -27,5 +26,3 @@ void pointing_device_task(void); void pointing_device_send(void); report_mouse_t pointing_device_get_report(void); void pointing_device_set_report(report_mouse_t newMouseReport); - -#endif diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h index 3a84c3d8691ebe9b1796de5fa8c3a3c56381f5a4..d89a834ea85c70b3795fec40da4caa1b6fd9c43e 100644 --- a/quantum/process_keycode/process_audio.h +++ b/quantum/process_keycode/process_audio.h @@ -1,5 +1,4 @@ -#ifndef PROCESS_AUDIO_H -#define PROCESS_AUDIO_H +#pragma once float compute_freq_for_midi_note(uint8_t note); @@ -9,5 +8,3 @@ void process_audio_noteoff(uint8_t note); void process_audio_all_notes_off(void); void audio_on_user(void); - -#endif diff --git a/quantum/process_keycode/process_clicky.h b/quantum/process_keycode/process_clicky.h index f746edb95193ad33d1f41c47632a3f72ba1a24af..67b6463c5d4daf946d275a1d1c89b3f528164fac 100644 --- a/quantum/process_keycode/process_clicky.h +++ b/quantum/process_keycode/process_clicky.h @@ -1,5 +1,4 @@ -#ifndef PROCESS_CLICKY_H -#define PROCESS_CLICKY_H +#pragma once void clicky_play(void); bool process_clicky(uint16_t keycode, keyrecord_t *record); @@ -13,5 +12,3 @@ void clicky_on(void); void clicky_off(void); bool is_clicky_on(void); - -#endif diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index 0f01aae93edd89f1557dddf7e2a302fb93f9da62..e51a2f1f4e267e874e16a69087ef0294d3218995 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROCESS_COMBO_H -#define PROCESS_COMBO_H +#pragma once #include "progmem.h" #include "quantum.h" @@ -62,5 +61,3 @@ void combo_enable(void); void combo_disable(void); void combo_toggle(void); bool is_combo_enabled(void); - -#endif diff --git a/quantum/process_keycode/process_key_lock.h b/quantum/process_keycode/process_key_lock.h index a8e110a4bf93d408e74ac318d6a71cc6a15ed790..baa0b39077aaa70ce6db35cc8ee9fe78b4e40dc1 100644 --- a/quantum/process_keycode/process_key_lock.h +++ b/quantum/process_keycode/process_key_lock.h @@ -14,11 +14,8 @@ * along with this program. If not, see . */ -#ifndef PROCESS_KEY_LOCK_H -#define PROCESS_KEY_LOCK_H +#pragma once #include "quantum.h" bool process_key_lock(uint16_t *keycode, keyrecord_t *record); - -#endif // PROCESS_KEY_LOCK_H diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h index e0edf57b32725a19be335fc24c3cb6676c53c777..9844f27a1bbd31a02e624068ee29c15a3ea4d0e4 100644 --- a/quantum/process_keycode/process_leader.h +++ b/quantum/process_keycode/process_leader.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROCESS_LEADER_H -#define PROCESS_LEADER_H +#pragma once #include "quantum.h" @@ -37,5 +36,3 @@ void qk_leader_start(void); extern uint16_t leader_sequence[5]; \ extern uint8_t leader_sequence_size #define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT) - -#endif diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index ef5661dd4d1ce6869c82b46aa53023e4dce51cd6..68c6eda6665a96a31fb74858c0b3b7e9b6c6e2b9 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROCESS_MIDI_H -#define PROCESS_MIDI_H +#pragma once #include "quantum.h" @@ -53,5 +52,3 @@ uint8_t midi_compute_note(uint16_t keycode); # endif // MIDI_ADVANCED #endif // MIDI_ENABLE - -#endif diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 292bc537424be9a1a636f7c22360ba2ce4745fb1..01014aa6c21661022a5f00546eab4567b2fb3a48 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROCESS_MUSIC_H -#define PROCESS_MUSIC_H +#pragma once #include "quantum.h" @@ -57,5 +56,3 @@ bool music_mask_user(uint16_t keycode); # endif #endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) - -#endif diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h index 71d3a4b56a67521d6b3d83856add855b4b5d022a..3c6d06ff94afd486b02bd5dbd43e3b45ae108929 100644 --- a/quantum/process_keycode/process_printer.h +++ b/quantum/process_keycode/process_printer.h @@ -14,13 +14,10 @@ * along with this program. If not, see . */ -#ifndef PROCESS_PRINTER_H -#define PROCESS_PRINTER_H +#pragma once #include "quantum.h" #include "protocol/serial.h" bool process_printer(uint16_t keycode, keyrecord_t *record); - -#endif diff --git a/quantum/process_keycode/process_steno.h b/quantum/process_keycode/process_steno.h index ed049eb13fecbf75d7c0d77dd5da7b918e7b7143..d11fd40af06cc9942f2a7c16664200226a9f992f 100644 --- a/quantum/process_keycode/process_steno.h +++ b/quantum/process_keycode/process_steno.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PROCESS_STENO_H -#define PROCESS_STENO_H + +#pragma once #include "quantum.h" @@ -25,5 +25,3 @@ void steno_init(void); void steno_set_mode(steno_mode_t mode); uint8_t *steno_get_state(void); uint8_t *steno_get_chord(void); - -#endif diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 09ceef74d86f0719427cc41d4f971f0c0d86351c..a013c5cabf532cd1a4f88c0bd9eb33e357a0d8df 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PROCESS_TAP_DANCE_H -#define PROCESS_TAP_DANCE_H + +#pragma once #ifdef TAP_DANCE_ENABLE @@ -101,5 +101,3 @@ void qk_tap_dance_dual_role_reset(qk_tap_dance_state_t *state, void *user_data); # define TD(n) KC_NO #endif - -#endif diff --git a/quantum/process_keycode/process_terminal.h b/quantum/process_keycode/process_terminal.h index 8426f442b66731d738a2eea26cd36f344a330958..0159131e5b91ba1663ea19f62311b79ce978cb1b 100644 --- a/quantum/process_keycode/process_terminal.h +++ b/quantum/process_keycode/process_terminal.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROCESS_TERMINAL_H -#define PROCESS_TERMINAL_H +#pragma once #include "quantum.h" @@ -23,5 +22,3 @@ extern const char keycode_to_ascii_lut[58]; extern const char shifted_keycode_to_ascii_lut[58]; extern const char terminal_prompt[8]; bool process_terminal(uint16_t keycode, keyrecord_t *record); - -#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_terminal_nop.h b/quantum/process_keycode/process_terminal_nop.h index 56895b33c30323add91ecca94a70dcc31559c12f..36e25320c5a358a87703a603d2b4212096757418 100644 --- a/quantum/process_keycode/process_terminal_nop.h +++ b/quantum/process_keycode/process_terminal_nop.h @@ -14,12 +14,9 @@ * along with this program. If not, see . */ -#ifndef PROCESS_TERMINAL_H -#define PROCESS_TERMINAL_H +#pragma once #include "quantum.h" #define TERM_ON KC_NO #define TERM_OFF KC_NO - -#endif \ No newline at end of file diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index a2cc7b38d91b9597365ea48f63b8926d1611b3f9..0160c5586d33272e4c968424a66962171b40ce9b 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef QUANTUM_KEYCODES_H -#define QUANTUM_KEYCODES_H + +#pragma once #if defined(SEQUENCER_ENABLE) # include "sequencer.h" @@ -889,5 +889,3 @@ enum quantum_keycodes { #define DM_RSTP DYN_REC_STOP #define DM_PLY1 DYN_MACRO_PLAY1 #define DM_PLY2 DYN_MACRO_PLAY2 - -#endif // QUANTUM_KEYCODES_H diff --git a/quantum/rgb.h b/quantum/rgb.h index 7b6ea0542f282af29a3a997804e4738de9dbcc2e..2602fc0b200a806c79a11b904a15a220881b6722 100644 --- a/quantum/rgb.h +++ b/quantum/rgb.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef RGB_H -#define RGB_H +#pragma once __attribute__((weak)) void rgblight_toggle(void){}; @@ -38,5 +37,3 @@ __attribute__((weak)) void rgblight_decrease_val(void){}; __attribute__((weak)) void rgblight_increase_speed(void){}; __attribute__((weak)) void rgblight_decrease_speed(void){}; - -#endif \ No newline at end of file diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 1fd016d79a54abcb5aa0862b4615523d46be5314..8c80c1bff0ce123070c6ef664c2f33b0270cf83c 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef RGB_MATRIX_H -#define RGB_MATRIX_H +#pragma once #include #include @@ -226,5 +225,3 @@ extern last_hit_t g_last_hit_tracker; #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; #endif - -#endif diff --git a/quantum/rgblight.h b/quantum/rgblight.h index c3a9e94b7c2485483052d2d365e9442114c1a6f5..c02fd4f37b64f6e5ba5f646470c8bc521b0c3128 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef RGBLIGHT_H -#define RGBLIGHT_H + +#pragma once /***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) **** @@ -437,4 +437,3 @@ void rgblight_effect_twinkle(animation_status_t *anim); # endif #endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE -#endif // RGBLIGHT_H diff --git a/quantum/serial_link/protocol/byte_stuffer.h b/quantum/serial_link/protocol/byte_stuffer.h index 97e8968564a4e9e77f09f6ba85ae67d7f1d55387..397ed3baae19bda193197fbd4f142861cdd98650 100644 --- a/quantum/serial_link/protocol/byte_stuffer.h +++ b/quantum/serial_link/protocol/byte_stuffer.h @@ -22,8 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_BYTE_STUFFER_H -#define SERIAL_LINK_BYTE_STUFFER_H +#pragma once #include @@ -33,5 +32,3 @@ SOFTWARE. void init_byte_stuffer(void); void byte_stuffer_recv_byte(uint8_t link, uint8_t data); void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size); - -#endif diff --git a/quantum/serial_link/protocol/frame_router.h b/quantum/serial_link/protocol/frame_router.h index 712250ff359faf32abe8fa3bf4026f4d9b4be224..9325fe4eed96c6d2869df6632407c4813f949e1c 100644 --- a/quantum/serial_link/protocol/frame_router.h +++ b/quantum/serial_link/protocol/frame_router.h @@ -22,8 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_FRAME_ROUTER_H -#define SERIAL_LINK_FRAME_ROUTER_H +#pragma once #include #include @@ -34,5 +33,3 @@ SOFTWARE. void router_set_master(bool master); void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size); void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size); - -#endif diff --git a/quantum/serial_link/protocol/frame_validator.h b/quantum/serial_link/protocol/frame_validator.h index 4a910d510b922b5f4cc0ca992e54de623cb8fc8f..0f78768a00fa3a6e45cc33bb0cd2d025b63c4860 100644 --- a/quantum/serial_link/protocol/frame_validator.h +++ b/quantum/serial_link/protocol/frame_validator.h @@ -22,13 +22,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_FRAME_VALIDATOR_H -#define SERIAL_LINK_FRAME_VALIDATOR_H +#pragma once #include void validator_recv_frame(uint8_t link, uint8_t* data, uint16_t size); // The buffer pointed to by the data needs 4 additional bytes void validator_send_frame(uint8_t link, uint8_t* data, uint16_t size); - -#endif diff --git a/quantum/serial_link/protocol/physical.h b/quantum/serial_link/protocol/physical.h index 425e06cdd294d541d5383aa72d935590cc01e279..399c9d1f7647379cfa1ea480e14b81bc4d82851d 100644 --- a/quantum/serial_link/protocol/physical.h +++ b/quantum/serial_link/protocol/physical.h @@ -22,9 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_PHYSICAL_H -#define SERIAL_LINK_PHYSICAL_H +#pragma once void send_data(uint8_t link, const uint8_t* data, uint16_t size); - -#endif diff --git a/quantum/serial_link/protocol/transport.h b/quantum/serial_link/protocol/transport.h index 309a56b000a2d4fb19dac58fa2f70c04e1f6190d..3ce0c9fe4e6f4fae8f71f2f8d69f82535ebd02aa 100644 --- a/quantum/serial_link/protocol/transport.h +++ b/quantum/serial_link/protocol/transport.h @@ -22,8 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_TRANSPORT_H -#define SERIAL_LINK_TRANSPORT_H +#pragma once #include "serial_link/protocol/triple_buffered_object.h" #include "serial_link/system/serial_link.h" @@ -138,5 +137,3 @@ void add_remote_objects(remote_object_t** remote_objects, uint32_t num_remote_ob void reinitialize_serial_link_transport(void); void transport_recv_frame(uint8_t from, uint8_t* data, uint16_t size); void update_transport(void); - -#endif diff --git a/quantum/serial_link/protocol/triple_buffered_object.h b/quantum/serial_link/protocol/triple_buffered_object.h index 6ec98d52bf40ef85d5b5c8c12fa660f59d80eb3d..717d6d7b8be3e23f78560d5eb25531cdc314fd0f 100644 --- a/quantum/serial_link/protocol/triple_buffered_object.h +++ b/quantum/serial_link/protocol/triple_buffered_object.h @@ -22,8 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_TRIPLE_BUFFERED_OBJECT_H -#define SERIAL_LINK_TRIPLE_BUFFERED_OBJECT_H +#pragma once #include @@ -43,5 +42,3 @@ void triple_buffer_init(triple_buffer_object_t* object); void* triple_buffer_begin_write_internal(uint16_t object_size, triple_buffer_object_t* object); void triple_buffer_end_write_internal(triple_buffer_object_t* object); void* triple_buffer_read_internal(uint16_t object_size, triple_buffer_object_t* object); - -#endif diff --git a/quantum/serial_link/system/serial_link.h b/quantum/serial_link/system/serial_link.h index b6a4739575155bc4fe5be0f3a10516c60a9543ab..adc1f6e93d00a013ad70857412640d816ce80f8a 100644 --- a/quantum/serial_link/system/serial_link.h +++ b/quantum/serial_link/system/serial_link.h @@ -22,8 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SERIAL_LINK_H -#define SERIAL_LINK_H +#pragma once #include "host_driver.h" #include @@ -53,5 +52,3 @@ inline void serial_link_unlock(void) {} void signal_data_written(void); #endif - -#endif diff --git a/quantum/variable_trace.h b/quantum/variable_trace.h index 26b810d3cd25bf35869bc719b96d63d17eb92038..f4d1253800cd946ce82ed2e7851cffd53c4e3b19 100644 --- a/quantum/variable_trace.h +++ b/quantum/variable_trace.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef VARIABLE_TRACE_H -#define VARIABLE_TRACE_H +#pragma once // For more information about the variable tracing see the readme. @@ -46,4 +45,3 @@ void add_traced_variable(const char* name, void* addr, unsigned size, const char* func, int line); void remove_traced_variable(const char* name, const char* func, int line); void verify_traced_variables(const char* func, int line); -#endif diff --git a/quantum/velocikey.h b/quantum/velocikey.h index b977606c5dc775cde504129ba9da3d71a1e7b025..c375f82f7180dfad816353521bf275c9c410f87c 100644 --- a/quantum/velocikey.h +++ b/quantum/velocikey.h @@ -1,5 +1,4 @@ -#ifndef VELOCIKEY_H -#define VELOCIKEY_H +#pragma once #include #include @@ -9,5 +8,3 @@ void velocikey_toggle(void); void velocikey_accelerate(void); void velocikey_decelerate(void); uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue); - -#endif \ No newline at end of file diff --git a/quantum/visualizer/common_gfxconf.h b/quantum/visualizer/common_gfxconf.h index e5bbddbb02bae4500d5fdecdf5710c2276f17431..e0735b37d0471753989c90789595f9d021dca21b 100644 --- a/quantum/visualizer/common_gfxconf.h +++ b/quantum/visualizer/common_gfxconf.h @@ -19,8 +19,7 @@ * Please use spaces instead of tabs in this file. */ -#ifndef COMMON_GFXCONF_H -#define COMMON_GFXCONF_H +#pragma once /////////////////////////////////////////////////////////////////////////// // GFX - Compatibility options // @@ -353,5 +352,3 @@ #define GMISC_NEED_MATRIXFLOAT2D GFXON #define GMISC_NEED_MATRIXFIXED2D GFXOFF //#define GMISC_NEED_HITTEST_POLY GFXOFF - -#endif /* COMMON_GFXCONF_H */ diff --git a/quantum/visualizer/default_animations.h b/quantum/visualizer/default_animations.h index 51320b8b8a8deb4a71c434b9cd98bbf7e6f732b4..9accd89774548c81f707965952f1ab632b0696ac 100644 --- a/quantum/visualizer/default_animations.h +++ b/quantum/visualizer/default_animations.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef DEFAULT_ANIMATIONS_H_ -#define DEFAULT_ANIMATIONS_H_ +#pragma once #include "visualizer.h" @@ -26,5 +25,3 @@ extern keyframe_animation_t default_suspend_animation; // An animation for testing and demonstrating the led support, should probably not be used for real world // cases extern keyframe_animation_t led_test_animation; - -#endif /* DEFAULT_ANIMATIONS_H_ */ diff --git a/quantum/visualizer/lcd_backlight.h b/quantum/visualizer/lcd_backlight.h index 0a1535edf52952b43d0a78849d1fa3195464072a..4ea5b14639039f90419c9ffe1c75e75863dc08cd 100644 --- a/quantum/visualizer/lcd_backlight.h +++ b/quantum/visualizer/lcd_backlight.h @@ -22,8 +22,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef LCD_BACKLIGHT_H_ -#define LCD_BACKLIGHT_H_ +#pragma once + #include // Helper macros for storing hue, staturation and intensity as unsigned integers @@ -41,5 +41,3 @@ uint8_t lcd_get_backlight_brightness(void); void lcd_backlight_hal_init(void); void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b); - -#endif /* LCD_BACKLIGHT_H_ */ diff --git a/quantum/visualizer/lcd_backlight_keyframes.h b/quantum/visualizer/lcd_backlight_keyframes.h index bde118449b646b560256b508c9252f827869b0f4..88768dd4a509e4e8f2cbc988d6884b59a5a90f28 100644 --- a/quantum/visualizer/lcd_backlight_keyframes.h +++ b/quantum/visualizer/lcd_backlight_keyframes.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef QUANTUM_VISUALIZER_LCD_BACKLIGHT_KEYFRAMES_H_ -#define QUANTUM_VISUALIZER_LCD_BACKLIGHT_KEYFRAMES_H_ +#pragma once #include "visualizer.h" @@ -26,5 +25,3 @@ bool lcd_backlight_keyframe_set_color(keyframe_animation_t* animation, visualize bool lcd_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); bool lcd_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); - -#endif /* QUANTUM_VISUALIZER_LCD_BACKLIGHT_KEYFRAMES_H_ */ diff --git a/quantum/visualizer/lcd_keyframes.h b/quantum/visualizer/lcd_keyframes.h index 6346c8643b49e9fddf08fc5a4764c93a7cc2db91..b7125e83233514202a298c0596e4ea597ed97e91 100644 --- a/quantum/visualizer/lcd_keyframes.h +++ b/quantum/visualizer/lcd_keyframes.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef QUANTUM_VISUALIZER_LCD_KEYFRAMES_H_ -#define QUANTUM_VISUALIZER_LCD_KEYFRAMES_H_ +#pragma once #include "visualizer.h" @@ -34,5 +33,3 @@ bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); - -#endif /* QUANTUM_VISUALIZER_LCD_KEYFRAMES_H_ */ diff --git a/quantum/visualizer/led_backlight_keyframes.h b/quantum/visualizer/led_backlight_keyframes.h index 648f92b915f7512f0c7f14174a65c348b2ce53c4..90153be5eb6ae260d89183350474d5160188fb84 100644 --- a/quantum/visualizer/led_backlight_keyframes.h +++ b/quantum/visualizer/led_backlight_keyframes.h @@ -22,8 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef LED_BACKLIGHT_KEYFRAMES_H -#define LED_BACKLIGHT_KEYFRAMES_H +#pragma once #include "visualizer.h" @@ -39,5 +38,3 @@ bool led_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_ bool led_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); extern keyframe_animation_t led_test_animation; - -#endif /* LED_KEYFRAMES_H */ diff --git a/quantum/visualizer/resources/resources.h b/quantum/visualizer/resources/resources.h index 74fd8d2f6522133b1176d050f0016f130b3fd21d..5178fbe55a650fcfe5078164ff7a732a9b4d849b 100644 --- a/quantum/visualizer/resources/resources.h +++ b/quantum/visualizer/resources/resources.h @@ -14,13 +14,10 @@ * along with this program. If not, see . */ -#ifndef QUANTUM_VISUALIZER_RESOURCES_RESOURCES_H_ -#define QUANTUM_VISUALIZER_RESOURCES_RESOURCES_H_ +#pragma once #include #ifdef LCD_ENABLE extern const uint8_t resource_lcd_logo[]; #endif - -#endif /* QUANTUM_VISUALIZER_RESOURCES_RESOURCES_H_ */ diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 488d130decdbd7c592a49b08ad156afbe107e0da..627c80a305a501fbf6c73427a83ced96e314b716 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -22,8 +22,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef VISUALIZER_H -#define VISUALIZER_H +#pragma once + #include #include #include @@ -152,5 +152,3 @@ void user_visualizer_suspend(visualizer_state_t* state); void initialize_user_visualizer(visualizer_state_t* state); // Called when the computer resumes from a suspend void user_visualizer_resume(visualizer_state_t* state); - -#endif /* VISUALIZER_H */ diff --git a/quantum/visualizer/visualizer_keyframes.h b/quantum/visualizer/visualizer_keyframes.h index 9ef7653c5e4424def9a38eff22959f0cc71c06fe..c92ff1611360ca4cf9cde362a9acb7b2eb8ec44f 100644 --- a/quantum/visualizer/visualizer_keyframes.h +++ b/quantum/visualizer/visualizer_keyframes.h @@ -14,13 +14,10 @@ * along with this program. If not, see . */ -#ifndef QUANTUM_VISUALIZER_VISUALIZER_KEYFRAMES_H_ -#define QUANTUM_VISUALIZER_VISUALIZER_KEYFRAMES_H_ +#pragma once #include "visualizer.h" // Some predefined keyframe functions that can be used by the user code // Does nothing, useful for adding delays bool keyframe_no_operation(keyframe_animation_t* animation, visualizer_state_t* state); - -#endif /* QUANTUM_VISUALIZER_VISUALIZER_KEYFRAMES_H_ */