From 6d73dd94b26f73bbf96a4eedfa4f81a583aa4ee4 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 2 Sep 2026 09:26:00 +0200 Subject: [PATCH] Fix indentation of custom_object_type per astyle The one-line function bodies in the composition-based no_key_compare_map (7c39f3227) do not match the project's Allman brace style, which the ci_test_amalgamation job enforces with astyle. Reformatted with the pinned astyle 3.4.13; no functional change. Signed-off-by: Niels Lohmann --- tests/src/unit-custom-object-type.cpp | 110 ++++++++++++++++++++------ 1 file changed, 88 insertions(+), 22 deletions(-) diff --git a/tests/src/unit-custom-object-type.cpp b/tests/src/unit-custom-object-type.cpp index 65d953c83..ffdf94fa5 100644 --- a/tests/src/unit-custom-object-type.cpp +++ b/tests/src/unit-custom-object-type.cpp @@ -59,42 +59,108 @@ class no_key_compare_map template no_key_compare_map(InputIt first, InputIt last) : data(first, last) {} - iterator begin() { return data.begin(); } - iterator end() { return data.end(); } - const_iterator begin() const { return data.begin(); } - const_iterator end() const { return data.end(); } - const_iterator cbegin() const { return data.cbegin(); } - const_iterator cend() const { return data.cend(); } + iterator begin() + { + return data.begin(); + } + iterator end() + { + return data.end(); + } + const_iterator begin() const + { + return data.begin(); + } + const_iterator end() const + { + return data.end(); + } + const_iterator cbegin() const + { + return data.cbegin(); + } + const_iterator cend() const + { + return data.cend(); + } - bool empty() const { return data.empty(); } - size_type size() const { return data.size(); } - size_type max_size() const { return data.max_size(); } - void clear() { data.clear(); } + bool empty() const + { + return data.empty(); + } + size_type size() const + { + return data.size(); + } + size_type max_size() const + { + return data.max_size(); + } + void clear() + { + data.clear(); + } - iterator find(const key_type& key) { return data.find(key); } - const_iterator find(const key_type& key) const { return data.find(key); } - size_type count(const key_type& key) const { return data.count(key); } + iterator find(const key_type& key) + { + return data.find(key); + } + const_iterator find(const key_type& key) const + { + return data.find(key); + } + size_type count(const key_type& key) const + { + return data.count(key); + } std::pair emplace(const key_type& key, const mapped_type& value) { return data.emplace(key, value); } - std::pair insert(const value_type& value) { return data.insert(value); } + std::pair insert(const value_type& value) + { + return data.insert(value); + } template - void insert(InputIt first, InputIt last) { data.insert(first, last); } + void insert(InputIt first, InputIt last) + { + data.insert(first, last); + } - mapped_type& operator[](const key_type& key) { return data[key]; } + mapped_type& operator[](const key_type& key) + { + return data[key]; + } - mapped_type& at(const key_type& key) { return data.at(key); } - const mapped_type& at(const key_type& key) const { return data.at(key); } + mapped_type& at(const key_type& key) + { + return data.at(key); + } + const mapped_type& at(const key_type& key) const + { + return data.at(key); + } - iterator erase(iterator pos) { return data.erase(pos); } - iterator erase(iterator first, iterator last) { return data.erase(first, last); } - size_type erase(const key_type& key) { return data.erase(key); } + iterator erase(iterator pos) + { + return data.erase(pos); + } + iterator erase(iterator first, iterator last) + { + return data.erase(first, last); + } + size_type erase(const key_type& key) + { + return data.erase(key); + } - void swap(no_key_compare_map& other) { data.swap(other.data); } + void swap(no_key_compare_map& other) + { + data.swap(other.data); + } friend bool operator==(const no_key_compare_map& lhs, const no_key_compare_map& rhs) {