[glibmm] OptionGroup: Minor code style changes.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] OptionGroup: Minor code style changes.
- Date: Tue, 15 Feb 2011 11:44:46 +0000 (UTC)
commit eeafcc8933bc078523f6836652c25b4f3db67783
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Feb 15 12:44:35 2011 +0100
OptionGroup: Minor code style changes.
* glib/src/optiongroup.[hg|ccg]: Use the explicit keyword and use a _
suffix for member variables.
ChangeLog | 7 +++++++
glib/src/optiongroup.ccg | 27 ++++++++++++++++-----------
glib/src/optiongroup.hg | 1 +
3 files changed, 24 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ce458d4..91a7913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-15 Murray Cumming <murrayc murrayc com>
+
+ OptionGroup: Minor code style changes.
+
+ * glib/src/optiongroup.[hg|ccg]: Use the explicit keyword and use a _
+ suffix for member variables.
+
2011-02-14 Kjell Ahlstedt <kjell ahlstedt bredband net>
OptionGroup: Add add_entry() that takes a slot with callback function.
diff --git a/glib/src/optiongroup.ccg b/glib/src/optiongroup.ccg
index 358d866..dfa9d0e 100644
--- a/glib/src/optiongroup.ccg
+++ b/glib/src/optiongroup.ccg
@@ -36,28 +36,33 @@ namespace //anonymous
class OptionArgCallback
{
public:
- OptionArgCallback(const OptionGroup::SlotOptionArgString& slot)
- : slot_string(new OptionGroup::SlotOptionArgString(slot)), slot_filename(0)
+ explicit OptionArgCallback(const OptionGroup::SlotOptionArgString& slot)
+ : slot_string_(new OptionGroup::SlotOptionArgString(slot)), slot_filename_(0)
{ }
- OptionArgCallback(const OptionGroup::SlotOptionArgFilename& slot)
- : slot_string(0), slot_filename(new OptionGroup::SlotOptionArgFilename(slot))
+ explicit OptionArgCallback(const OptionGroup::SlotOptionArgFilename& slot)
+ : slot_string_(0), slot_filename_(new OptionGroup::SlotOptionArgFilename(slot))
{ }
- bool is_filename_option() const { return slot_filename != 0; }
- const OptionGroup::SlotOptionArgString* get_slot_string() const { return slot_string; }
- const OptionGroup::SlotOptionArgFilename* get_slot_filename() const { return slot_filename; }
+ bool is_filename_option() const
+ { return slot_filename_ != 0; }
+
+ const OptionGroup::SlotOptionArgString* get_slot_string() const
+ { return slot_string_; }
+
+ const OptionGroup::SlotOptionArgFilename* get_slot_filename() const
+ { return slot_filename_; }
~OptionArgCallback()
{
- delete slot_string;
- delete slot_filename;
+ delete slot_string_;
+ delete slot_filename_;
}
private:
//One of these slot pointers is 0 and the other one points to a slot.
- OptionGroup::SlotOptionArgString* slot_string;
- OptionGroup::SlotOptionArgFilename* slot_filename;
+ OptionGroup::SlotOptionArgString* slot_string_;
+ OptionGroup::SlotOptionArgFilename* slot_filename_;
//Not copyable
OptionArgCallback(const OptionArgCallback&);
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index f31015d..8298f79 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -68,6 +68,7 @@ public:
*/
explicit OptionGroup(GOptionGroup* castitem);
_IGNORE(g_option_group_new)
+
virtual ~OptionGroup();
_IGNORE(g_option_group_free)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]