Reformat to suit clang-format-12
authorKjell Ahlstedt <[email protected]>
Sun, 26 Dec 2021 17:27:07 +0000 (26 18:27 +0100)
committerKjell Ahlstedt <[email protected]>
Sun, 26 Dec 2021 17:27:07 +0000 (26 18:27 +0100)
tests/test_bind.cc
tests/test_cpp11_lambda.cc
tests/test_member_method_trait.cc
tests/test_signal.cc
tests/test_track_obj.cc

index fa8537b..0cd192c 100644 (file)
@@ -70,7 +70,7 @@ struct book : public sigc::trackable
   book& operator=(book&&) = delete;
 
   std::string& get_name() { return name_; }
-  operator std::string &() { return get_name(); }
+  operator std::string&() { return get_name(); }
 
 private:
   std::string name_;
index a8e90b2..ed12536 100644 (file)
@@ -88,7 +88,7 @@ egon(std::string& str)
 struct book : public sigc::trackable
 {
   explicit book(const std::string& name) : name_(name) {}
-  operator std::string &() { return name_; }
+  operator std::string&() { return name_; }
   std::string name_;
 };
 
@@ -184,8 +184,8 @@ main(int argc, char* argv[])
   // See https://bugzilla.gnome.org/show_bug.cgi?id=669128
   //  std::cout << "((++_1)*2)(ref(a)): " << ((++_1)*2)(std::ref(a));
   //  std::cout << "; a: "                << a                    << std::endl;
-  result_stream << ([](std::reference_wrapper<int> x) -> int { return ++x * 2; }(
-                                                        std::ref(a_outer)));
+  result_stream << ([](std::reference_wrapper<int> x) -> int
+    { return ++x * 2; }(std::ref(a_outer)));
   result_stream << " " << a_outer;
   util->check_result(result_stream, "4 2");
   result_stream << ([](int& x) -> int { return ++x * 2; }(a_outer));
@@ -200,8 +200,8 @@ main(int argc, char* argv[])
 
   //  std::cout << "((--(*(&_1)))*2)(ref(a)): " << ((--(*(&_1)))*2)(std::ref(a));
   //  std::cout << "; a: "                << a                    << std::endl;
-  result_stream << ([](std::reference_wrapper<int> x) -> int { return --(*(&x)) * 2; }(
-                                                        std::ref(a_outer)));
+  result_stream << ([](std::reference_wrapper<int> x) -> int
+    { return --(*(&x)) * 2; }(std::ref(a_outer)));
   result_stream << " " << a_outer;
   util->check_result(result_stream, "6 3");
   result_stream << ([](int& x) -> int { return --(*(&x)) * 2; }(a_outer));
@@ -234,8 +234,8 @@ main(int argc, char* argv[])
   // std::cout << "(var(c) = (var(a) = _1, var(b) = _2))(2,3): "
   //          << (sigc::var(c) = (sigc::var(a) = _1, sigc::var(b) = _2))(2,3);
   // std::cout << "; a: " << a << "; b: " << b << "; c: " << c << std::endl;
-  result_stream << ([&a_outer, &b_outer, &c_outer](
-                      int x, int y) -> int { return c_outer = (a_outer = x, b_outer = y); }(2, 3));
+  result_stream << ([&a_outer, &b_outer, &c_outer](int x, int y) -> int
+    { return c_outer = (a_outer = x, b_outer = y); }(2, 3));
   result_stream << " " << a_outer << " " << b_outer << " " << c_outer;
   util->check_result(result_stream, "3 2 3 3");
 
index 376d685..bc5c450 100644 (file)
@@ -60,8 +60,8 @@ test_member_method_is_volatile()
     sigc::internal::member_method_is_volatile<decltype(&Something::some_volatile_func)>::value,
     "member_method_is_const failed to identify a volatile member method.");
 
-  static_assert(sigc::internal::member_method_is_volatile<decltype(
-                  &Something::some_const_volatile_func)>::value,
+  static_assert(sigc::internal::member_method_is_volatile<
+                  decltype(&Something::some_const_volatile_func)>::value,
     "member_method_is_const failed to identify a volatile member method.");
 }
 
index b5fdaf2..d050558 100644 (file)
@@ -117,10 +117,12 @@ test_clear_called_in_signal_handler()
 {
   sigc::signal<void()> sig;
   sig.connect([]() { result_stream << ", slot 1, "; });
-  sig.connect([&sig]() {
-    sig.clear();
-    result_stream << "slot 2, ";
-  });
+  sig.connect(
+    [&sig]()
+    {
+      sig.clear();
+      result_stream << "slot 2, ";
+    });
   sig.connect([]() { result_stream << "slot 3, "; });
   result_stream << sig.size();
   sig.emit();
index cf18b7b..aefdb07 100644 (file)
@@ -40,8 +40,8 @@ std::ostringstream result_stream;
 struct book : public sigc::trackable
 {
   explicit book(const std::string& name) : name_(name) {}
-  operator std::string &() { return name_; }
-  operator const std::string &() const { return name_; }
+  operator std::string&() { return name_; }
+  operator const std::string&() const { return name_; }
   std::string name_;
 };