aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MultiButtonMenuItem.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-05-01 14:47:53 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-05-10 11:00:45 (GMT)
commit4b47675441b76620519b0204497686b09113daaa (patch)
treec3494c61a82b84418761000d5fc7fc5d12188204 /src/FbTk/MultiButtonMenuItem.cc
parentfa15400cc24ddcfd6e361bd068ae1986b9f9e561 (diff)
downloadfluxbox-4b47675441b76620519b0204497686b09113daaa.zip
fluxbox-4b47675441b76620519b0204497686b09113daaa.tar.bz2
Make RefCount<> more sensible
the previous version of operator*() made no sense. E.g., it violated the invariant (*ptr).foo <=> ptr->foo. The dereferencing operator now returns a reference to the pointed-to object, rather than a pointer to it. I also added a bool conversion operator, which can be used in testing the NULL-ness of the pointer. Anyone wondering if that could be done in a simpler way is encouraged to read <http://www.artima.com/cppsource/safebool.html>. And, finally, I removed the mutable flag from the m_data member, since it does not need it.
Diffstat (limited to 'src/FbTk/MultiButtonMenuItem.cc')
-rw-r--r--src/FbTk/MultiButtonMenuItem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FbTk/MultiButtonMenuItem.cc b/src/FbTk/MultiButtonMenuItem.cc
index ed67c83..1b61a99 100644
--- a/src/FbTk/MultiButtonMenuItem.cc
+++ b/src/FbTk/MultiButtonMenuItem.cc
@@ -55,7 +55,7 @@ void MultiButtonMenuItem::click(int button, int time, unsigned int mods) {
55 if (button <= 0 || button > static_cast<signed>(buttons()) || buttons() == 0) 55 if (button <= 0 || button > static_cast<signed>(buttons()) || buttons() == 0)
56 return; 56 return;
57 57
58 if (*m_button_exe[button - 1] != 0) 58 if (m_button_exe[button - 1] != 0)
59 m_button_exe[button - 1]->execute(); 59 m_button_exe[button - 1]->execute();
60} 60}
61 61