[glibmm] examples: Avoid more shadowed variables.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] examples: Avoid more shadowed variables.
- Date: Wed, 15 Jul 2015 11:22:26 +0000 (UTC)
commit d5fbe0d1e69d81aae918834c3a0c561b99f2791f
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Jul 15 13:16:43 2015 +0200
examples: Avoid more shadowed variables.
examples/dbus/client_bus_listnames.cc | 4 ++--
examples/network/resolver.cc | 4 ++--
examples/network/socket-server.cc | 4 ++--
examples/thread/dispatcher.cc | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/examples/dbus/client_bus_listnames.cc b/examples/dbus/client_bus_listnames.cc
index 4507aec..06fc588 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 49ad2a5..c919583 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 360c90b..897c5d1 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 79ff64b..e58cb22 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]