diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-18 21:19:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-19 07:30:07 +0100 |
commit | 38f4df895ebcaceb4107a42a59006420633a29b3 (patch) | |
tree | 2c804f2e1cc4d83208f7d284952e4a9c8a772e83 /vcl | |
parent | e3a3a931fe23eee9a70ffd807bc00a6ba4aad731 (diff) |
Improved loplugin:external, handling class types
...plus follow-up loplugin:fakebool and loplugin:consttobool findings
Change-Id: I4b4045439fc9b19c42f6915b158540d2daf4cafb
Reviewed-on: https://gerrit.libreoffice.org/83123
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gloactiongroup.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gloactiongroup.cxx b/vcl/unx/gtk3/gtk3gloactiongroup.cxx index 80f932ace1a1..c6d5eaf03fc5 100644 --- a/vcl/unx/gtk3/gtk3gloactiongroup.cxx +++ b/vcl/unx/gtk3/gtk3gloactiongroup.cxx @@ -20,20 +20,23 @@ #define G_TYPE_LO_ACTION (g_lo_action_get_type ()) #define G_LO_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_LO_ACTION, GLOAction)) +namespace { struct GLOAction { GObject parent_instance; gint item_id; // Menu item ID. - gboolean submenu; // TRUE if action is a submenu action. - gboolean enabled; // TRUE if action is enabled. + bool submenu; // TRUE if action is a submenu action. + bool enabled; // TRUE if action is enabled. GVariantType* parameter_type; // A GVariantType with the action parameter type. GVariantType* state_type; // A GVariantType with item state type GVariant* state_hint; // A GVariant with state hints. GVariant* state; // A GVariant with current item state }; +} + typedef GObjectClass GLOActionClass; #ifdef __GNUC__ @@ -60,7 +63,7 @@ static void g_lo_action_init (GLOAction *action) { action->item_id = -1; - action->submenu = FALSE; + action->submenu = false; action->enabled = true; action->parameter_type = nullptr; action->state_type = nullptr; |