[libsigc++2] C++11: Use auto.



commit 4fce962cd6599488381c997bbfcbb55c270b5a00
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Jul 18 20:54:32 2015 +0200

    C++11: Use auto.
    
    Trying to avoid using auto where its a specific type that we are
    trying to test for.

 examples/member_method.cc            |    2 +-
 sigc++/connection.cc                 |    2 +-
 sigc++/functors/slot_base.cc         |    8 ++++----
 sigc++/signal_base.cc                |    2 +-
 tests/test_accum_iter.cc             |    2 +-
 tests/test_accumulated.cc            |    6 +++---
 tests/test_bind.cc                   |    2 +-
 tests/test_bind_ref.cc               |    4 ++--
 tests/test_bind_refptr.cc            |   12 ++++++------
 tests/test_bind_return.cc            |    2 +-
 tests/test_compose.cc                |    2 +-
 tests/test_copy_invalid_slot.cc      |    4 ++--
 tests/test_cpp11_lambda.cc           |    4 ++--
 tests/test_custom.cc                 |    2 +-
 tests/test_deduce_result_type.cc     |    2 +-
 tests/test_disconnect.cc             |    4 ++--
 tests/test_disconnect_during_emit.cc |    2 +-
 tests/test_exception_catch.cc        |    2 +-
 tests/test_functor_trait.cc          |    2 +-
 tests/test_hide.cc                   |    2 +-
 tests/test_limit_reference.cc        |    8 ++++----
 tests/test_mem_fun.cc                |    6 +++---
 tests/test_ptr_fun.cc                |    2 +-
 tests/test_retype.cc                 |    2 +-
 tests/test_retype_return.cc          |    2 +-
 tests/test_signal.cc                 |    2 +-
 tests/test_size.cc                   |    2 +-
 tests/test_slot.cc                   |    2 +-
 tests/test_slot_disconnect.cc        |    2 +-
 tests/test_track_obj.cc              |    4 ++--
 tests/test_trackable.cc              |    2 +-
 tests/test_visit_each.cc             |    2 +-
 32 files changed, 52 insertions(+), 52 deletions(-)
---
diff --git a/examples/member_method.cc b/examples/member_method.cc
index ff97af2..6564ba9 100644
--- a/examples/member_method.cc
+++ b/examples/member_method.cc
@@ -29,7 +29,7 @@ protected:
 
 Something::Something()
 {
-  type_signal_print::iterator iter = signal_print.connect( sigc::mem_fun(this, &Something::on_print) );
+  auto iter = signal_print.connect( sigc::mem_fun(this, &Something::on_print) );
 
   signal_print.emit(2);
 
diff --git a/sigc++/connection.cc b/sigc++/connection.cc
index 487e459..233d5df 100644
--- a/sigc++/connection.cc
+++ b/sigc++/connection.cc
@@ -103,7 +103,7 @@ void connection::set_slot(slot_base* sl)
 
 void* connection::notify(void* data)
 {
-  connection* self = reinterpret_cast<connection*>(data);
+  auto self = reinterpret_cast<connection*>(data);
   self->slot_ = nullptr;
   return 0;
 }
diff --git a/sigc++/functors/slot_base.cc b/sigc++/functors/slot_base.cc
index 1ddaed7..d542d7a 100644
--- a/sigc++/functors/slot_base.cc
+++ b/sigc++/functors/slot_base.cc
@@ -29,7 +29,7 @@ struct destroy_notify_struct
 
   static void* notify(void* data)
   {
-    destroy_notify_struct* self_ = reinterpret_cast<destroy_notify_struct*>(data);
+    auto self_ = reinterpret_cast<destroy_notify_struct*>(data);
     self_->deleted_ = true;
     return 0;
   }
@@ -66,7 +66,7 @@ void slot_rep::disconnect()
     call_ = nullptr;          // Invalidate the slot.
                         // _Must_ be done here because parent_ might defer the actual
                         // destruction of the slot_rep and try to invoke it before that point.
-    void* data_ = parent_;
+    auto data_ = parent_;
     parent_ = nullptr;        // Just a precaution.
     (cleanup_)(data_);  // Notify the parent (might lead to destruction of this!).
   }
@@ -77,7 +77,7 @@ void slot_rep::disconnect()
 //static
 void* slot_rep::notify(void* data)
 {
-  slot_rep* self_ = reinterpret_cast<slot_rep*>(data);
+  auto self_ = reinterpret_cast<slot_rep*>(data);
 
   self_->call_ = nullptr; // Invalidate the slot.
   
@@ -164,7 +164,7 @@ slot_base& slot_base::operator=(const slot_base& src)
     return *this;
   }
 
-  internal::slot_rep* new_rep_ = src.rep_->dup();
+  auto new_rep_ = src.rep_->dup();
 
   if (rep_) // Silently exchange the slot_rep.
   {
diff --git a/sigc++/signal_base.cc b/sigc++/signal_base.cc
index 167bf72..f10b2d1 100644
--- a/sigc++/signal_base.cc
+++ b/sigc++/signal_base.cc
@@ -127,7 +127,7 @@ void signal_impl::sweep()
   signal_exec exec(this);
 
   deferred_ = false;
-  iterator_type i = slots_.begin();
+  auto i = slots_.begin();
   while (i != slots_.end())
     if ((*i).empty())
       i = slots_.erase(i);
diff --git a/tests/test_accum_iter.cc b/tests/test_accum_iter.cc
index d89aae0..486fa27 100644
--- a/tests/test_accum_iter.cc
+++ b/tests/test_accum_iter.cc
@@ -34,7 +34,7 @@ struct min_accum
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_accumulated.cc b/tests/test_accumulated.cc
index 5b3c0ae..50a8d45 100644
--- a/tests/test_accumulated.cc
+++ b/tests/test_accumulated.cc
@@ -73,7 +73,7 @@ struct A : public sigc::trackable
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -108,14 +108,14 @@ int main(int argc, char* argv[])
   util->check_result(result_stream,
     "foo: 34, A::foo: 206, bar: 52, Mean accumulator: Plain Result (i=11): 97.333");
 
-  std::vector<int> res1 = sig_vec(1);
+  auto res1 = sig_vec(1);
   result_stream << "Vector accumulator: Result (i=1): ";
   for (std::vector<int>::iterator i = res1.begin(); i != res1.end(); ++i)
     result_stream << *i << " ";
   util->check_result(result_stream,
     "foo: 4, A::foo: 6, bar: 2, Vector accumulator: Result (i=1): 4 6 2 ");
 
-  std::vector<int> res3 = sig_vec(3);
+  auto res3 = sig_vec(3);
   result_stream << "Vector accumulator: Result (i=3): ";
   for (std::vector<int>::iterator i = res3.begin(); i != res3.end(); ++i)
     result_stream << *i << " ";
diff --git a/tests/test_bind.cc b/tests/test_bind.cc
index bb62755..71a3866 100644
--- a/tests/test_bind.cc
+++ b/tests/test_bind.cc
@@ -85,7 +85,7 @@ private:
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_bind_ref.cc b/tests/test_bind_ref.cc
index 4cbeb5e..9b08486 100644
--- a/tests/test_bind_ref.cc
+++ b/tests/test_bind_ref.cc
@@ -32,12 +32,12 @@ void handler(Param& param)
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
 
-  sigc::slot<void, Param&> slot_full = sigc::ptr_fun(&handler);
+  auto slot_full = sigc::ptr_fun(&handler);
   sigc::slot<void> slot_bound;
 
   slot_bound();
diff --git a/tests/test_bind_refptr.cc b/tests/test_bind_refptr.cc
index 399b567..a432cf1 100644
--- a/tests/test_bind_refptr.cc
+++ b/tests/test_bind_refptr.cc
@@ -257,7 +257,7 @@ RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CastFrom>& src)
 template <class T_CppObject> inline
 void RefPtr<T_CppObject>::swap(RefPtr<T_CppObject>& other)
 {
-  T_CppObject *const temp = pCppObject_;
+  const auto temp = pCppObject_;
   pCppObject_ = other.pCppObject_;
   other.pCppObject_ = temp;
 }
@@ -342,7 +342,7 @@ template <class T_CppObject>
 inline
 RefPtr<T_CppObject> RefPtr<T_CppObject>::cast_dynamic(const RefPtr<T_CastFrom>& src)
 {
-  T_CppObject *const pCppObject = dynamic_cast<T_CppObject*>(src.operator->());
+  const auto pCppObject = dynamic_cast<T_CppObject*>(src.operator->());
 
   if(pCppObject)
     pCppObject->reference();
@@ -355,7 +355,7 @@ template <class T_CppObject>
 inline
 RefPtr<T_CppObject> RefPtr<T_CppObject>::cast_static(const RefPtr<T_CastFrom>& src)
 {
-  T_CppObject *const pCppObject = static_cast<T_CppObject*>(src.operator->());
+  const auto pCppObject = static_cast<T_CppObject*>(src.operator->());
 
   if(pCppObject)
     pCppObject->reference();
@@ -368,7 +368,7 @@ template <class T_CppObject>
 inline
 RefPtr<T_CppObject> RefPtr<T_CppObject>::cast_const(const RefPtr<T_CastFrom>& src)
 {
-  T_CppObject *const pCppObject = const_cast<T_CppObject*>(src.operator->());
+  const auto pCppObject = const_cast<T_CppObject*>(src.operator->());
 
   if(pCppObject)
     pCppObject->reference();
@@ -470,12 +470,12 @@ public:
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
 
-  Test* test = new Test;
+  auto test = new Test;
 
   test->action->emit_sig1(23);
   delete test;
diff --git a/tests/test_bind_return.cc b/tests/test_bind_return.cc
index 123240b..88c85ae 100644
--- a/tests/test_bind_return.cc
+++ b/tests/test_bind_return.cc
@@ -39,7 +39,7 @@ struct bar : public sigc::trackable
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_compose.cc b/tests/test_compose.cc
index 7de3d00..a626ba6 100644
--- a/tests/test_compose.cc
+++ b/tests/test_compose.cc
@@ -91,7 +91,7 @@ struct get
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_copy_invalid_slot.cc b/tests/test_copy_invalid_slot.cc
index 64ace36..b480a15 100644
--- a/tests/test_copy_invalid_slot.cc
+++ b/tests/test_copy_invalid_slot.cc
@@ -18,13 +18,13 @@ void Foo(sigc::trackable&)
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
 
   std::ostringstream pointer_stream;
-  sigc::trackable* t = new sigc::trackable();
+  auto t = new sigc::trackable();
   pointer_stream << t;
   result_stream << "sigc::trackable instance at " << pointer_stream.str();
   util->check_result(result_stream, "sigc::trackable instance at " + pointer_stream.str());
diff --git a/tests/test_cpp11_lambda.cc b/tests/test_cpp11_lambda.cc
index 6e5ccb5..e97b80e 100644
--- a/tests/test_cpp11_lambda.cc
+++ b/tests/test_cpp11_lambda.cc
@@ -141,7 +141,7 @@ void foo_group4(bar_group4&)
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -341,7 +341,7 @@ int main(int argc, char* argv[])
     book guest_book("charlie");
     //sl2 = sigc::group(&egon, sigc::ref(guest_book));
     // sl2 = std::bind(&egon, std::ref(guest_book)); // does not compile (gcc 4.6.3)
-    std::function<void()> fn2 = std::bind(&egon, std::ref(guest_book));
+    auto fn2 = std::bind(&egon, std::ref(guest_book));
     //sl2 = fn2; // no auto-disconnect
     sl2 = sigc::track_obj(fn2, guest_book);
     sl2();
diff --git a/tests/test_custom.cc b/tests/test_custom.cc
index 5d9be6d..8b4e0f6 100644
--- a/tests/test_custom.cc
+++ b/tests/test_custom.cc
@@ -15,7 +15,7 @@ std::ostringstream result_stream;
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_deduce_result_type.cc b/tests/test_deduce_result_type.cc
index db73eb4..b052ada 100644
--- a/tests/test_deduce_result_type.cc
+++ b/tests/test_deduce_result_type.cc
@@ -53,7 +53,7 @@ struct foo3 : public sigc::functor_base
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_disconnect.cc b/tests/test_disconnect.cc
index 745c5de..b3eab31 100644
--- a/tests/test_disconnect.cc
+++ b/tests/test_disconnect.cc
@@ -78,7 +78,7 @@ struct B : public sigc::trackable
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -128,7 +128,7 @@ int main(int argc, char* argv[])
   cona.disconnect();    // already disconnected -> legal with connection objects, however, nothing happens 
...
 
   result_stream << "deleting a signal during emission... ";
-  B* b = new B;
+  auto b = new B;
   b->emit();
   util->check_result(result_stream, "deleting a signal during emission... Good bye world!");
 
diff --git a/tests/test_disconnect_during_emit.cc b/tests/test_disconnect_during_emit.cc
index d6b0c90..0723242 100644
--- a/tests/test_disconnect_during_emit.cc
+++ b/tests/test_disconnect_during_emit.cc
@@ -31,7 +31,7 @@ public:
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_exception_catch.cc b/tests/test_exception_catch.cc
index c048f29..f8f6e02 100644
--- a/tests/test_exception_catch.cc
+++ b/tests/test_exception_catch.cc
@@ -67,7 +67,7 @@ struct my_catch
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_functor_trait.cc b/tests/test_functor_trait.cc
index 10a9fe1..b83e143 100644
--- a/tests/test_functor_trait.cc
+++ b/tests/test_functor_trait.cc
@@ -73,7 +73,7 @@ void bar(int)
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_hide.cc b/tests/test_hide.cc
index f2bfa30..c1cdad2 100644
--- a/tests/test_hide.cc
+++ b/tests/test_hide.cc
@@ -46,7 +46,7 @@ namespace sigc { SIGC_FUNCTOR_TRAIT(foo,bool) }
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_limit_reference.cc b/tests/test_limit_reference.cc
index 4fe9060..d72efd1 100644
--- a/tests/test_limit_reference.cc
+++ b/tests/test_limit_reference.cc
@@ -34,22 +34,22 @@ public:
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
 
-  Derived* instance = new Derived();
+  auto instance = new Derived();
   sigc::slot<void> handler = sigc::mem_fun(instance, &Derived::method);
   handler();
   util->check_result(result_stream, "method()");
 
-  sigc::slot<void> param =
+  auto param =
     sigc::bind(sigc::slot<void, Derived&>(), sigc::ref(*instance));
   param();
   util->check_result(result_stream, "");
 
-  sigc::slot<Derived> ret =
+  auto ret =
     sigc::bind_return(sigc::slot<void>(), sigc::ref(*instance));
   ret();
   util->check_result(result_stream, "");
diff --git a/tests/test_mem_fun.cc b/tests/test_mem_fun.cc
index 7a3bb11..32e568b 100644
--- a/tests/test_mem_fun.cc
+++ b/tests/test_mem_fun.cc
@@ -60,7 +60,7 @@ struct test
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -82,7 +82,7 @@ int main(int argc, char* argv[])
     util->check_result(result_stream, "test::foo_const(int 2)");
   }
   { /* test const with const object */
-    const test t = test();
+    const auto t = test();
     sigc::mem_fun(&test::foo_const)(t, 3);
     util->check_result(result_stream, "test::foo_const(int 3)");
 
@@ -106,7 +106,7 @@ int main(int argc, char* argv[])
     util->check_result(result_stream, "test::foo_const_volatile(double 5)");
   }
   { /* test const volatile with const object */
-    const test t = test();
+    const auto t = test();
     sigc::mem_fun(&test::foo_const_volatile)(t, 6);  // on reference
     util->check_result(result_stream, "test::foo_const_volatile(double 6)");
 
diff --git a/tests/test_ptr_fun.cc b/tests/test_ptr_fun.cc
index ed809de..d3cbf51 100644
--- a/tests/test_ptr_fun.cc
+++ b/tests/test_ptr_fun.cc
@@ -56,7 +56,7 @@ struct test
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_retype.cc b/tests/test_retype.cc
index 7c20e07..848731f 100644
--- a/tests/test_retype.cc
+++ b/tests/test_retype.cc
@@ -36,7 +36,7 @@ void bar(short s)
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_retype_return.cc b/tests/test_retype_return.cc
index 0125327..9026e32 100644
--- a/tests/test_retype_return.cc
+++ b/tests/test_retype_return.cc
@@ -45,7 +45,7 @@ struct bar : public sigc::trackable, public sigc::functor_base
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_signal.cc b/tests/test_signal.cc
index f8ccae0..163eb11 100644
--- a/tests/test_signal.cc
+++ b/tests/test_signal.cc
@@ -46,7 +46,7 @@ struct A : public sigc::trackable
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_size.cc b/tests/test_size.cc
index ce1f197..c902462 100644
--- a/tests/test_size.cc
+++ b/tests/test_size.cc
@@ -23,7 +23,7 @@ struct A
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_slot.cc b/tests/test_slot.cc
index da1afa2..05df99a 100644
--- a/tests/test_slot.cc
+++ b/tests/test_slot.cc
@@ -42,7 +42,7 @@ public:
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_slot_disconnect.cc b/tests/test_slot_disconnect.cc
index 515c0aa..13d42e0 100644
--- a/tests/test_slot_disconnect.cc
+++ b/tests/test_slot_disconnect.cc
@@ -27,7 +27,7 @@ void Bar()
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_track_obj.cc b/tests/test_track_obj.cc
index 8ef6596..a6ce6ed 100644
--- a/tests/test_track_obj.cc
+++ b/tests/test_track_obj.cc
@@ -121,7 +121,7 @@ void foo_group4(bar_group4&)
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -140,7 +140,7 @@ int main(int argc, char* argv[])
 
   // Allocate on the heap. valgrind can then find erroneous memory accesses.
   // (There should be none, of course.)
-  sigc::slot<std::string, int, std::string>* psl2 = new sigc::slot<std::string, int, std::string>;
+  auto psl2 = new sigc::slot<std::string, int, std::string>;
   bar_group4* pbar4 = new bar_group4;
   book* pbook4 = new book("A Book");
   *psl2 = sigc::track_obj(Functor2(*pbar4, *pbook4), *pbar4, *pbook4);
diff --git a/tests/test_trackable.cc b/tests/test_trackable.cc
index 7093ce7..159aeeb 100644
--- a/tests/test_trackable.cc
+++ b/tests/test_trackable.cc
@@ -29,7 +29,7 @@ public:
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/test_visit_each.cc b/tests/test_visit_each.cc
index 0b0f5eb..56c44fc 100644
--- a/tests/test_visit_each.cc
+++ b/tests/test_visit_each.cc
@@ -158,7 +158,7 @@ struct visitor<ns1::MyAdaptor1<T_functor> >
 
 int main(int argc, char* argv[])
 {
-  TestUtilities* util = TestUtilities::get_instance();
+  auto util = TestUtilities::get_instance();
 
   if (!util->check_command_args(argc, argv))
     return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]