summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-07-15 13:16:43 +0200
committerMurray Cumming <murrayc@murrayc.com>2015-07-15 13:21:24 +0200
commitd5fbe0d1e69d81aae918834c3a0c561b99f2791f (patch)
tree93a5b57be2fc9b7ece03d8cc00f354c8e94f3e78 /examples
parenta776f52044af21d85a6aecd13f8496c7ce670e83 (diff)
downloadglibmm-d5fbe0d1e69d81aae918834c3a0c561b99f2791f.tar.gz
examples: Avoid more shadowed variables.
Diffstat (limited to 'examples')
-rw-r--r--examples/dbus/client_bus_listnames.cc4
-rw-r--r--examples/network/resolver.cc4
-rw-r--r--examples/network/socket-server.cc4
-rw-r--r--examples/thread/dispatcher.cc6
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/dbus/client_bus_listnames.cc b/examples/dbus/client_bus_listnames.cc
index 4507aec1..06fc5887 100644
--- a/examples/dbus/client_bus_listnames.cc
+++ b/examples/dbus/client_bus_listnames.cc
@@ -48,12 +48,12 @@ void on_dbus_proxy_available(Glib::RefPtr<Gio::AsyncResult>& result)
{
// The proxy's call method returns a tuple of the value(s) that the method
// call produces so just get the tuple as a VariantContainerBase.
- const auto result = proxy->call_sync("ListNames");
+ const auto call_result = proxy->call_sync("ListNames");
// Now extract the single item in the variant container which is the
// array of strings (the names).
Glib::Variant< std::vector<Glib::ustring>> names_variant;
- result.get_child(names_variant);
+ call_result.get_child(names_variant);
// Get the vector of strings.
std::vector<Glib::ustring> names = names_variant.get();
diff --git a/examples/network/resolver.cc b/examples/network/resolver.cc
index 49ad2a58..c9195830 100644
--- a/examples/network/resolver.cc
+++ b/examples/network/resolver.cc
@@ -435,9 +435,9 @@ interrupted (int /*sig*/)
}
static bool
-async_cancel (Glib::IOCondition /*cond*/, Glib::RefPtr<Gio::Cancellable> cancellable)
+async_cancel (Glib::IOCondition /*cond*/, Glib::RefPtr<Gio::Cancellable> the_cancellable)
{
- cancellable->cancel ();
+ the_cancellable->cancel ();
return false;
}
#endif
diff --git a/examples/network/socket-server.cc b/examples/network/socket-server.cc
index 360c90bd..897c5d14 100644
--- a/examples/network/socket-server.cc
+++ b/examples/network/socket-server.cc
@@ -75,8 +75,8 @@ socket_address_to_string (const Glib::RefPtr<Gio::SocketAddress>& address)
auto inet_address = isockaddr->get_address ();
auto str = inet_address->to_string ();
- auto port = isockaddr->get_port ();
- auto res = Glib::ustring::compose ("%1:%2", str, port);
+ auto the_port = isockaddr->get_port ();
+ auto res = Glib::ustring::compose ("%1:%2", str, the_port);
return res;
}
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index 79ff64bc..e58cb227 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -29,7 +29,7 @@ namespace
class ThreadProgress
{
public:
- explicit ThreadProgress(int id);
+ explicit ThreadProgress(int the_id);
virtual ~ThreadProgress();
int id() const;
@@ -78,10 +78,10 @@ public:
void operator()(T ptr) const { delete ptr; }
};
-ThreadProgress::ThreadProgress(int id)
+ThreadProgress::ThreadProgress(int the_id)
:
thread_ (nullptr),
- id_ (id),
+ id_ (the_id),
progress_ (0)
{
// Connect to the cross-thread signal.