From fe520925b73024b7d94c32a098a1850d9d5f2f73 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 3 Nov 2008 21:38:13 +0000 Subject: [PATCH] app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am 2008-11-03 Sven Neumann * app/base/Makefile.am * app/core/Makefile.am * app/display/Makefile.am * app/paint/Makefile.am * app/plug-in/Makefile.am * app/text/Makefile.am * app/tools/Makefile.am * app/widgets/Makefile.am * libgimp/Makefile.am * libgimpbase/Makefile.am: * libgimpconfig/Makefile.am * libgimpthumb/Makefile.am * libgimpwidgets/Makefile.am: micro-optimization in the generated enum registration code. * app/base/base-enums.c * app/core/core-enums.c * app/display/display-enums.c * app/paint/paint-enums.c * app/plug-in/plug-in-enums.c * app/text/text-enums.c * app/tools/tools-enums.c * app/widgets/widgets-enums.c * libgimpbase/gimpbaseenums.c * libgimpconfig/gimpcolorconfig-enums.c * libgimpwidgets/gimpwidgetsenums.c: regenerated. svn path=/trunk/; revision=27538 --- ChangeLog | 30 +++++++++++ app/base/Makefile.am | 2 +- app/base/base-enums.c | 8 +-- app/core/Makefile.am | 2 +- app/core/core-enums.c | 66 ++++++++++++------------ app/display/Makefile.am | 2 +- app/display/display-enums.c | 12 ++--- app/paint/Makefile.am | 2 +- app/paint/paint-enums.c | 10 ++-- app/plug-in/Makefile.am | 2 +- app/plug-in/plug-in-enums.c | 4 +- app/text/Makefile.am | 2 +- app/text/text-enums.c | 4 +- app/tools/Makefile.am | 2 +- app/tools/tools-enums.c | 20 ++++---- app/widgets/Makefile.am | 2 +- app/widgets/widgets-enums.c | 20 ++++---- libgimp/Makefile.am | 2 +- libgimpbase/Makefile.am | 2 +- libgimpbase/gimpbaseenums.c | 72 +++++++++++++-------------- libgimpconfig/Makefile.am | 2 +- libgimpconfig/gimpcolorconfig-enums.c | 4 +- libgimpthumb/Makefile.am | 2 +- libgimpwidgets/Makefile.am | 2 +- libgimpwidgets/gimpwidgetsenums.c | 14 +++--- 25 files changed, 160 insertions(+), 130 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4882248681..006e95c3d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2008-11-03 Sven Neumann + + + * app/base/Makefile.am + * app/core/Makefile.am + * app/display/Makefile.am + * app/paint/Makefile.am + * app/plug-in/Makefile.am + * app/text/Makefile.am + * app/tools/Makefile.am + * app/widgets/Makefile.am + * libgimp/Makefile.am + * libgimpbase/Makefile.am: + * libgimpconfig/Makefile.am + * libgimpthumb/Makefile.am + * libgimpwidgets/Makefile.am: micro-optimization in the generated + enum registration code. + + * app/base/base-enums.c + * app/core/core-enums.c + * app/display/display-enums.c + * app/paint/paint-enums.c + * app/plug-in/plug-in-enums.c + * app/text/text-enums.c + * app/tools/tools-enums.c + * app/widgets/widgets-enums.c + * libgimpbase/gimpbaseenums.c + * libgimpconfig/gimpcolorconfig-enums.c + * libgimpwidgets/gimpwidgetsenums.c: regenerated. + 2008-11-03 Michael Natterer * app/core/gimp-edit.c diff --git a/app/base/Makefile.am b/app/base/Makefile.am index 8283ae6c51..cc7ad63547 100644 --- a/app/base/Makefile.am +++ b/app/base/Makefile.am @@ -92,7 +92,7 @@ base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/base-enums.h > xgen-bec \ && cp xgen-bec $(@F) \ && rm -f xgen-bec diff --git a/app/base/base-enums.c b/app/base/base-enums.c index c98a1b45d8..9c6f170500 100644 --- a/app/base/base-enums.c +++ b/app/base/base-enums.c @@ -27,7 +27,7 @@ gimp_curve_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCurveType", values); gimp_enum_set_value_descriptions (type, descs); @@ -63,7 +63,7 @@ gimp_histogram_channel_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpHistogramChannel", values); gimp_enum_set_value_descriptions (type, descs); @@ -139,7 +139,7 @@ gimp_layer_mode_effects_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpLayerModeEffects", values); gimp_enum_set_value_descriptions (type, descs); @@ -177,7 +177,7 @@ gimp_hue_range_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpHueRange", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/core/Makefile.am b/app/core/Makefile.am index 37b04f516f..edee3ed6e4 100644 --- a/app/core/Makefile.am +++ b/app/core/Makefile.am @@ -373,7 +373,7 @@ core-enums.c: $(srcdir)/core-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/core-enums.h > xgen-cec \ && cp xgen-cec $(@F) \ && rm -f xgen-cec diff --git a/app/core/core-enums.c b/app/core/core-enums.c index 4c39b207cf..0fed508f0b 100644 --- a/app/core/core-enums.c +++ b/app/core/core-enums.c @@ -27,7 +27,7 @@ gimp_container_policy_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpContainerPolicy", values); gimp_enum_set_value_descriptions (type, descs); @@ -59,7 +59,7 @@ gimp_convert_dither_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpConvertDitherType", values); gimp_enum_set_value_descriptions (type, descs); @@ -91,7 +91,7 @@ gimp_convert_palette_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpConvertPaletteType", values); gimp_enum_set_value_descriptions (type, descs); @@ -135,7 +135,7 @@ gimp_gravity_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpGravityType", values); gimp_enum_set_value_descriptions (type, descs); @@ -183,7 +183,7 @@ gimp_alignment_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpAlignmentType", values); gimp_enum_set_value_descriptions (type, descs); @@ -219,7 +219,7 @@ gimp_align_reference_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpAlignReferenceType", values); gimp_enum_set_value_descriptions (type, descs); @@ -255,7 +255,7 @@ gimp_fill_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpFillType", values); gimp_enum_set_value_descriptions (type, descs); @@ -283,7 +283,7 @@ gimp_fill_style_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpFillStyle", values); gimp_enum_set_value_descriptions (type, descs); @@ -311,7 +311,7 @@ gimp_stroke_method_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpStrokeMethod", values); gimp_enum_set_value_descriptions (type, descs); @@ -341,7 +341,7 @@ gimp_join_style_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpJoinStyle", values); gimp_enum_set_value_descriptions (type, descs); @@ -371,7 +371,7 @@ gimp_cap_style_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCapStyle", values); gimp_enum_set_value_descriptions (type, descs); @@ -417,7 +417,7 @@ gimp_dash_preset_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpDashPreset", values); gimp_enum_set_value_descriptions (type, descs); @@ -447,7 +447,7 @@ gimp_brush_generated_shape_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpBrushGeneratedShape", values); gimp_enum_set_value_descriptions (type, descs); @@ -477,7 +477,7 @@ gimp_orientation_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpOrientationType", values); gimp_enum_set_value_descriptions (type, descs); @@ -511,7 +511,7 @@ gimp_item_set_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpItemSet", values); gimp_enum_set_value_descriptions (type, descs); @@ -541,7 +541,7 @@ gimp_rotation_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRotationType", values); gimp_enum_set_value_descriptions (type, descs); @@ -583,7 +583,7 @@ gimp_view_size_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpViewSize", values); gimp_enum_set_value_descriptions (type, descs); @@ -611,7 +611,7 @@ gimp_view_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpViewType", values); gimp_enum_set_value_descriptions (type, descs); @@ -647,7 +647,7 @@ gimp_selection_control_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpSelectionControl", values); gimp_enum_set_value_descriptions (type, descs); @@ -677,7 +677,7 @@ gimp_thumbnail_size_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpThumbnailSize", values); gimp_enum_set_value_descriptions (type, descs); @@ -705,7 +705,7 @@ gimp_undo_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpUndoMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -745,7 +745,7 @@ gimp_undo_event_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpUndoEvent", values); gimp_enum_set_value_descriptions (type, descs); @@ -935,7 +935,7 @@ gimp_undo_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpUndoType", values); gimp_enum_set_value_descriptions (type, descs); @@ -981,7 +981,7 @@ gimp_dirty_mask_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_flags_register_static ("GimpDirtyMask", values); gimp_flags_set_value_descriptions (type, descs); @@ -1009,7 +1009,7 @@ gimp_offset_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpOffsetType", values); gimp_enum_set_value_descriptions (type, descs); @@ -1043,7 +1043,7 @@ gimp_gradient_color_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpGradientColor", values); gimp_enum_set_value_descriptions (type, descs); @@ -1077,7 +1077,7 @@ gimp_gradient_segment_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpGradientSegmentType", values); gimp_enum_set_value_descriptions (type, descs); @@ -1107,7 +1107,7 @@ gimp_gradient_segment_color_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpGradientSegmentColor", values); gimp_enum_set_value_descriptions (type, descs); @@ -1135,7 +1135,7 @@ gimp_mask_apply_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpMaskApplyMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -1167,7 +1167,7 @@ gimp_merge_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpMergeType", values); gimp_enum_set_value_descriptions (type, descs); @@ -1205,7 +1205,7 @@ gimp_select_criterion_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpSelectCriterion", values); gimp_enum_set_value_descriptions (type, descs); @@ -1235,7 +1235,7 @@ gimp_message_severity_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpMessageSeverity", values); gimp_enum_set_value_descriptions (type, descs); @@ -1265,7 +1265,7 @@ gimp_color_profile_policy_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorProfilePolicy", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/display/Makefile.am b/app/display/Makefile.am index 23f590f5c9..84783221c5 100644 --- a/app/display/Makefile.am +++ b/app/display/Makefile.am @@ -104,7 +104,7 @@ display-enums.c: $(srcdir)/display-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/display-enums.h > xgen-dec \ && cp xgen-dec $(@F) \ && rm -f xgen-dec diff --git a/app/display/display-enums.c b/app/display/display-enums.c index 444b74d714..bc0b81e25b 100644 --- a/app/display/display-enums.c +++ b/app/display/display-enums.c @@ -29,7 +29,7 @@ gimp_cursor_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCursorMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -59,7 +59,7 @@ gimp_cursor_precision_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCursorPrecision", values); gimp_enum_set_value_descriptions (type, descs); @@ -91,7 +91,7 @@ gimp_canvas_padding_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCanvasPaddingMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -121,7 +121,7 @@ gimp_space_bar_action_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpSpaceBarAction", values); gimp_enum_set_value_descriptions (type, descs); @@ -149,7 +149,7 @@ gimp_zoom_quality_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpZoomQuality", values); gimp_enum_set_value_descriptions (type, descs); @@ -179,7 +179,7 @@ gimp_zoom_focus_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpZoomFocus", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/paint/Makefile.am b/app/paint/Makefile.am index 97ab8187cf..689b661eb1 100644 --- a/app/paint/Makefile.am +++ b/app/paint/Makefile.am @@ -101,7 +101,7 @@ paint-enums.c: $(srcdir)/paint-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/paint-enums.h > xgen-pec \ && cp xgen-pec $(@F) \ && rm -f xgen-pec diff --git a/app/paint/paint-enums.c b/app/paint/paint-enums.c index 530e4193a0..a7b4e6ca56 100644 --- a/app/paint/paint-enums.c +++ b/app/paint/paint-enums.c @@ -27,7 +27,7 @@ gimp_brush_application_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpBrushApplicationMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -55,7 +55,7 @@ gimp_perspective_clone_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPerspectiveCloneMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -87,7 +87,7 @@ gimp_source_align_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpSourceAlignMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -115,7 +115,7 @@ gimp_convolve_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpConvolveType", values); gimp_enum_set_value_descriptions (type, descs); @@ -145,7 +145,7 @@ gimp_ink_blob_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpInkBlobType", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/plug-in/Makefile.am b/app/plug-in/Makefile.am index 93450e2d3d..9289ae9164 100644 --- a/app/plug-in/Makefile.am +++ b/app/plug-in/Makefile.am @@ -96,7 +96,7 @@ plug-in-enums.c: $(srcdir)/plug-in-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/plug-in-enums.h > xgen-bec \ && cp xgen-bec $(@F) \ && rm -f xgen-bec diff --git a/app/plug-in/plug-in-enums.c b/app/plug-in/plug-in-enums.c index b285c07075..ca1feca3bc 100644 --- a/app/plug-in/plug-in-enums.c +++ b/app/plug-in/plug-in-enums.c @@ -35,7 +35,7 @@ gimp_plug_in_image_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_flags_register_static ("GimpPlugInImageType", values); gimp_flags_set_value_descriptions (type, descs); @@ -67,7 +67,7 @@ gimp_plug_in_call_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPlugInCallMode", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/text/Makefile.am b/app/text/Makefile.am index 7009cadfe8..5ead53dbc2 100644 --- a/app/text/Makefile.am +++ b/app/text/Makefile.am @@ -74,7 +74,7 @@ text-enums.c: $(srcdir)/text-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/text-enums.h > xgen-tec \ && cp xgen-tec $(@F) \ && rm -f xgen-tec diff --git a/app/text/text-enums.c b/app/text/text-enums.c index 972c14f8a8..a24c6da3dc 100644 --- a/app/text/text-enums.c +++ b/app/text/text-enums.c @@ -27,7 +27,7 @@ gimp_text_box_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTextBoxMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -57,7 +57,7 @@ gimp_text_outline_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTextOutline", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am index 17aa445dfc..8200f1474f 100644 --- a/app/tools/Makefile.am +++ b/app/tools/Makefile.am @@ -213,7 +213,7 @@ tools-enums.c: $(srcdir)/tools-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/tools-enums.h > xgen-tec \ && cp xgen-tec $(@F) \ && rm -f xgen-tec diff --git a/app/tools/tools-enums.c b/app/tools/tools-enums.c index 36ce1b9c7a..4eca05bb72 100644 --- a/app/tools/tools-enums.c +++ b/app/tools/tools-enums.c @@ -32,7 +32,7 @@ gimp_button_release_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpButtonReleaseType", values); gimp_enum_set_value_descriptions (type, descs); @@ -64,7 +64,7 @@ gimp_rectangle_guide_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRectangleGuide", values); gimp_enum_set_value_descriptions (type, descs); @@ -94,7 +94,7 @@ gimp_rectangle_constraint_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRectangleConstraint", values); gimp_enum_set_value_descriptions (type, descs); @@ -122,7 +122,7 @@ gimp_rectangle_precision_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRectanglePrecision", values); gimp_enum_set_value_descriptions (type, descs); @@ -154,7 +154,7 @@ gimp_rectangle_tool_fixed_rule_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRectangleToolFixedRule", values); gimp_enum_set_value_descriptions (type, descs); @@ -184,7 +184,7 @@ gimp_rect_select_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRectSelectMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -214,7 +214,7 @@ gimp_transform_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTransformType", values); gimp_enum_set_value_descriptions (type, descs); @@ -246,7 +246,7 @@ gimp_transform_preview_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTransformPreviewType", values); gimp_enum_set_value_descriptions (type, descs); @@ -274,7 +274,7 @@ gimp_transform_grid_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTransformGridType", values); gimp_enum_set_value_descriptions (type, descs); @@ -304,7 +304,7 @@ gimp_vector_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpVectorMode", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am index 0aac2de5b0..752c6aaa8b 100644 --- a/app/widgets/Makefile.am +++ b/app/widgets/Makefile.am @@ -375,7 +375,7 @@ widgets-enums.c: $(srcdir)/widgets-enums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/widgets-enums.h > xgen-wec \ && cp xgen-wec $(@F) \ && rm -f xgen-wec diff --git a/app/widgets/widgets-enums.c b/app/widgets/widgets-enums.c index b840e9ee55..11c4e0897c 100644 --- a/app/widgets/widgets-enums.c +++ b/app/widgets/widgets-enums.c @@ -27,7 +27,7 @@ gimp_active_color_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpActiveColor", values); gimp_enum_set_value_descriptions (type, descs); @@ -57,7 +57,7 @@ gimp_color_dialog_state_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorDialogState", values); gimp_enum_set_value_descriptions (type, descs); @@ -89,7 +89,7 @@ gimp_color_frame_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorFrameMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -121,7 +121,7 @@ gimp_color_pick_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorPickMode", values); gimp_enum_set_value_descriptions (type, descs); @@ -149,7 +149,7 @@ gimp_color_pick_state_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorPickState", values); gimp_enum_set_value_descriptions (type, descs); @@ -177,7 +177,7 @@ gimp_cursor_format_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCursorFormat", values); gimp_enum_set_value_descriptions (type, descs); @@ -205,7 +205,7 @@ gimp_help_browser_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpHelpBrowserType", values); gimp_enum_set_value_descriptions (type, descs); @@ -233,7 +233,7 @@ gimp_histogram_scale_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpHistogramScale", values); gimp_enum_set_value_descriptions (type, descs); @@ -273,7 +273,7 @@ gimp_tab_style_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTabStyle", values); gimp_enum_set_value_descriptions (type, descs); @@ -303,7 +303,7 @@ gimp_window_hint_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpWindowHint", values); gimp_enum_set_value_descriptions (type, descs); diff --git a/libgimp/Makefile.am b/libgimp/Makefile.am index f61568d0dd..904136e56c 100644 --- a/libgimp/Makefile.am +++ b/libgimp/Makefile.am @@ -395,7 +395,7 @@ gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/gimpenums.h > xgen-cec \ && cat $(srcdir)/gimpenums.c.tail >> xgen-cec \ && cp xgen-cec $(@F) \ diff --git a/libgimpbase/Makefile.am b/libgimpbase/Makefile.am index b2ab27724c..3a3e26e5d3 100644 --- a/libgimpbase/Makefile.am +++ b/libgimpbase/Makefile.am @@ -193,7 +193,7 @@ $(srcdir)/gimpbaseenums.c: $(srcdir)/gimpbaseenums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/gimpbaseenums.h > xgen-bec \ && cp xgen-bec $(@F) \ && rm -f xgen-bec diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c index c15e9dea98..48906f976b 100644 --- a/libgimpbase/gimpbaseenums.c +++ b/libgimpbase/gimpbaseenums.c @@ -37,7 +37,7 @@ gimp_add_mask_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpAddMaskType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -70,7 +70,7 @@ gimp_blend_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpBlendMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -101,7 +101,7 @@ gimp_bucket_fill_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpBucketFillMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -134,7 +134,7 @@ gimp_channel_ops_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpChannelOps", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -171,7 +171,7 @@ gimp_channel_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpChannelType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -202,7 +202,7 @@ gimp_check_size_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCheckSize", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -239,7 +239,7 @@ gimp_check_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCheckType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -268,7 +268,7 @@ gimp_clone_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpCloneType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -299,7 +299,7 @@ gimp_desaturate_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpDesaturateMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -328,7 +328,7 @@ gimp_dodge_burn_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpDodgeBurnType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -355,7 +355,7 @@ gimp_foreground_extract_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpForegroundExtractMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -402,7 +402,7 @@ gimp_gradient_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpGradientType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -437,7 +437,7 @@ gimp_grid_style_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpGridStyle", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -468,7 +468,7 @@ gimp_icon_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpIconType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -499,7 +499,7 @@ gimp_image_base_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpImageBaseType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -536,7 +536,7 @@ gimp_image_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpImageType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -569,7 +569,7 @@ gimp_interpolation_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpInterpolationType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -598,7 +598,7 @@ gimp_paint_application_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPaintApplicationMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -629,7 +629,7 @@ gimp_repeat_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRepeatMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -660,7 +660,7 @@ gimp_run_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpRunMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -689,7 +689,7 @@ gimp_size_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpSizeType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -720,7 +720,7 @@ gimp_transfer_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTransferMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -749,7 +749,7 @@ gimp_transform_direction_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTransformDirection", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -782,7 +782,7 @@ gimp_transform_resize_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTransformResize", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -853,7 +853,7 @@ gimp_pdb_arg_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPDBArgType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -882,7 +882,7 @@ gimp_pdb_error_handler_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPDBErrorHandler", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -915,7 +915,7 @@ gimp_pdb_proc_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPDBProcType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -950,7 +950,7 @@ gimp_pdb_status_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPDBStatusType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -981,7 +981,7 @@ gimp_message_handler_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpMessageHandlerType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1012,7 +1012,7 @@ gimp_stack_trace_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpStackTraceMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1049,7 +1049,7 @@ gimp_progress_command_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpProgressCommand", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1078,7 +1078,7 @@ gimp_text_direction_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTextDirection", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1111,7 +1111,7 @@ gimp_text_hint_style_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTextHintStyle", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1144,7 +1144,7 @@ gimp_text_justification_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpTextJustification", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1185,7 +1185,7 @@ gimp_user_directory_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpUserDirectory", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -1212,7 +1212,7 @@ gimp_vectors_stroke_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpVectorsStrokeType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); diff --git a/libgimpconfig/Makefile.am b/libgimpconfig/Makefile.am index d3d2dde5c4..37522ce5d0 100644 --- a/libgimpconfig/Makefile.am +++ b/libgimpconfig/Makefile.am @@ -139,7 +139,7 @@ $(srcdir)/gimpcolorconfig-enums.c: $(srcdir)/gimpcolorconfig-enums.h $(GIMP_MKEN --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/gimpcolorconfig-enums.h > xgen-cec \ && cp xgen-cec $(@F) \ && rm -f xgen-cec diff --git a/libgimpconfig/gimpcolorconfig-enums.c b/libgimpconfig/gimpcolorconfig-enums.c index a58ef0da74..78e92fc9a1 100644 --- a/libgimpconfig/gimpcolorconfig-enums.c +++ b/libgimpconfig/gimpcolorconfig-enums.c @@ -29,7 +29,7 @@ gimp_color_management_mode_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorManagementMode", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -62,7 +62,7 @@ gimp_color_rendering_intent_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorRenderingIntent", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); diff --git a/libgimpthumb/Makefile.am b/libgimpthumb/Makefile.am index 2e7b5314fb..a78a83a7f9 100644 --- a/libgimpthumb/Makefile.am +++ b/libgimpthumb/Makefile.am @@ -107,7 +107,7 @@ gimpthumb-enums.c: $(srcdir)/gimpthumb-enums.h $(GIMP_MKENUMS) --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \ --vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \ + --vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \ $(srcdir)/gimpthumb-enums.h > xgen-tec \ && cp xgen-tec $(@F) \ && rm -f xgen-tec diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am index ec440474bf..b23beaaa2f 100644 --- a/libgimpwidgets/Makefile.am +++ b/libgimpwidgets/Makefile.am @@ -293,7 +293,7 @@ gimpwidgetsenums.c: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS) --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ - --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $(srcdir)/gimpwidgetsenums.h > xgen-wec \ && cp xgen-wec $(@F) \ && rm -f xgen-wec diff --git a/libgimpwidgets/gimpwidgetsenums.c b/libgimpwidgets/gimpwidgetsenums.c index d0faa0fd23..8532361c5d 100644 --- a/libgimpwidgets/gimpwidgetsenums.c +++ b/libgimpwidgets/gimpwidgetsenums.c @@ -29,7 +29,7 @@ gimp_aspect_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpAspectType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -62,7 +62,7 @@ gimp_chain_position_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpChainPosition", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -93,7 +93,7 @@ gimp_color_area_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorAreaType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -132,7 +132,7 @@ gimp_color_selector_channel_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpColorSelectorChannel", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -161,7 +161,7 @@ gimp_page_selector_target_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpPageSelectorTarget", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -192,7 +192,7 @@ gimp_size_entry_update_policy_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpSizeEntryUpdatePolicy", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); @@ -221,7 +221,7 @@ gimp_zoom_type_get_type (void) static GType type = 0; - if (! type) + if (G_UNLIKELY (! type)) { type = g_enum_register_static ("GimpZoomType", values); gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");