From 11e1935d76b758de6ccfd0208ce3874c6096fc54 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Fri, 18 Sep 2009 02:48:31 +0000 Subject: [PATCH] Remove include guards in favour of '#pragma once'. Normally I would use an include guard however #pragama once is easier to spot and we already used it in mst of our files, this is for the sake of consistency until they're removed. Originally committed to SVN as r3538. --- aegisub/src/aegisublocale.h | 9 +-------- aegisub/src/ass_style_storage.h | 10 +--------- aegisub/src/audio_box.h | 10 +--------- aegisub/src/audio_display.h | 10 +--------- aegisub/src/audio_karaoke.h | 10 +--------- aegisub/src/audio_renderer_spectrum.h | 9 +-------- aegisub/src/auto4_base.h | 8 +------- aegisub/src/auto4_lua.h | 8 +------- aegisub/src/auto4_lua_factory.h | 8 +------- aegisub/src/avisynth_wrap.h | 8 +------- aegisub/src/block_cache.h | 9 +-------- aegisub/src/charset_conv.h | 9 ++------- aegisub/src/colorspace.h | 10 ++-------- aegisub/src/dialog_automation.h | 8 +------- aegisub/src/dialog_colorpicker.h | 10 ++-------- aegisub/src/dialog_dummy_video.h | 10 ++-------- aegisub/src/dialog_jumpto.h | 9 +-------- aegisub/src/dialog_kara_timing_copy.h | 10 +--------- aegisub/src/dialog_progress.h | 10 +--------- aegisub/src/dialog_resample.h | 10 +--------- aegisub/src/dialog_selection.h | 9 +-------- aegisub/src/dialog_shift_times.h | 10 +--------- aegisub/src/dialog_splash.h | 10 +--------- aegisub/src/dialog_style_editor.h | 10 +--------- aegisub/src/dialog_style_manager.h | 10 +--------- aegisub/src/dialog_styling_assistant.h | 10 +--------- aegisub/src/dialog_text_import.h | 7 +------ aegisub/src/dialog_timing_processor.h | 9 +-------- aegisub/src/dialog_translation.h | 10 +--------- aegisub/src/dialog_video_details.h | 8 +------- aegisub/src/drop.h | 7 +------ aegisub/src/fft.h | 9 +-------- aegisub/src/frame_main.h | 10 +--------- aegisub/src/hotkeys.h | 10 +--------- aegisub/src/string_codec.h | 9 +-------- aegisub/src/text_file_writer.h | 9 +-------- aegisub/src/toggle_bitmap.h | 10 +--------- aegisub/src/validators.h | 9 +-------- aegisub/src/video_provider_dummy.h | 8 +------- 39 files changed, 43 insertions(+), 316 deletions(-) diff --git a/aegisub/src/aegisublocale.h b/aegisub/src/aegisublocale.h index 909954d7a..cfa40b4ef 100644 --- a/aegisub/src/aegisublocale.h +++ b/aegisub/src/aegisublocale.h @@ -34,10 +34,8 @@ /// @ingroup utility /// -#ifndef LOCALE_H -/// DOCME -#define LOCALE_H +#pragma once ////////////// @@ -68,8 +66,3 @@ public: void Init(int language); int PickLanguage(); }; - - -#endif - - diff --git a/aegisub/src/ass_style_storage.h b/aegisub/src/ass_style_storage.h index 24db38873..3a00ba069 100644 --- a/aegisub/src/ass_style_storage.h +++ b/aegisub/src/ass_style_storage.h @@ -35,10 +35,7 @@ /// -#ifndef ASS_STYLE_STORAGE_H - -/// DOCME -#define ASS_STYLE_STORAGE_H +#pragma once //////////// @@ -73,8 +70,3 @@ public: void Save(wxString name); void Load(wxString name); }; - - -#endif - - diff --git a/aegisub/src/audio_box.h b/aegisub/src/audio_box.h index 4904022cd..c1de1288a 100644 --- a/aegisub/src/audio_box.h +++ b/aegisub/src/audio_box.h @@ -35,10 +35,7 @@ /// -#ifndef AUDIO_BOX_H - -/// DOCME -#define AUDIO_BOX_H +#pragma once /////////// @@ -312,8 +309,3 @@ enum { /// DOCME Audio_Check_Spectrum }; - - -#endif - - diff --git a/aegisub/src/audio_display.h b/aegisub/src/audio_display.h index 1b69ab579..ab51d078e 100644 --- a/aegisub/src/audio_display.h +++ b/aegisub/src/audio_display.h @@ -35,10 +35,7 @@ /// -#ifndef AUDIO_DISPLAY_H - -/// DOCME -#define AUDIO_DISPLAY_H +#pragma once /////////// @@ -319,8 +316,3 @@ enum { /// DOCME Audio_Update_Timer = 1700 }; - - -#endif - - diff --git a/aegisub/src/audio_karaoke.h b/aegisub/src/audio_karaoke.h index f98ce204d..68d72e327 100644 --- a/aegisub/src/audio_karaoke.h +++ b/aegisub/src/audio_karaoke.h @@ -35,10 +35,7 @@ /// -#ifndef AUDIO_KARAOKE_H - -/// DOCME -#define AUDIO_KARAOKE_H +#pragma once /////////// @@ -190,8 +187,3 @@ public: DECLARE_EVENT_TABLE() }; - - -#endif - - diff --git a/aegisub/src/audio_renderer_spectrum.h b/aegisub/src/audio_renderer_spectrum.h index e40c4352e..cc3889c72 100644 --- a/aegisub/src/audio_renderer_spectrum.h +++ b/aegisub/src/audio_renderer_spectrum.h @@ -37,10 +37,8 @@ /// Calculate and render a frequency-power spectrum for PCM audio data. -#ifndef AUDIO_SPECTRUM_H +#pragma once -/// Include guard for audio_spectrum.h -#define AUDIO_SPECTRUM_H #ifndef AGI_PRE #include @@ -109,8 +107,3 @@ public: /// @param _power_scale Amplification factor to use. void SetScaling(float _power_scale); }; - - -#endif - - diff --git a/aegisub/src/auto4_base.h b/aegisub/src/auto4_base.h index 3c1ded22a..2915dfd2b 100644 --- a/aegisub/src/auto4_base.h +++ b/aegisub/src/auto4_base.h @@ -35,10 +35,8 @@ /// -#ifndef _AUTO4_BASE_H +#pragma once -/// DOCME -#define _AUTO4_BASE_H #ifndef AGI_PRE #include @@ -554,7 +552,3 @@ namespace Automation4 { }; }; - -#endif - - diff --git a/aegisub/src/auto4_lua.h b/aegisub/src/auto4_lua.h index 512743461..45b9d4113 100644 --- a/aegisub/src/auto4_lua.h +++ b/aegisub/src/auto4_lua.h @@ -35,10 +35,8 @@ /// -#ifndef _AUTO4_LUA_H +#pragma once -/// DOCME -#define _AUTO4_LUA_H #ifndef AGI_PRE #include @@ -389,7 +387,3 @@ namespace Automation4 { }; }; - -#endif - - diff --git a/aegisub/src/auto4_lua_factory.h b/aegisub/src/auto4_lua_factory.h index 3194ed8cc..d9dc6c92a 100644 --- a/aegisub/src/auto4_lua_factory.h +++ b/aegisub/src/auto4_lua_factory.h @@ -35,10 +35,8 @@ /// -#ifndef _AUTO4_LUA_FACTORY_H +#pragma once -/// DOCME -#define _AUTO4_LUA_FACTORY_H #include "auto4_base.h" @@ -61,7 +59,3 @@ namespace Automation4 { }; }; - -#endif - - diff --git a/aegisub/src/avisynth_wrap.h b/aegisub/src/avisynth_wrap.h index 7b77d56fd..ff3d8a8be 100644 --- a/aegisub/src/avisynth_wrap.h +++ b/aegisub/src/avisynth_wrap.h @@ -35,10 +35,7 @@ /// -#ifndef AVISYNTH_WRAP_H - -/// DOCME -#define AVISYNTH_WRAP_H +#pragma once /////////// @@ -100,6 +97,3 @@ public: }; #endif -#endif - - diff --git a/aegisub/src/block_cache.h b/aegisub/src/block_cache.h index 09014bf79..46a93fe69 100644 --- a/aegisub/src/block_cache.h +++ b/aegisub/src/block_cache.h @@ -34,9 +34,7 @@ /// @brief Template class for creating caches for blocks of data -// Include guard -#ifndef BLOCK_CACHE_H -#define BLOCK_CACHE_H +#pragma once #ifndef AGI_PRE @@ -310,8 +308,3 @@ public: return 0; } }; - - -// Include guard -#endif - diff --git a/aegisub/src/charset_conv.h b/aegisub/src/charset_conv.h index 4ddf1672d..649d7b9b5 100644 --- a/aegisub/src/charset_conv.h +++ b/aegisub/src/charset_conv.h @@ -34,10 +34,9 @@ /// @ingroup utility /// -#ifndef AEGISUB_CHARSET_CONV_H -/// DOCME -#define AEGISUB_CHARSET_CONV_H +#pragma once + #ifndef AGI_PRE #include @@ -172,7 +171,3 @@ extern AegisubCSConv& csConvLocal; # define WCHAR_T_ENCODING ((Endian::MachineToBig((uint32_t)1) == 1) ? "UTF-16BE" : "UTF-16LE") # endif #endif - -#endif - - diff --git a/aegisub/src/colorspace.h b/aegisub/src/colorspace.h index 507f7d671..68631350e 100644 --- a/aegisub/src/colorspace.h +++ b/aegisub/src/colorspace.h @@ -34,10 +34,9 @@ /// @ingroup utility /// -#ifndef COLORSPACE_H -/// DOCME -#define COLORSPACE_H +#pragma once + #ifndef AGI_PRE #include @@ -84,8 +83,3 @@ wxString color_to_html(wxColour color); // Convert a HTML hex string to a wxColour wxColour html_to_color(wxString html); - - -#endif - - diff --git a/aegisub/src/dialog_automation.h b/aegisub/src/dialog_automation.h index 01000016a..eac54a3c2 100644 --- a/aegisub/src/dialog_automation.h +++ b/aegisub/src/dialog_automation.h @@ -35,10 +35,8 @@ /// -#ifndef DIALOG_AUTOMATION_H +#pragma once -/// DOCME -#define DIALOG_AUTOMATION_H #ifndef AGI_PRE #include @@ -140,7 +138,3 @@ enum { /// DOCME Automation_Reload_Autoload }; - -#endif - - diff --git a/aegisub/src/dialog_colorpicker.h b/aegisub/src/dialog_colorpicker.h index e889746e6..86f5d926a 100644 --- a/aegisub/src/dialog_colorpicker.h +++ b/aegisub/src/dialog_colorpicker.h @@ -34,10 +34,9 @@ /// @ingroup tools_ui /// -#ifndef DIALOG_COLORPICKER_H -/// DOCME -#define DIALOG_COLORPICKER_H +#pragma once + #ifndef AGI_PRE #include @@ -390,8 +389,3 @@ enum { /// DOCME BUTTON_RGBADJUST }; - - -#endif - - diff --git a/aegisub/src/dialog_dummy_video.h b/aegisub/src/dialog_dummy_video.h index 3b841e41c..a9510b77d 100644 --- a/aegisub/src/dialog_dummy_video.h +++ b/aegisub/src/dialog_dummy_video.h @@ -34,10 +34,9 @@ /// @ingroup secondary_ui /// -#ifndef _DIALOG_DUMMY_VIDEO_H -/// DOCME -#define _DIALOG_DUMMY_VIDEO_H +#pragma once + #ifndef AGI_PRE #include @@ -118,8 +117,3 @@ enum { /// DOCME Dummy_Video_Length, }; - - -#endif - - diff --git a/aegisub/src/dialog_jumpto.h b/aegisub/src/dialog_jumpto.h index 696384f9c..aa3636687 100644 --- a/aegisub/src/dialog_jumpto.h +++ b/aegisub/src/dialog_jumpto.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_JUMPTO_H - -/// DOCME -#define DIALOG_JUMPTO_H +#pragma once /////////// @@ -84,7 +81,3 @@ public: DECLARE_EVENT_TABLE() }; - -#endif - - diff --git a/aegisub/src/dialog_kara_timing_copy.h b/aegisub/src/dialog_kara_timing_copy.h index f82eeee53..79e2f196e 100644 --- a/aegisub/src/dialog_kara_timing_copy.h +++ b/aegisub/src/dialog_kara_timing_copy.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_KARA_TIMING_COPY_H - -/// DOCME -#define DIALOG_KARA_TIMING_COPY_H +#pragma once /////////// @@ -156,8 +153,3 @@ enum { /// DOCME TEXT_DEST }; - - -#endif - - diff --git a/aegisub/src/dialog_progress.h b/aegisub/src/dialog_progress.h index 5f436814a..7fc22f235 100644 --- a/aegisub/src/dialog_progress.h +++ b/aegisub/src/dialog_progress.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_PROGRESS_H - -/// DOCME -#define DIALOG_PROGRESS_H +#pragma once /////////// @@ -108,8 +105,3 @@ public: wxThread::ExitCode Entry(); void Close(); }; - - -#endif - - diff --git a/aegisub/src/dialog_resample.h b/aegisub/src/dialog_resample.h index 7e17db77c..7b55294c4 100644 --- a/aegisub/src/dialog_resample.h +++ b/aegisub/src/dialog_resample.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_RESAMPLE_H - -/// DOCME -#define DIALOG_RESAMPLE_H +#pragma once /////////// @@ -154,8 +151,3 @@ enum { /// DOCME TEXT_MARGIN_B }; - - -#endif - - diff --git a/aegisub/src/dialog_selection.h b/aegisub/src/dialog_selection.h index f55062feb..4ed3fdbdf 100644 --- a/aegisub/src/dialog_selection.h +++ b/aegisub/src/dialog_selection.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_SELECTION_H - -/// DOCME -#define DIALOG_SELECTION_H +#pragma once /////////// @@ -131,7 +128,3 @@ enum { /// DOCME MATCH_COMMENTS_CHECKBOX }; - -#endif - - diff --git a/aegisub/src/dialog_shift_times.h b/aegisub/src/dialog_shift_times.h index f8c617827..cf3daa32e 100644 --- a/aegisub/src/dialog_shift_times.h +++ b/aegisub/src/dialog_shift_times.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_SHIFT_TIMES_H - -/// DOCME -#define DIALOG_SHIFT_TIMES_H +#pragma once /////////// @@ -151,8 +148,3 @@ enum { /// DOCME SHIFT_CLEAR_HISTORY }; - - -#endif - - diff --git a/aegisub/src/dialog_splash.h b/aegisub/src/dialog_splash.h index 19e68392c..addb66eef 100644 --- a/aegisub/src/dialog_splash.h +++ b/aegisub/src/dialog_splash.h @@ -35,10 +35,7 @@ /// -#ifndef SPLASH_H - -/// DOCME -#define SPLASH_H +#pragma once //////////// @@ -76,8 +73,3 @@ public: DECLARE_EVENT_TABLE() }; - - -#endif - - diff --git a/aegisub/src/dialog_style_editor.h b/aegisub/src/dialog_style_editor.h index 7637fa2a5..89dc64b48 100644 --- a/aegisub/src/dialog_style_editor.h +++ b/aegisub/src/dialog_style_editor.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_STYLE_EDITOR_H - -/// DOCME -#define DIALOG_STYLE_EDITOR_H +#pragma once //////////// @@ -225,8 +222,3 @@ public: DECLARE_EVENT_TABLE() }; - - -#endif - - diff --git a/aegisub/src/dialog_style_manager.h b/aegisub/src/dialog_style_manager.h index c42af09e1..844514ee0 100644 --- a/aegisub/src/dialog_style_manager.h +++ b/aegisub/src/dialog_style_manager.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_STYLE_MANAGER_H - -/// DOCME -#define DIALOG_STYLE_MANAGER_H +#pragma once //////////// @@ -314,8 +311,3 @@ public: DialogStyleManagerEvent(DialogStyleManager *control); DECLARE_EVENT_TABLE() }; - - -#endif - - diff --git a/aegisub/src/dialog_styling_assistant.h b/aegisub/src/dialog_styling_assistant.h index 852406251..6a8636cf8 100644 --- a/aegisub/src/dialog_styling_assistant.h +++ b/aegisub/src/dialog_styling_assistant.h @@ -35,10 +35,7 @@ /// -#ifndef DIALOG_STYLING_ASSISTANT_H - -/// DOCME -#define DIALOG_STYLING_ASSISTANT_H +#pragma once /////////// @@ -176,8 +173,3 @@ enum { /// DOCME BUTTON_PLAY_AUDIO }; - - -#endif - - diff --git a/aegisub/src/dialog_text_import.h b/aegisub/src/dialog_text_import.h index fa1c6d2a9..ef83a6a04 100644 --- a/aegisub/src/dialog_text_import.h +++ b/aegisub/src/dialog_text_import.h @@ -34,10 +34,8 @@ /// @ingroup secondary_ui /// -#ifndef _DIALOG_TEXT_IMPORT_H +#pragma once -/// DOCME -#define _DIALOG_TEXT_IMPORT_H /////////// // Headers @@ -82,6 +80,3 @@ enum { /// DOCME EDIT_COMMENT_STARTER, }; -#endif - - diff --git a/aegisub/src/dialog_timing_processor.h b/aegisub/src/dialog_timing_processor.h index f99f7a5da..89765dd93 100644 --- a/aegisub/src/dialog_timing_processor.h +++ b/aegisub/src/dialog_timing_processor.h @@ -34,10 +34,8 @@ /// @ingroup tools_ui /// -#ifndef DIALOG_TIMING_PROCESSOR -/// DOCME -#define DIALOG_TIMING_PROCESSOR +#pragma once /////////// @@ -193,8 +191,3 @@ enum { /// DOCME TIMING_STYLE_LIST }; - - -#endif - - diff --git a/aegisub/src/dialog_translation.h b/aegisub/src/dialog_translation.h index aa31262e8..f9aaa685e 100644 --- a/aegisub/src/dialog_translation.h +++ b/aegisub/src/dialog_translation.h @@ -34,10 +34,7 @@ /// @ingroup tools_ui/// -#ifndef DIALOG_TRANSLATION_H - -/// DOCME -#define DIALOG_TRANSLATION_H +#pragma once /////////// @@ -171,8 +168,3 @@ enum { /// DOCME BUTTON_TRANS_PLAY_VIDEO }; - - -#endif - - diff --git a/aegisub/src/dialog_video_details.h b/aegisub/src/dialog_video_details.h index ffed2f7d2..a58f170cd 100644 --- a/aegisub/src/dialog_video_details.h +++ b/aegisub/src/dialog_video_details.h @@ -34,10 +34,8 @@ /// @ingroup secondary_ui /// -#ifndef _DIALOG_VIDEO_DETAILS_H +#pragma once -/// DOCME -#define _DIALOG_VIDEO_DETAILS_H /////////// // Headers @@ -70,7 +68,3 @@ private: public: DialogVideoDetails(wxWindow *parent); }; - -#endif - - diff --git a/aegisub/src/drop.h b/aegisub/src/drop.h index 668b3d045..767f87596 100644 --- a/aegisub/src/drop.h +++ b/aegisub/src/drop.h @@ -35,10 +35,7 @@ /// -#ifndef DROP_H - -/// Inclusion guard -#define DROP_H +#pragma once /////////// @@ -69,5 +66,3 @@ public: bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames); //wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def); }; - -#endif diff --git a/aegisub/src/fft.h b/aegisub/src/fft.h index 1316748d1..dd5103f36 100644 --- a/aegisub/src/fft.h +++ b/aegisub/src/fft.h @@ -35,10 +35,8 @@ /// -#ifndef FFT_H +#pragma once -/// DOCME -#define FFT_H #ifndef AGI_PRE #include // size_t @@ -62,8 +60,3 @@ public: unsigned int ReverseBits(unsigned int index, unsigned int bits); float FrequencyAtIndex(unsigned int baseFreq, unsigned int n_samples, unsigned int index); }; - - -#endif - - diff --git a/aegisub/src/frame_main.h b/aegisub/src/frame_main.h index 38b9f9f96..b3ef59aaf 100644 --- a/aegisub/src/frame_main.h +++ b/aegisub/src/frame_main.h @@ -35,10 +35,7 @@ /// -#ifndef FRAME_MAIN_H - -/// DOCME -#define FRAME_MAIN_H +#pragma once /////////////////// @@ -793,8 +790,3 @@ enum { /// DOCME Menu_Automation_Macro = 2700 }; - - -#endif - - diff --git a/aegisub/src/hotkeys.h b/aegisub/src/hotkeys.h index 45d3be217..188993781 100644 --- a/aegisub/src/hotkeys.h +++ b/aegisub/src/hotkeys.h @@ -35,10 +35,7 @@ /// -#ifndef HOTKEY_H - -/// DOCME -#define HOTKEY_H +#pragma once /////////// @@ -137,8 +134,3 @@ public: /////////////////// // Global instance extern HotkeyManager Hotkeys; - - -#endif - - diff --git a/aegisub/src/string_codec.h b/aegisub/src/string_codec.h index 0da51f67a..c0bb57a8f 100644 --- a/aegisub/src/string_codec.h +++ b/aegisub/src/string_codec.h @@ -54,10 +54,7 @@ /// /// The encoded string should be usable in any kind of field in an ASS file. -#ifndef _STRING_CODEC_H - -/// DOCME -#define _STRING_CODEC_H +#pragma once #ifndef AGI_PRE #include @@ -65,7 +62,3 @@ wxString inline_string_encode(const wxString &input); wxString inline_string_decode(const wxString &input); - -#endif - - diff --git a/aegisub/src/text_file_writer.h b/aegisub/src/text_file_writer.h index e7e8b6adf..723c38959 100644 --- a/aegisub/src/text_file_writer.h +++ b/aegisub/src/text_file_writer.h @@ -34,11 +34,8 @@ /// @ingroup utility /// +#pragma once -#ifndef TEXT_FILE_WRITER_H - -/// DOCME -#define TEXT_FILE_WRITER_H #ifndef AGI_PRE #include @@ -74,7 +71,3 @@ public: void WriteLineToFile(wxString line, bool addLineBreak=true); }; - -#endif - - diff --git a/aegisub/src/toggle_bitmap.h b/aegisub/src/toggle_bitmap.h index c303b2c59..de61c5f46 100644 --- a/aegisub/src/toggle_bitmap.h +++ b/aegisub/src/toggle_bitmap.h @@ -35,10 +35,7 @@ /// -#ifndef TOGGLE_BITMAP_H - -/// DOCME -#define TOGGLE_BITMAP_H +#pragma once /////////// @@ -74,8 +71,3 @@ public: DECLARE_EVENT_TABLE() }; - - -#endif - - diff --git a/aegisub/src/validators.h b/aegisub/src/validators.h index a4563d6f8..dd1fd87f6 100644 --- a/aegisub/src/validators.h +++ b/aegisub/src/validators.h @@ -35,10 +35,8 @@ /// -#ifndef VALIDATORS_H +#pragma once -/// DOCME -#define VALIDATORS_H /////////// // Headers @@ -85,8 +83,3 @@ public: DECLARE_EVENT_TABLE(); }; - - -#endif - - diff --git a/aegisub/src/video_provider_dummy.h b/aegisub/src/video_provider_dummy.h index d59582908..14f30ea01 100644 --- a/aegisub/src/video_provider_dummy.h +++ b/aegisub/src/video_provider_dummy.h @@ -36,10 +36,8 @@ // The dummy video provider needs a header, since it needs to be created directly as a special case -#ifndef _VIDEO_PROVIDER_DUMMY_H -/// DOCME -#define _VIDEO_PROVIDER_DUMMY_H +#pragma once /////////// @@ -122,7 +120,3 @@ public: wxString GetDecoderName(); }; - -#endif - -