mirror of
				https://github.com/zeromq/libzmq.git
				synced 2025-10-30 05:29:43 +01:00 
			
		
		
		
	Problem: formatting errors with clang-format-11
Solution: apply update
This commit is contained in:
		| @@ -197,7 +197,10 @@ class atomic_counter_t | ||||
| #endif | ||||
|     } | ||||
|  | ||||
|     integer_t get () const ZMQ_NOEXCEPT { return _value; } | ||||
|     integer_t get () const ZMQ_NOEXCEPT | ||||
|     { | ||||
|         return _value; | ||||
|     } | ||||
|  | ||||
|   private: | ||||
| #if defined ZMQ_ATOMIC_COUNTER_CXX11 | ||||
|   | ||||
| @@ -182,7 +182,10 @@ struct blob_t | ||||
|         return *this; | ||||
|     } | ||||
| #else | ||||
|     blob_t (const blob_t &other) : _owned (false) { set_deep_copy (other); } | ||||
|     blob_t (const blob_t &other) : _owned (false) | ||||
|     { | ||||
|         set_deep_copy (other); | ||||
|     } | ||||
|     blob_t &operator= (const blob_t &other) | ||||
|     { | ||||
|         if (this != &other) { | ||||
|   | ||||
| @@ -58,7 +58,10 @@ class mailbox_t ZMQ_FINAL : public i_mailbox | ||||
|     // close the file descriptors in the signaller. This is used in a forked | ||||
|     // child process to close the file descriptors so that they do not interfere | ||||
|     // with the context in the parent process. | ||||
|     void forked () ZMQ_FINAL { _signaler.forked (); } | ||||
|     void forked () ZMQ_FINAL | ||||
|     { | ||||
|         _signaler.forked (); | ||||
|     } | ||||
| #endif | ||||
|  | ||||
|   private: | ||||
|   | ||||
| @@ -69,13 +69,19 @@ template <typename T> class ypipe_conflate_t ZMQ_FINAL : public ypipe_base_t<T> | ||||
| #endif | ||||
|  | ||||
|     // There are no incomplete items for conflate ypipe | ||||
|     bool unwrite (T *) { return false; } | ||||
|     bool unwrite (T *) | ||||
|     { | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
|     //  Flush is no-op for conflate ypipe. Reader asleep behaviour | ||||
|     //  is as of the usual ypipe. | ||||
|     //  Returns false if the reader thread is sleeping. In that case, | ||||
|     //  caller is obliged to wake the reader up before using the pipe again. | ||||
|     bool flush () { return reader_awake; } | ||||
|     bool flush () | ||||
|     { | ||||
|         return reader_awake; | ||||
|     } | ||||
|  | ||||
|     //  Check whether item is available for reading. | ||||
|     bool check_read () | ||||
| @@ -100,7 +106,10 @@ template <typename T> class ypipe_conflate_t ZMQ_FINAL : public ypipe_base_t<T> | ||||
|     //  Applies the function fn to the first element in the pipe | ||||
|     //  and returns the value returned by the fn. | ||||
|     //  The pipe mustn't be empty or the function crashes. | ||||
|     bool probe (bool (*fn_) (const T &)) { return dbuffer.probe (fn_); } | ||||
|     bool probe (bool (*fn_) (const T &)) | ||||
|     { | ||||
|         return dbuffer.probe (fn_); | ||||
|     } | ||||
|  | ||||
|   protected: | ||||
|     dbuffer_t<T> dbuffer; | ||||
|   | ||||
| @@ -273,7 +273,10 @@ void test_blocking (const char *bind_endpoint_) | ||||
|         test_defaults_small (bind_endpoint);                                   \ | ||||
|     }                                                                          \ | ||||
|                                                                                \ | ||||
|     void test_blocking_##name () { test_blocking (bind_endpoint); } | ||||
|     void test_blocking_##name ()                                               \ | ||||
|     {                                                                          \ | ||||
|         test_blocking (bind_endpoint);                                         \ | ||||
|     } | ||||
|  | ||||
| #define RUN_REGULAR_TEST_CASES(name)                                           \ | ||||
|     RUN_TEST (test_defaults_large_##name);                                     \ | ||||
|   | ||||
| @@ -333,7 +333,10 @@ void call_poller_wait_all_null_event_fails_event_count_zero (void *poller_) | ||||
| } | ||||
|  | ||||
| #define TEST_CASE_FUNC_PARAM(name, func)                                       \ | ||||
|     void test_##name () { func (name); } | ||||
|     void test_##name ()                                                        \ | ||||
|     {                                                                          \ | ||||
|         func (name);                                                           \ | ||||
|     } | ||||
|  | ||||
| TEST_CASE_FUNC_PARAM (call_poller_wait_null_event_fails, test_with_valid_poller) | ||||
| TEST_CASE_FUNC_PARAM (call_poller_wait_all_null_event_fails_event_count_nonzero, | ||||
|   | ||||
| @@ -41,7 +41,10 @@ | ||||
|  | ||||
| // Helper macro to define the v4/v6 function pairs | ||||
| #define MAKE_TEST_V4V6(_test)                                                  \ | ||||
|     static void _test##_ipv4 () { _test (false); }                             \ | ||||
|     static void _test##_ipv4 ()                                                \ | ||||
|     {                                                                          \ | ||||
|         _test (false);                                                         \ | ||||
|     }                                                                          \ | ||||
|                                                                                \ | ||||
|     static void _test##_ipv6 ()                                                \ | ||||
|     {                                                                          \ | ||||
|   | ||||
| @@ -185,7 +185,10 @@ void test_block_on_send_no_peers (const char *bind_address_) | ||||
|     {                                                                          \ | ||||
|         test_round_robin_out (bind_address);                                   \ | ||||
|     }                                                                          \ | ||||
|     void test_fair_queue_in_##name () { test_fair_queue_in (bind_address); }   \ | ||||
|     void test_fair_queue_in_##name ()                                          \ | ||||
|     {                                                                          \ | ||||
|         test_fair_queue_in (bind_address);                                     \ | ||||
|     }                                                                          \ | ||||
|     void test_block_on_send_no_peers_##name ()                                 \ | ||||
|     {                                                                          \ | ||||
|         test_block_on_send_no_peers (bind_address);                            \ | ||||
|   | ||||
| @@ -168,7 +168,10 @@ void test_destroy_queue_on_disconnect (const char *bind_address_) | ||||
| } | ||||
|  | ||||
| #define TEST_SUITE(name, bind_address)                                         \ | ||||
|     void test_fair_queue_in_##name () { test_fair_queue_in (bind_address); }   \ | ||||
|     void test_fair_queue_in_##name ()                                          \ | ||||
|     {                                                                          \ | ||||
|         test_fair_queue_in (bind_address);                                     \ | ||||
|     }                                                                          \ | ||||
|     void test_destroy_queue_on_disconnect_##name ()                            \ | ||||
|     {                                                                          \ | ||||
|         test_destroy_queue_on_disconnect (bind_address);                       \ | ||||
|   | ||||
| @@ -83,7 +83,10 @@ void test_bad_filter_string (const char *const filter_) | ||||
| } | ||||
|  | ||||
| #define TEST_BAD_FILTER_STRING(case, filter)                                   \ | ||||
|     void test_bad_filter_string_##case () { test_bad_filter_string (filter); } | ||||
|     void test_bad_filter_string_##case ()                                      \ | ||||
|     {                                                                          \ | ||||
|         test_bad_filter_string (filter);                                       \ | ||||
|     } | ||||
|  | ||||
| TEST_BAD_FILTER_STRING (foo, "foo") | ||||
| TEST_BAD_FILTER_STRING (zeros_foo, "0.0.0.0foo") | ||||
|   | ||||
| @@ -197,8 +197,14 @@ void recv_array_expect_success (void *socket_, | ||||
| // Use this is an test executable to perform a default setup and teardown of | ||||
| // the test context, which is appropriate for many libzmq test cases. | ||||
| #define SETUP_TEARDOWN_TESTCONTEXT                                             \ | ||||
|     void setUp () { setup_test_context (); }                                   \ | ||||
|     void tearDown () { teardown_test_context (); } | ||||
|     void setUp ()                                                              \ | ||||
|     {                                                                          \ | ||||
|         setup_test_context ();                                                 \ | ||||
|     }                                                                          \ | ||||
|     void tearDown ()                                                           \ | ||||
|     {                                                                          \ | ||||
|         teardown_test_context ();                                              \ | ||||
|     } | ||||
|  | ||||
| // The maximum number of sockets that can be managed by the test context. | ||||
| #define MAX_TEST_SOCKETS 128 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Luca Boccassi
					Luca Boccassi