diff options
author | Abseil Team <absl-team@google.com> | 2022-03-15 20:41:41 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-03-15 20:42:11 (GMT) |
commit | b007c54f2944e193ac44fba1bc997cb65826a0b9 (patch) | |
tree | 3ea747410f93a40da0df6f8777e2ba551761cf8c /googletest/samples/sample3-inl.h | |
parent | 8a422b8398dd7e2b6b3e1fcbfbceb43ead2a5761 (diff) | |
download | googletest-b007c54f2944e193ac44fba1bc997cb65826a0b9.zip googletest-b007c54f2944e193ac44fba1bc997cb65826a0b9.tar.gz googletest-b007c54f2944e193ac44fba1bc997cb65826a0b9.tar.bz2 |
Running clang-format over all of GoogleTest
A few tests are examining code locations and looking af the resulting line
numbers to verify that GoogleTest shows those to users correctly. Some of those
locations change when clang-format is run. For those locations, I've wrapped
portions in:
// clang-format off
...
// clang-format on
There may be other locations that are currently not tickled by running
clang-format.
PiperOrigin-RevId: 434844712
Change-Id: I3a9f0a6f39eff741c576b6de389bef9b1d11139d
Diffstat (limited to 'googletest/samples/sample3-inl.h')
-rw-r--r-- | googletest/samples/sample3-inl.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/googletest/samples/sample3-inl.h b/googletest/samples/sample3-inl.h index 659e0f0..bc3ffb9 100644 --- a/googletest/samples/sample3-inl.h +++ b/googletest/samples/sample3-inl.h @@ -34,7 +34,6 @@ #include <stddef.h> - // Queue is a simple queue implemented as a singled-linked list. // // The element type must support copy constructor. @@ -62,7 +61,7 @@ class QueueNode { : element_(an_element), next_(nullptr) {} // We disable the default assignment operator and copy c'tor. - const QueueNode& operator = (const QueueNode&); + const QueueNode& operator=(const QueueNode&); QueueNode(const QueueNode&); E element_; @@ -84,7 +83,7 @@ class Queue { // 1. Deletes every node. QueueNode<E>* node = head_; QueueNode<E>* next = node->next(); - for (; ;) { + for (;;) { delete node; node = next; if (node == nullptr) break; @@ -162,11 +161,11 @@ class Queue { private: QueueNode<E>* head_; // The first node of the queue. QueueNode<E>* last_; // The last node of the queue. - size_t size_; // The number of elements in the queue. + size_t size_; // The number of elements in the queue. // We disallow copying a queue. Queue(const Queue&); - const Queue& operator = (const Queue&); + const Queue& operator=(const Queue&); }; #endif // GOOGLETEST_SAMPLES_SAMPLE3_INL_H_ |