Commit 4de226ea authored by Christian Hergert's avatar Christian Hergert

style-guide: use #pragma once header guards

This changes most of the code base to using #pragma once instead
of the old style #ifndef FOO_H header guards. I hear that the
old style is still slightly faster, but I don't care much about
that. I'm sure GCC will continue to optimize for this going
forward.

Also, we're already using a bunch of other C11 features, so
might as well use this too.
parent ee246d67
......@@ -16,13 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BUG_BUDDY_H
#define BUG_BUDDY_H
#pragma once
G_BEGIN_DECLS
void bug_buddy_init (void);
G_END_DECLS
#endif /* BUG_BUDDY_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_ACTIONS_H
#define IDE_APPLICATION_ACTIONS_H
#pragma once
#include "ide-application.h"
......@@ -27,5 +26,3 @@ void ide_application_actions_init (IdeApplication *self);
void ide_application_actions_update (IdeApplication *self);
G_END_DECLS
#endif /* IDE_APPLICATION_ACTIONS_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_ADDIN_H
#define IDE_APPLICATION_ADDIN_H
#pragma once
#include "ide-application.h"
......@@ -43,5 +42,3 @@ void ide_application_addin_unload (IdeApplicationAddin *self,
IdeApplication *application);
G_END_DECLS
#endif /* IDE_APPLICATION_ADDIN_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_CREDITS_H
#define IDE_APPLICATION_CREDITS_H
#pragma once
#include <glib.h>
......@@ -596,5 +595,3 @@ static const gchar *ide_application_credits_funders[] = {
};
G_END_DECLS
#endif /* IDE_APPLICATION_CREDITS_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_PRIVATE_H
#define IDE_APPLICATION_PRIVATE_H
#pragma once
#include <dazzle.h>
#include <gio/gio.h>
......@@ -85,5 +84,3 @@ void _ide_application_set_mode (IdeApplication *self
IdeApplicationMode mode);
G_END_DECLS
#endif /* IDE_APPLICATION_PRIVATE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_TESTS_H
#define IDE_APPLICATION_TESTS_H
#pragma once
#include "ide-application.h"
......@@ -36,5 +35,3 @@ void ide_application_add_test (IdeApplication *self,
const gchar * const *required_plugins);
G_END_DECLS
#endif /* IDE_APPLICATION_TESTS_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_TOOL_H
#define IDE_APPLICATION_TOOL_H
#pragma once
#include <gio/gio.h>
......@@ -51,5 +50,3 @@ gint ide_application_tool_run_finish (IdeApplicationTool *self,
GError **error);
G_END_DECLS
#endif /* IDE_APPLICATION_TOOL_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_APPLICATION_H
#define IDE_APPLICATION_H
#pragma once
#include <dazzle.h>
#include <gtk/gtk.h>
......@@ -61,5 +60,3 @@ void ide_application_add_reaper (IdeApplication *
DzlDirectoryReaper *reaper);
G_END_DECLS
#endif /* IDE_APPLICATION_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUFFER_CHANGE_MONITOR_H
#define IDE_BUFFER_CHANGE_MONITOR_H
#pragma once
#include <gtk/gtk.h>
......@@ -63,5 +62,3 @@ void ide_buffer_change_monitor_emit_changed (IdeBufferChangeMonit
void ide_buffer_change_monitor_reload (IdeBufferChangeMonitor *self);
G_END_DECLS
#endif /* IDE_BUFFER_CHANGE_MONITOR_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUFFER_MANAGER_H
#define IDE_BUFFER_MANAGER_H
#pragma once
#include <gtk/gtk.h>
#include <gtksourceview/gtksource.h>
......@@ -86,5 +85,3 @@ gboolean ide_buffer_manager_apply_edits_finish (IdeBufferManag
GError **error);
G_END_DECLS
#endif /* IDE_BUFFER_MANAGER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUFFER_H
#define IDE_BUFFER_H
#pragma once
#include <gtksourceview/gtksource.h>
......@@ -124,5 +123,3 @@ gchar *ide_buffer_get_word_at_iter (IdeBuffer
void ide_buffer_sync_to_unsaved_files (IdeBuffer *self);
G_END_DECLS
#endif /* IDE_BUFFER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_UNSAVED_FILE_H
#define IDE_UNSAVED_FILE_H
#pragma once
#include <gio/gio.h>
......@@ -43,5 +42,3 @@ IdeUnsavedFile *_ide_unsaved_file_new (GFile *file,
G_DEFINE_AUTOPTR_CLEANUP_FUNC (IdeUnsavedFile, ide_unsaved_file_unref)
G_END_DECLS
#endif /* IDE_UNSAVED_FILE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_UNSAVED_FILES_H
#define IDE_UNSAVED_FILES_H
#pragma once
#include "ide-object.h"
......@@ -60,5 +59,3 @@ gboolean ide_unsaved_files_contains (IdeUnsavedFiles *self,
GFile *file);
G_END_DECLS
#endif /* IDE_UNSAVED_FILES_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILDCONFIG_CONFIGURATION_PROVIDER_H
#define IDE_BUILDCONFIG_CONFIGURATION_PROVIDER_H
#pragma once
#include <glib.h>
......@@ -35,5 +34,3 @@ void ide_buildconfig_configuration_provider_track_config (IdeBuildconfigConfigur
IdeBuildconfigConfiguration *config);
G_END_DECLS
#endif /* IDE_BUILDCONFIG_CONFIGURATION_PROVIDER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILDCONFIG_CONFIGURATION_H
#define IDE_BUILDCONFIG_CONFIGURATION_H
#pragma once
#include "buildsystem/ide-configuration.h"
......@@ -35,5 +34,3 @@ void ide_buildconfig_configuration_set_postbuild (IdeBuildconfig
const gchar * const *postbuild);
G_END_DECLS
#endif /* IDE_BUILDCONFIG_CONFIGURATION_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILDCONFIG_PIPELINE_ADDIN_H
#define IDE_BUILDCONFIG_PIPELINE_ADDIN_H
#pragma once
#include "buildsystem/ide-build-pipeline-addin.h"
......@@ -28,5 +27,3 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (IdeBuildconfigPipelineAddin, ide_buildconfig_pipeline_addin, IDE, BUILDCONFIG_PIPELINE_ADDIN, IdeObject)
G_END_DECLS
#endif /* IDE_BUILDCONFIG_PIPELINE_ADDIN_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_LOG_PRIVATE_H
#define IDE_BUILD_LOG_PRIVATE_H
#pragma once
#include <gio/gio.h>
......@@ -43,5 +42,3 @@ gboolean ide_build_log_remove_observer (IdeBuildLog *self,
G_END_DECLS
#endif /* IDE_BUILD_LOG_PRIVATE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_LOG_H
#define IDE_BUILD_LOG_H
#pragma once
#include <glib.h>
......@@ -35,5 +34,3 @@ typedef void (*IdeBuildLogObserver) (IdeBuildLogStream log_stream,
gpointer user_data);
G_END_DECLS
#endif /* IDE_BUILD_LOG_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_MANAGER_H
#define IDE_BUILD_MANAGER_H
#pragma once
#include <gio/gio.h>
......@@ -64,5 +63,3 @@ gboolean ide_build_manager_clean_finish (IdeBuildManager *
GError **error);
G_END_DECLS
#endif /* IDE_BUILD_MANAGER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_PIPELINE_ADDIN_H
#define IDE_BUILD_PIPELINE_ADDIN_H
#pragma once
#include <gio/gio.h>
......@@ -47,5 +46,3 @@ void ide_build_pipeline_addin_track (IdeBuildPipelineAddin *self,
guint stage_id);
G_END_DECLS
#endif /* IDE_BUILD_PIPELINE_ADDIN_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_PIPELINE_H
#define IDE_BUILD_PIPELINE_H
#pragma once
#include <gio/gio.h>
......@@ -126,5 +125,3 @@ gboolean ide_build_pipeline_rebuild_finish (IdeBuildPipeline
GError **error);
G_END_DECLS
#endif /* IDE_BUILD_PIPELINE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_STAGE_LAUNCHER_H
#define IDE_BUILD_STAGE_LAUNCHER_H
#pragma once
#include <gio/gio.h>
......@@ -55,5 +54,3 @@ void ide_build_stage_launcher_set_ignore_exit_status (IdeBuild
gboolean ignore_exit_status);
G_END_DECLS
#endif /* IDE_BUILD_STAGE_LAUNCHER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_STAGE_MKDIRS_H
#define IDE_BUILD_STAGE_MKDIRS_H
#pragma once
#include "ide-build-stage.h"
......@@ -45,5 +44,3 @@ void ide_build_stage_mkdirs_add_path (IdeBuildStageMkdirs *self,
gboolean remove_on_rebuild);
G_END_DECLS
#endif /* IDE_BUILD_STAGE_MKDIRS_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_STAGE_PRIVATE_H
#define IDE_BUILD_STAGE_PRIVATE_H
#pragma once
#include "ide-build-pipeline.h"
#include "ide-build-stage.h"
......@@ -35,5 +34,3 @@ gboolean _ide_build_stage_execute_with_query_finish (IdeBuildStage *self,
GError **error);
G_END_DECLS
#endif /* IDE_BUILD_STAGE_PRIVATE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_STAGE_TRANSFER_H
#define IDE_BUILD_STAGE_TRANSFER_H
#pragma once
#include "buildsystem/ide-build-stage.h"
......@@ -31,5 +30,3 @@ IdeBuildStageTransfer *ide_build_stage_transfer_new (IdeContext *context,
IdeTransfer *transfer);
G_END_DECLS
#endif /* IDE_BUILD_STAGE_TRANSFER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_STAGE_H
#define IDE_BUILD_STAGE_H
#pragma once
#include <dazzle.h>
#include <gio/gio.h>
......@@ -222,6 +221,3 @@ void ide_build_stage_emit_reap (IdeBuildStage *self,
DzlDirectoryReaper *reaper);
G_END_DECLS
#endif /* IDE_BUILD_STAGE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_SYSTEM_DISCOVERY_H
#define IDE_BUILD_SYSTEM_DISCOVERY_H
#pragma once
#include <gio/gio.h>
......@@ -47,5 +46,3 @@ gchar *ide_build_system_discovery_discover (IdeBuildSystemDiscovery *self,
GError **error);
G_END_DECLS
#endif /* IDE_BUILD_SYSTEM_DISCOVERY_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_SYSTEM_H
#define IDE_BUILD_SYSTEM_H
#pragma once
#include <gio/gio.h>
......@@ -103,5 +102,3 @@ void _ide_build_system_set_project_file (IdeBuildSyst
GFile *project_file) G_GNUC_INTERNAL;
G_END_DECLS
#endif /* IDE_BUILD_SYSTEM_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_TARGET_H
#define IDE_BUILD_TARGET_H
#pragma once
#include <glib-object.h>
......@@ -49,5 +48,3 @@ GFile *ide_build_target_get_install_directory (IdeBuildTarget *self);
gchar *ide_build_target_get_name (IdeBuildTarget *self);
G_END_DECLS
#endif /* IDE_BUILD_TARGET_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_UTILS_H
#define IDE_BUILD_UTILS_H
#pragma once
#include <glib.h>
......@@ -26,5 +25,3 @@ G_BEGIN_DECLS
gchar *ide_build_utils_color_codes_filtering (const gchar *txt);
G_END_DECLS
#endif /* IDE_BUILD_UTILS_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_CONFIGURATION_MANAGER_H
#define IDE_CONFIGURATION_MANAGER_H
#pragma once
#include <gio/gio.h>
......@@ -48,5 +47,3 @@ gboolean ide_configuration_manager_save_finish (IdeConfigurationM
GError **error);
G_END_DECLS
#endif /* IDE_CONFIGURATION_MANAGER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_CONFIGURATION_PROVIDER_H
#define IDE_CONFIGURATION_PROVIDER_H
#pragma once
#include <gio/gio.h>
......@@ -71,5 +70,3 @@ gboolean ide_configuration_provider_save_finish (IdeConfigurationProvider *self
GError **error);
G_END_DECLS
#endif /* IDE_CONFIGURATION_PROVIDER_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_CONFIGURATION_H
#define IDE_CONFIGURATION_H
#pragma once
#include <gio/gio.h>
......@@ -165,5 +164,3 @@ void _ide_configuration_set_postbuild (IdeConfigurat
IdeBuildCommandQueue *postbuild) G_GNUC_INTERNAL;
G_END_DECLS
#endif /* IDE_CONFIGURATION_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_ENVIRONMENT_VARIABLE_H
#define IDE_ENVIRONMENT_VARIABLE_H
#pragma once
#include <glib-object.h>
......@@ -37,5 +36,3 @@ void ide_environment_variable_set_value (IdeEnvironmentVariab
const gchar *value);
G_END_DECLS
#endif /* IDE_ENVIRONMENT_VARIABLE_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_ENVIRONMENT_H
#define IDE_ENVIRONMENT_H
#pragma once
#include <gio/gio.h>
......@@ -46,5 +45,3 @@ void ide_environment_copy_into (IdeEnvironment *self,
gboolean replace);
G_END_DECLS
#endif /* IDE_ENVIRONMENT_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_CONFIGURATION_ROW_H
#define IDE_BUILD_CONFIGURATION_ROW_H
#pragma once
#include <gtk/gtk.h>
#include <ide.h>
......@@ -32,5 +31,3 @@ GtkWidget *ide_build_configuration_row_new (IdeConfiguratio
IdeConfiguration *ide_build_configuration_row_get_configuration (IdeBuildConfigurationRow *self);
G_END_DECLS
#endif /* IDE_BUILD_CONFIGURATION_ROW_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_CONFIGURATION_VIEW_H
#define IDE_BUILD_CONFIGURATION_VIEW_H
#pragma once
#include <ide.h>
#include <dazzle.h>
......@@ -33,5 +32,3 @@ void ide_build_configuration_view_set_configuration (IdeBuildConfig
IdeConfiguration *configuration);
G_END_DECLS
#endif /* IDE_BUILD_CONFIGURATION_VIEW_H */
......@@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_LOG_PANEL_H
#define IDE_BUILD_LOG_PANEL_H
#pragma once
#include <ide.h>
......@@ -31,5 +30,3 @@ void ide_build_log_panel_set_pipeline (IdeBuildLogPanel *self,
IdeBuildPipeline *pipeline);
G_END_DECLS