From 06f8323665f34355a42f6e4378eb6de6b1a33802 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sun, 11 Aug 2019 18:30:56 +0200 Subject: Silence a few warnings from 460193870ad22ad7611978c5d139149909f56664 --- src/ui/desktop/menubar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ui/desktop/menubar.cpp b/src/ui/desktop/menubar.cpp index 6389def6a..8bb6d54b4 100644 --- a/src/ui/desktop/menubar.cpp +++ b/src/ui/desktop/menubar.cpp @@ -42,7 +42,7 @@ // ================= Common ==================== std::vector> checkmenuitems; -unsigned int lastverb = std::string::npos; +unsigned int lastverb = -1; ; // Sets tip @@ -63,12 +63,12 @@ deselect_action(SPAction *action) static void item_activate(Gtk::MenuItem *menuitem, SPAction *action) { if (action->verb->get_code() == lastverb) { - lastverb = std::string::npos; + lastverb = -1; return; } lastverb = action->verb->get_code(); sp_action_perform(action, nullptr); - lastverb = std::string::npos; + lastverb = -1; } static void toggle_checkmenu(unsigned int emitting_verb, bool value) @@ -76,12 +76,12 @@ static void toggle_checkmenu(unsigned int emitting_verb, bool value) for (auto menu : checkmenuitems) { if (emitting_verb == menu.first) { if (emitting_verb == lastverb) { - lastverb = std::string::npos; + lastverb = -1; return; } lastverb = emitting_verb; menu.second->property_active() = value; - lastverb = std::string::npos; + lastverb = -1; } } } -- cgit v1.2.3