summaryrefslogtreecommitdiff
path: root/include/vcl/menu.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-25 12:11:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-25 13:04:17 +0100
commit572681bfc7bb141c9f16694df05a505e9d9f1a88 (patch)
tree2e3af2a5a6f12fe788817227534028195fed7555 /include/vcl/menu.hxx
parent8eeac03bcafac6b2a4984ad70d0694cad01d5615 (diff)
Change some #define to constexpr
...plus loplugin:unnecessaryparen fallout in sw/source/uibase/docvw/edtwin.cxx. Each of the files contained at least one #define that would have caused warnings with upcoming loplugin:unsignedcompare. For consistency, I changed all #defines in those files (using a variable of a specific type if the original #define used a cast to that type, otherwise using 'auto'). Change-Id: I66f71b2d83394c9dc6952ae19df774cdd4d0b76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87374 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/vcl/menu.hxx')
-rw-r--r--include/vcl/menu.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 1e8542c0206c..a4360d93ac93 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -63,8 +63,8 @@ typedef OutputDevice RenderContext; // same as in include/vcl/outdev.hxx
class ILibreOfficeKitNotifier;
}
-#define MENU_APPEND (sal_uInt16(0xFFFF))
-#define MENU_ITEM_NOTFOUND (sal_uInt16(0xFFFF))
+constexpr sal_uInt16 MENU_APPEND = 0xFFFF;
+constexpr sal_uInt16 MENU_ITEM_NOTFOUND = 0xFFFF;
// Must match the definitions in css::awt::PopupMenuDirection.idl
enum class PopupMenuFlags
@@ -103,7 +103,7 @@ namespace o3tl
}
/// Invalid menu item id
-#define ITEMPOS_INVALID 0xFFFF
+constexpr auto ITEMPOS_INVALID = 0xFFFF;
struct ImplMenuDelData
{