From 572b160ff9f624d282dee8e39c86a10f569cec17 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 13 Jul 2025 12:54:21 +0200 Subject: [PATCH] tools, modules: #pragma once --- modules/gimpcolorwheel.h | 5 +---- modules/gimpinputdevicestore.h | 6 +----- tools/generate-welcome-dialog-data.py | 4 +--- tools/kernelgen.c | 7 ++----- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/modules/gimpcolorwheel.h b/modules/gimpcolorwheel.h index b5ebece36d..7220d81e2f 100644 --- a/modules/gimpcolorwheel.h +++ b/modules/gimpcolorwheel.h @@ -27,8 +27,7 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ -#ifndef __GIMP_COLOR_WHEEL_H__ -#define __GIMP_COLOR_WHEEL_H__ +#pragma once G_BEGIN_DECLS @@ -93,5 +92,3 @@ void gimp_color_wheel_set_color_config (GimpColorWheel *wheel, gboolean gimp_color_wheel_is_adjusting (GimpColorWheel *wheel); G_END_DECLS - -#endif /* __GIMP_COLOR_WHEEL_H__ */ diff --git a/modules/gimpinputdevicestore.h b/modules/gimpinputdevicestore.h index a02d453c07..905406aeb8 100644 --- a/modules/gimpinputdevicestore.h +++ b/modules/gimpinputdevicestore.h @@ -18,8 +18,7 @@ * along with this program. If not, see . */ -#ifndef __GIMP_INPUT_DEVICE_STORE_H__ -#define __GIMP_INPUT_DEVICE_STORE_H__ +#pragma once #define GIMP_TYPE_INPUT_DEVICE_STORE (gimp_input_device_store_get_type ()) @@ -37,6 +36,3 @@ GimpInputDeviceStore * gimp_input_device_store_new (void); gchar * gimp_input_device_store_get_device_file (GimpInputDeviceStore *store, const gchar *udi); GError * gimp_input_device_store_get_error (GimpInputDeviceStore *store); - - -#endif /* __GIMP_INPUT_DEVICE_STORE_H__ */ diff --git a/tools/generate-welcome-dialog-data.py b/tools/generate-welcome-dialog-data.py index 22d8a3f96f..db8e05feb1 100755 --- a/tools/generate-welcome-dialog-data.py +++ b/tools/generate-welcome-dialog-data.py @@ -115,8 +115,7 @@ if __name__ == "__main__": intro_p, items, demos = parse_appdata(infile, args.version) if args.header: - print('#ifndef __WELCOME_DIALOG_DATA_H__') - print('#define __WELCOME_DIALOG_DATA_H__\n\n') + print('#pragma once\n\n') print('extern gint gimp_welcome_dialog_n_items;') print('extern const gchar * gimp_welcome_dialog_items[];') @@ -125,7 +124,6 @@ if __name__ == "__main__": print('extern gint gimp_welcome_dialog_intro_n_paragraphs;') print('extern const gchar * gimp_welcome_dialog_intro[];') - print('\n\n#endif /* __WELCOME_DIALOG_DATA_H__ */') else: print('#include "config.h"') print('#include ') diff --git a/tools/kernelgen.c b/tools/kernelgen.c index e2d8ef068a..c03971462c 100644 --- a/tools/kernelgen.c +++ b/tools/kernelgen.c @@ -91,8 +91,7 @@ main (int argc, " * This file was generated using kernelgen as found in the tools dir.\n"); printf (" * (threshold = %g)\n", THRESHOLD); printf (" */\n\n"); - printf ("#ifndef __GIMP_BRUSH_CORE_KERNELS_H__\n"); - printf ("#define __GIMP_BRUSH_CORE_KERNELS_H__\n\n"); + printf ("#pragma once\n\n"); printf ("#define KERNEL_WIDTH %d\n", KERNEL_WIDTH); printf ("#define KERNEL_HEIGHT %d\n", KERNEL_HEIGHT); printf ("#define KERNEL_SUBSAMPLE %d\n", SUBSAMPLE); @@ -120,9 +119,7 @@ main (int argc, printf (" }%s", j < SUBSAMPLE ? ",\n" : "\n"); } - printf ("};\n\n"); - - printf ("#endif /* __GIMP_BRUSH_CORE_KERNELS_H__ */\n"); + printf ("};\n"); return 0; }