aboutsummaryrefslogtreecommitdiff
path: root/src/MenuCreator.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/MenuCreator.cc
parentfa15400cc24ddcfd6e361bd068ae1986b9f9e561 (diff)
downloadfluxbox_pavel-4b47675441b76620519b0204497686b09113daaa.zip
fluxbox_pavel-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/MenuCreator.cc')
-rw-r--r--src/MenuCreator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc
index 9884187..74968e3 100644
--- a/src/MenuCreator.cc
+++ b/src/MenuCreator.cc
@@ -328,7 +328,7 @@ void translateMenuItem(FbTk::Parser &parse, ParseItem &pitem,
328 // we need to attach command to arguments so command parser can parse it 328 // we need to attach command to arguments so command parser can parse it
329 string line = str_key + " " + str_cmd; 329 string line = str_key + " " + str_cmd;
330 FbTk::RefCount<FbTk::Command<void> > command(FbTk::CommandParser<void>::instance().parse(line)); 330 FbTk::RefCount<FbTk::Command<void> > command(FbTk::CommandParser<void>::instance().parse(line));
331 if (*command != 0) { 331 if (command != 0) {
332 // special NLS default labels 332 // special NLS default labels
333 if (str_label.empty()) { 333 if (str_label.empty()) {
334 if (str_key == "reconfig" || str_key == "reconfigure") { 334 if (str_key == "reconfig" || str_key == "reconfigure") {