summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-07-15 11:48:55 +0200
committerMurray Cumming <murrayc@murrayc.com>2015-07-15 12:18:16 +0200
commit254f5b93e08e45cd32ccdbb0f4a31c433ece9d08 (patch)
tree1d0570d46627ad2bed137980bce51974f453a8fd /gio
parent90df091409fd5addf9d75c4d637d39e0e67e115a (diff)
downloadglibmm-254f5b93e08e45cd32ccdbb0f4a31c433ece9d08.tar.gz
Avoid shadowed variables.
Because this generally invites programming errors, though I am less concerned about shadowing of method names by parameter or variable names, which requires some tedious parameter renaming. In MatchInfo::set_gobject() the confusion between take_ownership and this.take_ownership does seem to have caused a programming error, hopefully now corrected.
Diffstat (limited to 'gio')
-rw-r--r--gio/src/dbussubtreevtable.ccg10
-rw-r--r--gio/src/fileinfo.hg4
2 files changed, 7 insertions, 7 deletions
diff --git a/gio/src/dbussubtreevtable.ccg b/gio/src/dbussubtreevtable.ccg
index a2481012..5e726cc5 100644
--- a/gio/src/dbussubtreevtable.ccg
+++ b/gio/src/dbussubtreevtable.ccg
@@ -105,21 +105,21 @@ static const GDBusInterfaceVTable* DBusSubtreeVTable_Dispatch_giomm_callback(
const char* interface_name, const char* node, void** out_user_data,
void* user_data)
{
- Gio::DBus::SubtreeVTable* vtable =
+ Gio::DBus::SubtreeVTable* vtable_subtree =
static_cast<Gio::DBus::SubtreeVTable*>(user_data);
Gio::DBus::SubtreeVTable::SlotSubtreeDispatch* the_slot =
- vtable->get_slot_dispatch();
+ vtable_subtree->get_slot_dispatch();
try
{
- const Gio::DBus::InterfaceVTable* vtable =
+ const Gio::DBus::InterfaceVTable* vtable_iface =
(*the_slot)(Glib::wrap(connection, true), sender, object_path,
interface_name, (node ? node : ""));
- *out_user_data = const_cast<Gio::DBus::InterfaceVTable*>(vtable);
+ *out_user_data = const_cast<Gio::DBus::InterfaceVTable*>(vtable_iface);
- return vtable->gobj();
+ return vtable_iface->gobj();
}
catch(...)
{
diff --git a/gio/src/fileinfo.hg b/gio/src/fileinfo.hg
index d10eb685..b14a6013 100644
--- a/gio/src/fileinfo.hg
+++ b/gio/src/fileinfo.hg
@@ -200,8 +200,8 @@ public:
// helper setters
_WRAP_METHOD(void set_file_type(FileType type), g_file_info_set_file_type)
- _WRAP_METHOD(void set_is_hidden(bool is_hidden = true), g_file_info_set_is_hidden)
- _WRAP_METHOD(void set_is_symlink(bool is_symlink = true), g_file_info_set_is_symlink)
+ _WRAP_METHOD(void set_is_hidden(bool hidden = true), g_file_info_set_is_hidden)
+ _WRAP_METHOD(void set_is_symlink(bool symlink = true), g_file_info_set_is_symlink)
_WRAP_METHOD(void set_name(const std::string& name), g_file_info_set_name)
//TODO: This should take a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4