From 81167d9945e853274665ba19cf03969d3bc0222c Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 15 Nov 2019 00:00:13 -0500 Subject: [PATCH] #pragma once --- firmware/controllers/algo/accel_enrichment.h | 6 +----- firmware/controllers/algo/advance_map.h | 5 +---- firmware/controllers/algo/algo.h | 5 +---- firmware/controllers/algo/lcd_menu_tree.h | 8 ++------ firmware/controllers/algo/rusefi_enums.h | 5 +---- firmware/controllers/flash_main.h | 5 +---- firmware/controllers/injector_central.h | 5 +---- firmware/controllers/map_averaging.h | 5 +---- unit_tests/boards.h | 5 +---- unit_tests/globalaccess.h | 5 +---- 10 files changed, 11 insertions(+), 43 deletions(-) diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 844f23f717..d5a3351f0f 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ACC_ENRICHMENT_H_ -#define ACC_ENRICHMENT_H_ +#pragma once #include "global.h" #include "cyclic_buffer.h" @@ -93,6 +92,3 @@ void setDecelThr(float value); void setDecelMult(float value); void updateAccelParameters(); - -#endif /* ACC_ENRICHMENT_H_ */ - diff --git a/firmware/controllers/algo/advance_map.h b/firmware/controllers/algo/advance_map.h index 58e4e0ab75..f9cf4b94f0 100644 --- a/firmware/controllers/algo/advance_map.h +++ b/firmware/controllers/algo/advance_map.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ADVANCE_H_ -#define ADVANCE_H_ +#pragma once #include "engine.h" @@ -17,5 +16,3 @@ float getTopAdvanceForBore(chamber_style_e style, int octane, double compression float getInitialAdvance(int rpm, float map, float advanceMax); void buildTimingMap(float advanceMax DECLARE_CONFIG_PARAMETER_SUFFIX); angle_t getAdvanceCorrections(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); - -#endif /* ADVANCE_H_ */ diff --git a/firmware/controllers/algo/algo.h b/firmware/controllers/algo/algo.h index 2444b99040..f08b8d1497 100644 --- a/firmware/controllers/algo/algo.h +++ b/firmware/controllers/algo/algo.h @@ -5,12 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ALGO_H_ -#define ALGO_H_ +#pragma once #include "global.h" #include "engine_configuration.h" void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initAlgo(Logging *sharedLogger); - -#endif /* ALGO_H_ */ diff --git a/firmware/controllers/algo/lcd_menu_tree.h b/firmware/controllers/algo/lcd_menu_tree.h index 2a8e208ec0..ae2dc7285f 100644 --- a/firmware/controllers/algo/lcd_menu_tree.h +++ b/firmware/controllers/algo/lcd_menu_tree.h @@ -4,8 +4,8 @@ * @date Jan 6, 2015 * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef CONTROLLERS_ALGO_LCD_MENU_TREE_H_ -#define CONTROLLERS_ALGO_LCD_MENU_TREE_H_ + +#pragma once typedef enum { LL_STRING, @@ -73,7 +73,3 @@ public: MenuItem *current = nullptr; MenuItem *topVisible = nullptr; }; - - - -#endif /* CONTROLLERS_ALGO_LCD_MENU_TREE_H_ */ diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 4f4187761f..b1b2ffc756 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef RUSEFI_ENUMS_H_ -#define RUSEFI_ENUMS_H_ +#pragma once #include "efifeatures.h" #include "obd_error_codes.h" @@ -839,5 +838,3 @@ typedef enum { */ Force_4bytes_size_idle_state_e = ENUM_32_BITS, } idle_state_e; - -#endif /* RUSEFI_ENUMS_H_ */ diff --git a/firmware/controllers/flash_main.h b/firmware/controllers/flash_main.h index fcde19c9fa..7552df3d12 100644 --- a/firmware/controllers/flash_main.h +++ b/firmware/controllers/flash_main.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef FLASH_MAIN_H_ -#define FLASH_MAIN_H_ +#pragma once #include "engine.h" @@ -38,5 +37,3 @@ void setNeedToWriteConfiguration(void); */ bool getNeedToWriteConfiguration(void); void writeToFlashIfPending(void); - -#endif /* FLASH_MAIN_H_ */ diff --git a/firmware/controllers/injector_central.h b/firmware/controllers/injector_central.h index ce05e66694..de9cdc0c2c 100644 --- a/firmware/controllers/injector_central.h +++ b/firmware/controllers/injector_central.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef INJECTOR_CENTRAL_H_ -#define INJECTOR_CENTRAL_H_ +#pragma once #include "engine.h" @@ -21,5 +20,3 @@ void initInjectorCentral(Logging *sharedLogger); bool isRunningBenchTest(void); void executeTSCommand(uint16_t subsystem, uint16_t index); - -#endif /* INJECTOR_CENTRAL_H_ */ diff --git a/firmware/controllers/map_averaging.h b/firmware/controllers/map_averaging.h index 6df7c1125b..3069b4eb17 100644 --- a/firmware/controllers/map_averaging.h +++ b/firmware/controllers/map_averaging.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ADC_AVERAGING_H_ -#define ADC_AVERAGING_H_ +#pragma once #include "engine.h" @@ -24,5 +23,3 @@ void postMapState(TunerStudioOutputChannels *tsOutputChannels); #endif #endif /* EFI_MAP_AVERAGING */ - -#endif /* ADC_AVERAGING_H_ */ diff --git a/unit_tests/boards.h b/unit_tests/boards.h index 579840c2e7..f59bcf0add 100644 --- a/unit_tests/boards.h +++ b/unit_tests/boards.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef BOARDS_H_ -#define BOARDS_H_ +#pragma once #include "engine_configuration.h" #include "adc_math.h" @@ -14,5 +13,3 @@ #define ADC_CHANNEL_VREF 0 int getAdcValue(const char *msg, adc_channel_e channel); - -#endif /* BOARDS_H_ */ diff --git a/unit_tests/globalaccess.h b/unit_tests/globalaccess.h index b5e5d19ced..a5d45353dc 100644 --- a/unit_tests/globalaccess.h +++ b/unit_tests/globalaccess.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef GLOBALACCESS_H_ -#define GLOBALACCESS_H_ +#pragma once #define DECLARE_CONFIG_PARAMETER_SIGNATURE engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration #define DECLARE_CONFIG_PARAMETER_SUFFIX , DECLARE_CONFIG_PARAMETER_SIGNATURE @@ -26,5 +25,3 @@ //#define CONFIGB(x) engine->engineConfigurationPtr->bc.x #define CONFIGB(x) CONFIG(bc.x) #define ENGINE(x) engine->x - -#endif /* GLOBALACCESS_H_ */