From 33af24b609805fdc82a5a13c563764a5bd06a878 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Sat, 9 Feb 2019 09:15:31 +0000 Subject: Use '#pragma once' to avoid a lot of boilerplate --- libappstream-builder/appstream-builder.h | 6 +----- libappstream-builder/asb-app.h | 5 +---- libappstream-builder/asb-context-private.h | 7 +------ libappstream-builder/asb-context.h | 5 +---- libappstream-builder/asb-package-alpm.h | 5 +---- libappstream-builder/asb-package-cab.h | 5 +---- libappstream-builder/asb-package-deb.h | 5 +---- libappstream-builder/asb-package-rpm.h | 5 +---- libappstream-builder/asb-package.h | 5 +---- libappstream-builder/asb-plugin-loader.h | 5 +---- libappstream-builder/asb-plugin.h | 5 +---- libappstream-builder/asb-task.h | 5 +---- libappstream-builder/asb-utils.h | 5 +---- libappstream-glib/appstream-glib.h | 6 +----- libappstream-glib/as-agreement-private.h | 7 ++----- libappstream-glib/as-agreement-section-private.h | 7 ++----- libappstream-glib/as-agreement-section.h | 7 ++----- libappstream-glib/as-agreement.h | 7 ++----- libappstream-glib/as-app-builder.h | 7 ++----- libappstream-glib/as-app-private.h | 7 ++----- libappstream-glib/as-app.h | 7 ++----- libappstream-glib/as-bundle-private.h | 7 ++----- libappstream-glib/as-bundle.h | 7 ++----- libappstream-glib/as-checksum-private.h | 7 ++----- libappstream-glib/as-checksum.h | 7 ++----- libappstream-glib/as-content-rating-private.h | 7 ++----- libappstream-glib/as-content-rating.h | 7 ++----- libappstream-glib/as-enums.h | 7 ++----- libappstream-glib/as-format.h | 7 ++----- libappstream-glib/as-icon-private.h | 7 ++----- libappstream-glib/as-icon.h | 7 ++----- libappstream-glib/as-image-private.h | 7 ++----- libappstream-glib/as-image.h | 7 ++----- libappstream-glib/as-inf.h | 7 ++----- libappstream-glib/as-launchable-private.h | 7 ++----- libappstream-glib/as-launchable.h | 7 ++----- libappstream-glib/as-markup.h | 7 ++----- libappstream-glib/as-monitor.h | 7 ++----- libappstream-glib/as-node-private.h | 8 ++------ libappstream-glib/as-node.h | 8 ++------ libappstream-glib/as-problem.h | 7 ++----- libappstream-glib/as-profile.h | 5 +---- libappstream-glib/as-provide-private.h | 7 ++----- libappstream-glib/as-provide.h | 7 ++----- libappstream-glib/as-ref-string.h | 7 ++----- libappstream-glib/as-release-private.h | 7 ++----- libappstream-glib/as-release.h | 7 ++----- libappstream-glib/as-require-private.h | 7 ++----- libappstream-glib/as-require.h | 7 ++----- libappstream-glib/as-review-private.h | 7 ++----- libappstream-glib/as-review.h | 7 ++----- libappstream-glib/as-screenshot-private.h | 7 ++----- libappstream-glib/as-screenshot.h | 7 ++----- libappstream-glib/as-stemmer.h | 5 +---- libappstream-glib/as-store-cab.h | 7 ++----- libappstream-glib/as-store.h | 7 ++----- libappstream-glib/as-suggest-private.h | 7 ++----- libappstream-glib/as-suggest.h | 7 ++----- libappstream-glib/as-tag.h | 7 ++----- libappstream-glib/as-translation-private.h | 7 ++----- libappstream-glib/as-translation.h | 7 ++----- libappstream-glib/as-utils-private.h | 7 ++----- libappstream-glib/as-utils.h | 7 ++----- libappstream-glib/as-version.h.in | 7 ++----- libappstream-glib/as-yaml.h | 8 ++------ 65 files changed, 114 insertions(+), 316 deletions(-) diff --git a/libappstream-builder/appstream-builder.h b/libappstream-builder/appstream-builder.h index ecab52f..501614b 100644 --- a/libappstream-builder/appstream-builder.h +++ b/libappstream-builder/appstream-builder.h @@ -5,14 +5,10 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef __APPSTREAM_BUILDER_H -#define __APPSTREAM_BUILDER_H +#pragma once #define __APPSTREAM_BUILDER_H_INSIDE__ #include #undef __APPSTREAM_BUILDER_H_INSIDE__ - -#endif /* __APPSTREAM_BUILDER_H */ - diff --git a/libappstream-builder/asb-app.h b/libappstream-builder/asb-app.h index 7d134a5..39d423f 100644 --- a/libappstream-builder/asb-app.h +++ b/libappstream-builder/asb-app.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_APP_H -#define ASB_APP_H +#pragma once #include #include @@ -63,5 +62,3 @@ gboolean asb_app_save_resources (AsbApp *app, G_END_DECLS - -#endif /* ASB_APP_H */ diff --git a/libappstream-builder/asb-context-private.h b/libappstream-builder/asb-context-private.h index e580f71..3535028 100644 --- a/libappstream-builder/asb-context-private.h +++ b/libappstream-builder/asb-context-private.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_CONTEXT_INTERNAL_H -#define ASB_CONTEXT_INTERNAL_H +#pragma once #include "asb-context.h" #include "asb-plugin-loader.h" @@ -14,7 +13,3 @@ GPtrArray *asb_context_get_file_globs (AsbContext *ctx); GPtrArray *asb_context_get_packages (AsbContext *ctx); AsbPluginLoader *asb_context_get_plugin_loader (AsbContext *ctx); - -G_END_DECLS - -#endif /* GPLASB_CONTEXT_INTERNAL_H */ diff --git a/libappstream-builder/asb-context.h b/libappstream-builder/asb-context.h index e8316c9..1796f74 100644 --- a/libappstream-builder/asb-context.h +++ b/libappstream-builder/asb-context.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_CONTEXT_H -#define ASB_CONTEXT_H +#pragma once #include @@ -126,5 +125,3 @@ gboolean asb_context_find_in_cache (AsbContext *ctx, const gchar *filename); G_END_DECLS - -#endif /* ASB_CONTEXT_H */ diff --git a/libappstream-builder/asb-package-alpm.h b/libappstream-builder/asb-package-alpm.h index 604b7c8..55abf00 100644 --- a/libappstream-builder/asb-package-alpm.h +++ b/libappstream-builder/asb-package-alpm.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_PACKAGE_ALPM_H -#define ASB_PACKAGE_ALPM_H +#pragma once #include @@ -28,5 +27,3 @@ struct _AsbPackageAlpmClass AsbPackage *asb_package_alpm_new (void); G_END_DECLS - -#endif /* ASB_PACKAGE_ALPM_H */ diff --git a/libappstream-builder/asb-package-cab.h b/libappstream-builder/asb-package-cab.h index b0f8301..e495d66 100644 --- a/libappstream-builder/asb-package-cab.h +++ b/libappstream-builder/asb-package-cab.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_PACKAGE_CAB_H -#define ASB_PACKAGE_CAB_H +#pragma once #include @@ -28,5 +27,3 @@ struct _AsbPackageCabClass AsbPackage *asb_package_cab_new (void); G_END_DECLS - -#endif /* ASB_PACKAGE_CAB_H */ diff --git a/libappstream-builder/asb-package-deb.h b/libappstream-builder/asb-package-deb.h index 355a43b..b70b629 100644 --- a/libappstream-builder/asb-package-deb.h +++ b/libappstream-builder/asb-package-deb.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_PACKAGE_DEB_H -#define ASB_PACKAGE_DEB_H +#pragma once #include @@ -28,5 +27,3 @@ struct _AsbPackageDebClass AsbPackage *asb_package_deb_new (void); G_END_DECLS - -#endif /* ASB_PACKAGE_DEB_H */ diff --git a/libappstream-builder/asb-package-rpm.h b/libappstream-builder/asb-package-rpm.h index 98e8a8f..91d091f 100644 --- a/libappstream-builder/asb-package-rpm.h +++ b/libappstream-builder/asb-package-rpm.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_PACKAGE_RPM_H -#define ASB_PACKAGE_RPM_H +#pragma once #include @@ -28,5 +27,3 @@ struct _AsbPackageRpmClass AsbPackage *asb_package_rpm_new (void); G_END_DECLS - -#endif /* ASB_PACKAGE_RPM_H */ diff --git a/libappstream-builder/asb-package.h b/libappstream-builder/asb-package.h index 5ffb989..f7b803a 100644 --- a/libappstream-builder/asb-package.h +++ b/libappstream-builder/asb-package.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_PACKAGE_H -#define ASB_PACKAGE_H +#pragma once #include @@ -158,5 +157,3 @@ void asb_package_add_release (AsbPackage *pkg, AsbPackage *asb_package_new (void); G_END_DECLS - -#endif /* ASB_PACKAGE_H */ diff --git a/libappstream-builder/asb-plugin-loader.h b/libappstream-builder/asb-plugin-loader.h index 92d332f..74d954e 100644 --- a/libappstream-builder/asb-plugin-loader.h +++ b/libappstream-builder/asb-plugin-loader.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_PLUGIN_LOADER_H -#define ASB_PLUGIN_LOADER_H +#pragma once #include @@ -51,5 +50,3 @@ AsbPlugin *asb_plugin_loader_match_fn (AsbPluginLoader *plugin_loader, const gchar *filename); G_END_DECLS - -#endif /* ASB_PLUGIN_LOADER_H */ diff --git a/libappstream-builder/asb-plugin.h b/libappstream-builder/asb-plugin.h index 8d22e9c..bfbefa1 100644 --- a/libappstream-builder/asb-plugin.h +++ b/libappstream-builder/asb-plugin.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef __ASB_PLUGIN_H -#define __ASB_PLUGIN_H +#pragma once #include #include @@ -87,5 +86,3 @@ gboolean asb_plugin_match_glob (const gchar *glob, const gchar *value); G_END_DECLS - -#endif /* __ASB_PLUGIN_H */ diff --git a/libappstream-builder/asb-task.h b/libappstream-builder/asb-task.h index 257d342..37134f2 100644 --- a/libappstream-builder/asb-task.h +++ b/libappstream-builder/asb-task.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef ASB_TASK_H -#define ASB_TASK_H +#pragma once #include @@ -39,5 +38,3 @@ void asb_task_set_package (AsbTask *task, AsbPackage *pkg); G_END_DECLS - -#endif /* ASB_TASK_H */ diff --git a/libappstream-builder/asb-utils.h b/libappstream-builder/asb-utils.h index c4151dd..7e02777 100644 --- a/libappstream-builder/asb-utils.h +++ b/libappstream-builder/asb-utils.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef __ASB_UTILS_H -#define __ASB_UTILS_H +#pragma once #include #include @@ -42,5 +41,3 @@ const gchar *asb_glob_value_search (GPtrArray *array, GPtrArray *asb_glob_value_array_new (void); G_END_DECLS - -#endif /* __ASB_UTILS_H */ diff --git a/libappstream-glib/appstream-glib.h b/libappstream-glib/appstream-glib.h index c42b64c..d88b569 100644 --- a/libappstream-glib/appstream-glib.h +++ b/libappstream-glib/appstream-glib.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef __APPSTREAM_GLIB_H -#define __APPSTREAM_GLIB_H +#pragma once #define __APPSTREAM_GLIB_H_INSIDE__ @@ -36,6 +35,3 @@ #include #undef __APPSTREAM_GLIB_H_INSIDE__ - -#endif /* __APPSTREAM_GLIB_H */ - diff --git a/libappstream-glib/as-agreement-private.h b/libappstream-glib/as-agreement-private.h index e5df83d..ebefb66 100644 --- a/libappstream-glib/as-agreement-private.h +++ b/libappstream-glib/as-agreement-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_AGREEMENT_PRIVATE_H -#define __AS_AGREEMENT_PRIVATE_H - #include #include "as-agreement.h" @@ -28,5 +27,3 @@ gboolean as_agreement_node_parse (AsAgreement *agreement, GError **error); G_END_DECLS - -#endif /* __AS_AGREEMENT_PRIVATE_H */ diff --git a/libappstream-glib/as-agreement-section-private.h b/libappstream-glib/as-agreement-section-private.h index ec683a7..907531e 100644 --- a/libappstream-glib/as-agreement-section-private.h +++ b/libappstream-glib/as-agreement-section-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_AGREEMENT_SECTION_PRIVATE_H -#define __AS_AGREEMENT_SECTION_PRIVATE_H - #include #include "as-agreement-section.h" @@ -28,5 +27,3 @@ gboolean as_agreement_section_node_parse (AsAgreementSection *agreement_section GError **error); G_END_DECLS - -#endif /* __AS_AGREEMENT_SECTION_PRIVATE_H */ diff --git a/libappstream-glib/as-agreement-section.h b/libappstream-glib/as-agreement-section.h index 5971b59..cefc882 100644 --- a/libappstream-glib/as-agreement-section.h +++ b/libappstream-glib/as-agreement-section.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_AGREEMENT_SECTION_H -#define __AS_AGREEMENT_SECTION_H - #include G_BEGIN_DECLS @@ -50,5 +49,3 @@ void as_agreement_section_set_description (AsAgreementSection *agreement_secti const gchar *desc); G_END_DECLS - -#endif /* __AS_AGREEMENT_SECTION_H */ diff --git a/libappstream-glib/as-agreement.h b/libappstream-glib/as-agreement.h index 754ca3b..83a78b1 100644 --- a/libappstream-glib/as-agreement.h +++ b/libappstream-glib/as-agreement.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_AGREEMENT_H -#define __AS_AGREEMENT_H - #include #include "as-agreement-section.h" @@ -70,5 +69,3 @@ void as_agreement_add_section (AsAgreement *agreement, AsAgreementSection *agreement_section); G_END_DECLS - -#endif /* __AS_AGREEMENT_H */ diff --git a/libappstream-glib/as-app-builder.h b/libappstream-glib/as-app-builder.h index a7567dc..b8a2545 100644 --- a/libappstream-glib/as-app-builder.h +++ b/libappstream-glib/as-app-builder.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_APP_GETTEXT_H -#define __AS_APP_GETTEXT_H - #include #include @@ -49,5 +48,3 @@ gboolean as_app_builder_search_provides (AsApp *app, GError **error); G_END_DECLS - -#endif /* __AS_APP_GETTEXT_H */ diff --git a/libappstream-glib/as-app-private.h b/libappstream-glib/as-app-private.h index fa9bf22..a7fdabb 100644 --- a/libappstream-glib/as-app-private.h +++ b/libappstream-glib/as-app-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_APP_PRIVATE_H -#define __AS_APP_PRIVATE_H - #include #include "as-app.h" @@ -117,5 +116,3 @@ void as_app_set_origin_rstr (AsApp *app, AsRefString *rstr); G_END_DECLS - -#endif /* __AS_APP_PRIVATE_H */ diff --git a/libappstream-glib/as-app.h b/libappstream-glib/as-app.h index 9e7b537..5ede552 100644 --- a/libappstream-glib/as-app.h +++ b/libappstream-glib/as-app.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_APP_H -#define __AS_APP_H - #include #include "as-bundle.h" @@ -759,5 +758,3 @@ G_DEPRECATED_FOR(as_format_guess_kind); G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS - -#endif /* __AS_APP_H */ diff --git a/libappstream-glib/as-bundle-private.h b/libappstream-glib/as-bundle-private.h index 05543cc..075cd92 100644 --- a/libappstream-glib/as-bundle-private.h +++ b/libappstream-glib/as-bundle-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_BUNDLE_PRIVATE_H -#define __AS_BUNDLE_PRIVATE_H - #include "as-bundle.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_bundle_node_parse_dep11 (AsBundle *bundle, GError **error); G_END_DECLS - -#endif /* __AS_BUNDLE_PRIVATE_H */ diff --git a/libappstream-glib/as-bundle.h b/libappstream-glib/as-bundle.h index 2409b76..a8b5bca 100644 --- a/libappstream-glib/as-bundle.h +++ b/libappstream-glib/as-bundle.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_BUNDLE_H -#define __AS_BUNDLE_H - #include G_BEGIN_DECLS @@ -83,5 +82,3 @@ void as_bundle_set_kind (AsBundle *bundle, AsBundleKind kind); G_END_DECLS - -#endif /* __AS_BUNDLE_H */ diff --git a/libappstream-glib/as-checksum-private.h b/libappstream-glib/as-checksum-private.h index 324e50a..8cad315 100644 --- a/libappstream-glib/as-checksum-private.h +++ b/libappstream-glib/as-checksum-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_CHECKSUM_PRIVATE_H -#define __AS_CHECKSUM_PRIVATE_H - #include "as-checksum.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_checksum_node_parse_dep11 (AsChecksum *checksum, GError **error); G_END_DECLS - -#endif /* __AS_CHECKSUM_PRIVATE_H */ diff --git a/libappstream-glib/as-checksum.h b/libappstream-glib/as-checksum.h index bdc24dd..8ffe50b 100644 --- a/libappstream-glib/as-checksum.h +++ b/libappstream-glib/as-checksum.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_CHECKSUM_H -#define __AS_CHECKSUM_H - #include G_BEGIN_DECLS @@ -74,5 +73,3 @@ void as_checksum_set_target (AsChecksum *checksum, AsChecksumTarget target); G_END_DECLS - -#endif /* __AS_CHECKSUM_H */ diff --git a/libappstream-glib/as-content-rating-private.h b/libappstream-glib/as-content-rating-private.h index da95958..d14de43 100644 --- a/libappstream-glib/as-content-rating-private.h +++ b/libappstream-glib/as-content-rating-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_CONTENT_RATING_PRIVATE_H -#define __AS_CONTENT_RATING_PRIVATE_H - #include #include "as-content-rating.h" @@ -28,5 +27,3 @@ gboolean as_content_rating_node_parse (AsContentRating *content_rating, GError **error); G_END_DECLS - -#endif /* __AS_CONTENT_RATING_PRIVATE_H */ diff --git a/libappstream-glib/as-content-rating.h b/libappstream-glib/as-content-rating.h index ba30cea..e186e1a 100644 --- a/libappstream-glib/as-content-rating.h +++ b/libappstream-glib/as-content-rating.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_CONTENT_RATING_H -#define __AS_CONTENT_RATING_H - #include G_BEGIN_DECLS @@ -79,5 +78,3 @@ void as_content_rating_set_kind (AsContentRating *content_rating, const gchar *kind); G_END_DECLS - -#endif /* __AS_CONTENT_RATING_H */ diff --git a/libappstream-glib/as-enums.h b/libappstream-glib/as-enums.h index 2e1995c..4671551 100644 --- a/libappstream-glib/as-enums.h +++ b/libappstream-glib/as-enums.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_ENUMS_H -#define __AS_ENUMS_H - #include G_BEGIN_DECLS @@ -163,5 +162,3 @@ G_DEPRECATED_FOR(as_app_kind_from_string); G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS - -#endif /* __AS_ENUMS_H */ diff --git a/libappstream-glib/as-format.h b/libappstream-glib/as-format.h index a8670ca..cba782a 100644 --- a/libappstream-glib/as-format.h +++ b/libappstream-glib/as-format.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_FORMAT_H -#define __AS_FORMAT_H - #include G_BEGIN_DECLS @@ -73,5 +72,3 @@ void as_format_set_kind (AsFormat *format, AsFormatKind kind); G_END_DECLS - -#endif /* __AS_FORMAT_H */ diff --git a/libappstream-glib/as-icon-private.h b/libappstream-glib/as-icon-private.h index 9e19e26..c695b8a 100644 --- a/libappstream-glib/as-icon-private.h +++ b/libappstream-glib/as-icon-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_ICON_PRIVATE_H -#define __AS_ICON_PRIVATE_H - #include "as-icon.h" #include "as-node-private.h" @@ -37,5 +36,3 @@ void as_icon_set_prefix_rstr (AsIcon *icon, AsRefString *rstr); G_END_DECLS - -#endif /* __AS_ICON_PRIVATE_H */ diff --git a/libappstream-glib/as-icon.h b/libappstream-glib/as-icon.h index ba0c197..3103c13 100644 --- a/libappstream-glib/as-icon.h +++ b/libappstream-glib/as-icon.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_ICON_H -#define __AS_ICON_H - #include #include @@ -131,5 +130,3 @@ gboolean as_icon_convert_to_kind (AsIcon *icon, GError **error); G_END_DECLS - -#endif /* __AS_ICON_H */ diff --git a/libappstream-glib/as-image-private.h b/libappstream-glib/as-image-private.h index fa5ad2d..691830f 100644 --- a/libappstream-glib/as-image-private.h +++ b/libappstream-glib/as-image-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_IMAGE_PRIVATE_H -#define __AS_IMAGE_PRIVATE_H - #include "as-image.h" #include "as-node-private.h" @@ -32,5 +31,3 @@ void as_image_set_url_rstr (AsImage *image, AsRefString *rstr); G_END_DECLS - -#endif /* __AS_IMAGE_PRIVATE_H */ diff --git a/libappstream-glib/as-image.h b/libappstream-glib/as-image.h index f94c75d..1bbea4c 100644 --- a/libappstream-glib/as-image.h +++ b/libappstream-glib/as-image.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_IMAGE_H -#define __AS_IMAGE_H - #include #include @@ -174,5 +173,3 @@ gboolean as_image_equal (AsImage *image1, AsImage *image2); G_END_DECLS - -#endif /* __AS_IMAGE_H */ diff --git a/libappstream-glib/as-inf.h b/libappstream-glib/as-inf.h index 44aff50..87e5677 100644 --- a/libappstream-glib/as-inf.h +++ b/libappstream-glib/as-inf.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_INF_H -#define __AS_INF_H - #include G_BEGIN_DECLS @@ -67,5 +66,3 @@ gchar *as_inf_get_driver_version (GKeyFile *keyfile, G_DEPRECATED; G_END_DECLS - -#endif /* __AS_INF_H */ diff --git a/libappstream-glib/as-launchable-private.h b/libappstream-glib/as-launchable-private.h index 9b65a0c..4ac0220 100644 --- a/libappstream-glib/as-launchable-private.h +++ b/libappstream-glib/as-launchable-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_LAUNCHABLE_PRIVATE_H -#define __AS_LAUNCHABLE_PRIVATE_H - #include "as-launchable.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_launchable_node_parse_dep11 (AsLaunchable *launchable, GError **error); G_END_DECLS - -#endif /* __AS_LAUNCHABLE_PRIVATE_H */ diff --git a/libappstream-glib/as-launchable.h b/libappstream-glib/as-launchable.h index 7ff6941..1f5e8fc 100644 --- a/libappstream-glib/as-launchable.h +++ b/libappstream-glib/as-launchable.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_LAUNCHABLE_H -#define __AS_LAUNCHABLE_H - #include G_BEGIN_DECLS @@ -70,5 +69,3 @@ void as_launchable_set_kind (AsLaunchable *launchable, AsLaunchableKind kind); G_END_DECLS - -#endif /* __AS_LAUNCHABLE_H */ diff --git a/libappstream-glib/as-markup.h b/libappstream-glib/as-markup.h index 203375d..ee4787f 100644 --- a/libappstream-glib/as-markup.h +++ b/libappstream-glib/as-markup.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_MARKUP_H -#define __AS_MARKUP_H - #include G_BEGIN_DECLS @@ -68,5 +67,3 @@ gchar *as_markup_import (const gchar *text, GError **error); G_END_DECLS - -#endif /* __AS_MARKUP_H */ diff --git a/libappstream-glib/as-monitor.h b/libappstream-glib/as-monitor.h index 30c7129..fc9ea21 100644 --- a/libappstream-glib/as-monitor.h +++ b/libappstream-glib/as-monitor.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_MONITOR_H -#define __AS_MONITOR_H - #include #include @@ -66,5 +65,3 @@ gboolean as_monitor_add_file (AsMonitor *monitor, GError **error); G_END_DECLS - -#endif /* __AS_MONITOR_H */ diff --git a/libappstream-glib/as-node-private.h b/libappstream-glib/as-node-private.h index a15be13..ed25c8d 100644 --- a/libappstream-glib/as-node-private.h +++ b/libappstream-glib/as-node-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_NODE_PRIVATE_H -#define __AS_NODE_PRIVATE_H - #include "as-app.h" #include "as-node.h" #include "as-ref-string.h" @@ -57,6 +56,3 @@ AsRefString *as_node_get_attribute_as_refstr (const AsNode *node, G_DEFINE_AUTOPTR_CLEANUP_FUNC(AsNodeContext, as_node_context_free) G_END_DECLS - -#endif /* __AS_NODE_PRIVATE_H */ - diff --git a/libappstream-glib/as-node.h b/libappstream-glib/as-node.h index 6609947..0b58ad1 100644 --- a/libappstream-glib/as-node.h +++ b/libappstream-glib/as-node.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_NODE_H -#define __AS_NODE_H - #include #include #include @@ -194,6 +193,3 @@ void as_node_insert_hash (GNode *parent, G_DEFINE_AUTOPTR_CLEANUP_FUNC(AsNode, as_node_unref) G_END_DECLS - -#endif /* __AS_NODE_H */ - diff --git a/libappstream-glib/as-problem.h b/libappstream-glib/as-problem.h index 305f34e..4cb198a 100644 --- a/libappstream-glib/as-problem.h +++ b/libappstream-glib/as-problem.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_PROBLEM_H -#define __AS_PROBLEM_H - #include G_BEGIN_DECLS @@ -92,5 +91,3 @@ void as_problem_set_message (AsProblem *problem, const gchar *message); G_END_DECLS - -#endif /* __AS_PROBLEM_H */ diff --git a/libappstream-glib/as-profile.h b/libappstream-glib/as-profile.h index b82b72f..d6c93d9 100644 --- a/libappstream-glib/as-profile.h +++ b/libappstream-glib/as-profile.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef __AS_PROFILE_H -#define __AS_PROFILE_H +#pragma once #include @@ -44,5 +43,3 @@ void as_profile_task_free (AsProfileTask *ptask); G_DEFINE_AUTOPTR_CLEANUP_FUNC(AsProfileTask, as_profile_task_free) G_END_DECLS - -#endif /* __AS_PROFILE_H */ diff --git a/libappstream-glib/as-provide-private.h b/libappstream-glib/as-provide-private.h index a7872b8..ae90310 100644 --- a/libappstream-glib/as-provide-private.h +++ b/libappstream-glib/as-provide-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_PROVIDE_PRIVATE_H -#define __AS_PROVIDE_PRIVATE_H - #include "as-provide.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_provide_node_parse_dep11 (AsProvide *provide, GError **error); G_END_DECLS - -#endif /* __AS_PROVIDE_PRIVATE_H */ diff --git a/libappstream-glib/as-provide.h b/libappstream-glib/as-provide.h index 24a883a..f396931 100644 --- a/libappstream-glib/as-provide.h +++ b/libappstream-glib/as-provide.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_PROVIDE_H -#define __AS_PROVIDE_H - #include G_BEGIN_DECLS @@ -84,5 +83,3 @@ void as_provide_set_kind (AsProvide *provide, AsProvideKind kind); G_END_DECLS - -#endif /* __AS_PROVIDE_H */ diff --git a/libappstream-glib/as-ref-string.h b/libappstream-glib/as-ref-string.h index 414afd1..397d5e5 100644 --- a/libappstream-glib/as-ref-string.h +++ b/libappstream-glib/as-ref-string.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_REF_STRING_H -#define __AS_REF_STRING_H - #include G_BEGIN_DECLS @@ -57,5 +56,3 @@ AsRefString *as_ref_string_new_copy_with_length (const gchar *str, G_DEFINE_AUTOPTR_CLEANUP_FUNC(AsRefString, as_ref_string_unref) G_END_DECLS - -#endif /* __AS_REF_STRING_H */ diff --git a/libappstream-glib/as-release-private.h b/libappstream-glib/as-release-private.h index 7bd49df..a290142 100644 --- a/libappstream-glib/as-release-private.h +++ b/libappstream-glib/as-release-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_RELEASE_PRIVATE_H -#define __AS_RELEASE_PRIVATE_H - #include "as-release.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_release_node_parse_dep11 (AsRelease *release, GError **error); G_END_DECLS - -#endif /* __AS_RELEASE_PRIVATE_H */ diff --git a/libappstream-glib/as-release.h b/libappstream-glib/as-release.h index c6d1c30..87e10f3 100644 --- a/libappstream-glib/as-release.h +++ b/libappstream-glib/as-release.h @@ -6,13 +6,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_RELEASE_H -#define __AS_RELEASE_H - #include #include "as-checksum.h" @@ -133,5 +132,3 @@ void as_release_set_url (AsRelease *release, const gchar *url); G_END_DECLS - -#endif /* __AS_RELEASE_H */ diff --git a/libappstream-glib/as-require-private.h b/libappstream-glib/as-require-private.h index b03f379..2a5f119 100644 --- a/libappstream-glib/as-require-private.h +++ b/libappstream-glib/as-require-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_REQUIRE_PRIVATE_H -#define __AS_REQUIRE_PRIVATE_H - #include "as-require.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_require_node_parse_dep11 (AsRequire *require, GError **error); G_END_DECLS - -#endif /* __AS_REQUIRE_PRIVATE_H */ diff --git a/libappstream-glib/as-require.h b/libappstream-glib/as-require.h index f71f3ee..4cbd4bc 100644 --- a/libappstream-glib/as-require.h +++ b/libappstream-glib/as-require.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_REQUIRE_H -#define __AS_REQUIRE_H - #include G_BEGIN_DECLS @@ -117,5 +116,3 @@ gboolean as_require_equal (AsRequire *require1, AsRequire *require2); G_END_DECLS - -#endif /* __AS_REQUIRE_H */ diff --git a/libappstream-glib/as-review-private.h b/libappstream-glib/as-review-private.h index 144bada..ea71121 100644 --- a/libappstream-glib/as-review-private.h +++ b/libappstream-glib/as-review-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_REVIEW_PRIVATE_H -#define __AS_REVIEW_PRIVATE_H - #include "as-review.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_review_node_parse_dep11 (AsReview *review, GError **error); G_END_DECLS - -#endif /* __AS_REVIEW_PRIVATE_H */ diff --git a/libappstream-glib/as-review.h b/libappstream-glib/as-review.h index df14d4f..991ca94 100644 --- a/libappstream-glib/as-review.h +++ b/libappstream-glib/as-review.h @@ -6,13 +6,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_REVIEW_H -#define __AS_REVIEW_H - #include G_BEGIN_DECLS @@ -103,5 +102,3 @@ gboolean as_review_equal (AsReview *review1, AsReview *review2); G_END_DECLS - -#endif /* __AS_REVIEW_H */ diff --git a/libappstream-glib/as-screenshot-private.h b/libappstream-glib/as-screenshot-private.h index ff6fd62..8f84893 100644 --- a/libappstream-glib/as-screenshot-private.h +++ b/libappstream-glib/as-screenshot-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_SCREENSHOT_PRIVATE_H -#define __AS_SCREENSHOT_PRIVATE_H - #include #include "as-screenshot.h" @@ -32,5 +31,3 @@ gboolean as_screenshot_node_parse_dep11 (AsScreenshot *screenshot, GError **error); G_END_DECLS - -#endif /* __AS_SCREENSHOT_PRIVATE_H */ diff --git a/libappstream-glib/as-screenshot.h b/libappstream-glib/as-screenshot.h index 4942aab..61ae9ff 100644 --- a/libappstream-glib/as-screenshot.h +++ b/libappstream-glib/as-screenshot.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_SCREENSHOT_H -#define __AS_SCREENSHOT_H - #include #include "as-image.h" @@ -88,5 +87,3 @@ gboolean as_screenshot_equal (AsScreenshot *screenshot1, AsScreenshot *screenshot2); G_END_DECLS - -#endif /* __AS_SCREENSHOT_H */ diff --git a/libappstream-glib/as-stemmer.h b/libappstream-glib/as-stemmer.h index 480640a..e03b446 100644 --- a/libappstream-glib/as-stemmer.h +++ b/libappstream-glib/as-stemmer.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: LGPL-2.1+ */ -#ifndef __AS_STEMMER_H -#define __AS_STEMMER_H +#pragma once #include @@ -23,5 +22,3 @@ AsRefString *as_stemmer_process (AsStemmer *stemmer, const gchar *value); G_END_DECLS - -#endif /* __AS_STEMMER_H */ diff --git a/libappstream-glib/as-store-cab.h b/libappstream-glib/as-store-cab.h index 6139071..2059678 100644 --- a/libappstream-glib/as-store-cab.h +++ b/libappstream-glib/as-store-cab.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_STORE_CAB_H -#define __AS_STORE_CAB_H - #include #include @@ -29,5 +28,3 @@ gboolean as_store_cab_from_bytes (AsStore *store, GError **error); G_END_DECLS - -#endif /* __AS_STORE_CAB_H */ diff --git a/libappstream-glib/as-store.h b/libappstream-glib/as-store.h index 0bb1947..1eb1acf 100644 --- a/libappstream-glib/as-store.h +++ b/libappstream-glib/as-store.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_STORE_H -#define __AS_STORE_H - #include #include @@ -276,5 +275,3 @@ void as_store_remove_filter (AsStore *store, AsAppKind kind); G_END_DECLS - -#endif /* __AS_STORE_H */ diff --git a/libappstream-glib/as-suggest-private.h b/libappstream-glib/as-suggest-private.h index f110709..4796176 100644 --- a/libappstream-glib/as-suggest-private.h +++ b/libappstream-glib/as-suggest-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_SUGGEST_PRIVATE_H -#define __AS_SUGGEST_PRIVATE_H - #include "as-suggest.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_suggest_node_parse_dep11 (AsSuggest *suggest, GError **error); G_END_DECLS - -#endif /* __AS_SUGGEST_PRIVATE_H */ diff --git a/libappstream-glib/as-suggest.h b/libappstream-glib/as-suggest.h index 0e669bc..946f23f 100644 --- a/libappstream-glib/as-suggest.h +++ b/libappstream-glib/as-suggest.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_SUGGEST_H -#define __AS_SUGGEST_H - #include G_BEGIN_DECLS @@ -66,5 +65,3 @@ void as_suggest_add_id (AsSuggest *suggest, const gchar *id); G_END_DECLS - -#endif /* __AS_SUGGEST_H */ diff --git a/libappstream-glib/as-tag.h b/libappstream-glib/as-tag.h index b5488f1..16b8cf2 100644 --- a/libappstream-glib/as-tag.h +++ b/libappstream-glib/as-tag.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_TAG_H -#define __AS_TAG_H - #include G_BEGIN_DECLS @@ -181,5 +180,3 @@ AsTag as_tag_from_string_full (const gchar *tag, const gchar *as_tag_to_string (AsTag tag); G_END_DECLS - -#endif /* __AS_TAG_H */ diff --git a/libappstream-glib/as-translation-private.h b/libappstream-glib/as-translation-private.h index 131b066..51aa056 100644 --- a/libappstream-glib/as-translation-private.h +++ b/libappstream-glib/as-translation-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_TRANSLATION_PRIVATE_H -#define __AS_TRANSLATION_PRIVATE_H - #include "as-translation.h" #include "as-node-private.h" @@ -30,5 +29,3 @@ gboolean as_translation_node_parse_dep11 (AsTranslation *translation, GError **error); G_END_DECLS - -#endif /* __AS_TRANSLATION_PRIVATE_H */ diff --git a/libappstream-glib/as-translation.h b/libappstream-glib/as-translation.h index 4be5297..4fb5c80 100644 --- a/libappstream-glib/as-translation.h +++ b/libappstream-glib/as-translation.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_TRANSLATION_H -#define __AS_TRANSLATION_H - #include G_BEGIN_DECLS @@ -66,5 +65,3 @@ void as_translation_set_kind (AsTranslation *translation, AsTranslationKind kind); G_END_DECLS - -#endif /* __AS_TRANSLATION_H */ diff --git a/libappstream-glib/as-utils-private.h b/libappstream-glib/as-utils-private.h index 83e427e..5c4a7f8 100644 --- a/libappstream-glib/as-utils-private.h +++ b/libappstream-glib/as-utils-private.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_PRIVATE_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_UTILS_PRIVATE_H -#define __AS_UTILS_PRIVATE_H - #include #include "as-utils.h" @@ -35,5 +34,3 @@ gboolean as_utils_locale_is_compatible (const gchar *locale1, GDateTime *as_utils_iso8601_to_datetime (const gchar *iso_date); G_END_DECLS - -#endif /* __AS_UTILS_PRIVATE_H */ diff --git a/libappstream-glib/as-utils.h b/libappstream-glib/as-utils.h index a72162c..732d33f 100644 --- a/libappstream-glib/as-utils.h +++ b/libappstream-glib/as-utils.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_UTILS_H -#define __AS_UTILS_H - #include #include "as-app.h" @@ -182,5 +181,3 @@ gchar *as_utils_appstream_id_build (const gchar *str); gboolean as_utils_appstream_id_valid (const gchar *str); G_END_DECLS - -#endif /* __AS_UTILS_H */ diff --git a/libappstream-glib/as-version.h.in b/libappstream-glib/as-version.h.in index 6cc6bde..f1e2d8e 100644 --- a/libappstream-glib/as-version.h.in +++ b/libappstream-glib/as-version.h.in @@ -5,6 +5,8 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + /** * SECTION:as-version * @short_description: Preprocessor macros for the libappstream-glib version @@ -19,9 +21,6 @@ #error "Only can be included directly." #endif -#ifndef __AS_VERSION_H -#define __AS_VERSION_H - #include /* compile time version @@ -40,5 +39,3 @@ AS_MICRO_VERSION >= (micro))) const gchar *as_version_string (void); - -#endif /* __AS_VERSION_H */ diff --git a/libappstream-glib/as-yaml.h b/libappstream-glib/as-yaml.h index 735d8a2..b6a1886 100644 --- a/libappstream-glib/as-yaml.h +++ b/libappstream-glib/as-yaml.h @@ -5,13 +5,12 @@ * SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + #if !defined (__APPSTREAM_GLIB_H) && !defined (AS_COMPILATION) #error "Only can be included directly." #endif -#ifndef __AS_YAML_H -#define __AS_YAML_H - #include #include @@ -52,6 +51,3 @@ guint as_yaml_node_get_value_as_uint (const AsYaml *node); G_DEFINE_AUTOPTR_CLEANUP_FUNC(AsYaml, as_yaml_unref) G_END_DECLS - -#endif /* __AS_YAML_H */ - -- cgit v1.2.1