From 325afb86b9e62e3e30692db9c801e58697744294 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 11 Nov 2023 17:53:25 +0000 Subject: [PATCH] Apply clang-format --- Components/FlightControl/MEVManager.cpp | 10 +- Components/Utils.hpp | 20 ++- .../include/etl/array_view.h | 80 ++++++++--- .../include/etl/basic_string.h | 104 ++++++++++---- .../include/etl/bit_stream.h | 12 +- .../include/etl/callback_timer.h | 16 ++- .../include/etl/circular_buffer.h | 48 +++++-- .../include/etl/debug_count.h | 20 ++- .../include/etl/deprecated/factory.h | 20 ++- .../include/etl/deque.h | 56 ++++++-- .../include/etl/endianness.h | 8 +- .../include/etl/exception.h | 8 +- .../include/etl/flat_map.h | 92 +++++++++---- .../include/etl/flat_multimap.h | 88 +++++++++--- .../include/etl/flat_multiset.h | 88 +++++++++--- .../include/etl/flat_set.h | 88 +++++++++--- .../include/etl/forward_list.h | 68 +++++++--- .../include/etl/fsm.h | 12 +- .../include/etl/generators/fsm_generator.h | 12 +- .../etl/generators/type_traits_generator.h | 2 +- .../include/etl/histogram.h | 60 ++++++-- .../include/etl/indirect_vector.h | 108 +++++++++++---- .../include/etl/intrusive_forward_list.h | 20 ++- .../include/etl/intrusive_list.h | 28 +++- .../include/etl/intrusive_queue.h | 8 +- .../include/etl/intrusive_stack.h | 8 +- .../include/etl/ipool.h | 24 +++- .../include/etl/limits.h | 2 +- .../include/etl/list.h | 68 +++++++--- .../include/etl/map.h | 36 +++-- .../include/etl/mem_cast.h | 28 +++- .../include/etl/memory.h | 48 +++++-- .../include/etl/message_packet.h | 128 +++++++++++++----- .../include/etl/multimap.h | 40 ++++-- .../include/etl/multiset.h | 40 ++++-- .../include/etl/murmur3.h | 8 +- .../include/etl/optional.h | 8 +- .../include/etl/packet.h | 12 +- .../include/etl/pool.h | 8 +- .../include/etl/priority_queue.h | 28 +++- .../include/etl/private/bitset_legacy.h | 28 +++- .../include/etl/private/delegate_cpp03.h | 16 ++- .../include/etl/private/delegate_cpp11.h | 4 +- .../include/etl/private/pvoidvector.h | 24 +++- .../include/etl/private/variant_legacy.h | 44 ++++-- .../include/etl/private/variant_variadic.h | 4 +- .../include/etl/queue.h | 16 ++- .../include/etl/queue_lockable.h | 16 ++- .../include/etl/queue_mpmc_mutex.h | 4 +- .../include/etl/queue_spsc_isr.h | 44 ++++-- .../include/etl/queue_spsc_locked.h | 12 +- .../include/etl/reference_flat_map.h | 64 ++++++--- .../include/etl/reference_flat_multimap.h | 64 ++++++--- .../include/etl/reference_flat_multiset.h | 32 +++-- .../include/etl/reference_flat_set.h | 36 +++-- .../include/etl/set.h | 36 +++-- .../include/etl/shared_message.h | 4 +- .../include/etl/stack.h | 16 ++- .../include/etl/successor.h | 8 +- .../include/etl/type_traits.h | 2 +- .../include/etl/unordered_map.h | 72 +++++++--- .../include/etl/unordered_multimap.h | 72 +++++++--- .../include/etl/unordered_multiset.h | 72 +++++++--- .../include/etl/unordered_set.h | 72 +++++++--- .../include/etl/user_type.h | 12 +- .../include/etl/variant_pool.h | 8 +- .../include/etl/vector.h | 100 ++++++++++---- 67 files changed, 1816 insertions(+), 628 deletions(-) diff --git a/Components/FlightControl/MEVManager.cpp b/Components/FlightControl/MEVManager.cpp index f1543cba..f2e30bfd 100644 --- a/Components/FlightControl/MEVManager.cpp +++ b/Components/FlightControl/MEVManager.cpp @@ -1,24 +1,24 @@ - #include "MEVManager.hpp" +#include "MEVManager.hpp" #include "CommandMessage.hpp" - #include "PBBRxProtocolTask.hpp" +#include "PBBRxProtocolTask.hpp" MEVManager::MEVState MEVManager::shouldMevBeOpen = INDETERMINATE; void MEVManager::OpenMEV() { - shouldMevBeOpen = OPEN; + shouldMevBeOpen = OPEN; PBBRxProtocolTask::SendPBBCommand(Proto::PBBCommand::Command::PBB_OPEN_MEV); } void MEVManager::CloseMEV() { shouldMevBeOpen = CLOSE; - PBBRxProtocolTask::SendPBBCommand( + PBBRxProtocolTask::SendPBBCommand( Proto::PBBCommand::Command::PBB_CLOSE_MEV); } void MEVManager::HandleMEVTelemetry(Proto::TelemetryMessage& msg) { if (shouldMevBeOpen == INDETERMINATE || !msg.has_mevstate()) { // Do nothing - return; + return; } if (!msg.mevstate().mev_open() && shouldMevBeOpen == OPEN) { diff --git a/Components/Utils.hpp b/Components/Utils.hpp index 75037e80..febec89d 100644 --- a/Components/Utils.hpp +++ b/Components/Utils.hpp @@ -17,27 +17,23 @@ constexpr uint16_t ERRVAL = 0xDEAD; // Error value for debugging // Math macros and conversions constexpr double MATH_PI = 3.14159265358979323846; #define DEG_TO_RAD(degrees) \ - ((degrees) * \ - 0.01745329251994329576923690768489f) // Degrees to radians (PI/180) + ((degrees)*0.01745329251994329576923690768489f) // Degrees to radians (PI/180) #define RAD_TO_DEG(radians) \ - ((radians) * \ - 57.295779513082320876798154814105f) // Radians to degrees (180/PI) -#define MILLIG_TO_MPS2(millig) ((millig) * 9.80665f) // Milli-g to m/s^2 + ((radians)*57.295779513082320876798154814105f) // Radians to degrees (180/PI) +#define MILLIG_TO_MPS2(millig) ((millig)*9.80665f) // Milli-g to m/s^2 #define MILLIDPS_TO_RADPS(millidps) \ - ((millidps) * \ - 0.00017453292519943295769236907684886f) // Milli-degrees per second to radians per second (PI/180/1000) -#define LBS_TO_GRAMS(lbs) ((lbs) * 453.59237f) // Pounds to grams + ((millidps)*0.00017453292519943295769236907684886f) // Milli-degrees per second to radians per second (PI/180/1000) +#define LBS_TO_GRAMS(lbs) ((lbs)*453.59237f) // Pounds to grams #define GET_COBS_MAX_LEN(len) \ (((len) + ((len) / 254) + 1) + \ 1) // Get the max length of a COBS encoded string, we add 1 for the 0x00 delimiter // Conversion macros (SYSTEM) #define TICKS_TO_MS(time_ticks) \ - ((time_ticks) * 1000 / \ + ((time_ticks)*1000 / \ osKernelSysTickFrequency) // System ticks to milliseconds -#define MS_TO_TICKS(time_ms) \ - ((time_ms) * osKernelSysTickFrequency / \ - 1000) // Milliseconds to system ticks +#define MS_TO_TICKS(time_ms) \ + ((time_ms)*osKernelSysTickFrequency / 1000) // Milliseconds to system ticks // System Time Macros constexpr uint32_t MAX_DELAY_MS = TICKS_TO_MS(portMAX_DELAY); diff --git a/Components/_Libraries/embedded-template-library/include/etl/array_view.h b/Components/_Libraries/embedded-template-library/include/etl/array_view.h index dd46b298..7d513659 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/array_view.h +++ b/Components/_Libraries/embedded-template-library/include/etl/array_view.h @@ -274,67 +274,93 @@ class array_view { //************************************************************************* /// Returns a reference to the first element. //************************************************************************* - reference front() { return *mbegin; } + reference front() { + return *mbegin; + } //************************************************************************* /// Returns a const reference to the first element. //************************************************************************* - const_reference front() const { return *mbegin; } + const_reference front() const { + return *mbegin; + } //************************************************************************* /// Returns a reference to the last element. //************************************************************************* - reference back() { return *(mend - 1); } + reference back() { + return *(mend - 1); + } //************************************************************************* /// Returns a const reference to the last element. //************************************************************************* - const_reference back() const { return *(mend - 1); } + const_reference back() const { + return *(mend - 1); + } //************************************************************************* /// Returns a pointer to the first element of the internal storage. //************************************************************************* - pointer data() { return mbegin; } + pointer data() { + return mbegin; + } //************************************************************************* /// Returns a const pointer to the first element of the internal storage. //************************************************************************* - const_pointer data() const { return mbegin; } + const_pointer data() const { + return mbegin; + } //************************************************************************* /// Returns an iterator to the beginning of the array. //************************************************************************* - iterator begin() { return mbegin; } + iterator begin() { + return mbegin; + } //************************************************************************* /// Returns a const iterator to the beginning of the array. //************************************************************************* - const_iterator begin() const { return mbegin; } + const_iterator begin() const { + return mbegin; + } //************************************************************************* /// Returns a const iterator to the beginning of the array. //************************************************************************* - const_iterator cbegin() const { return mbegin; } + const_iterator cbegin() const { + return mbegin; + } //************************************************************************* /// Returns an iterator to the end of the array. //************************************************************************* - iterator end() { return mend; } + iterator end() { + return mend; + } //************************************************************************* /// Returns a const iterator to the end of the array. //************************************************************************* - const_iterator end() const { return mend; } + const_iterator end() const { + return mend; + } //************************************************************************* // Returns a const iterator to the end of the array. //************************************************************************* - const_iterator cend() const { return mend; } + const_iterator cend() const { + return mend; + } //************************************************************************* // Returns an reverse iterator to the reverse beginning of the array. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(mend); } + reverse_iterator rbegin() { + return reverse_iterator(mend); + } //************************************************************************* /// Returns a const reverse iterator to the reverse beginning of the array. @@ -353,7 +379,9 @@ class array_view { //************************************************************************* /// Returns a reverse iterator to the end of the array. //************************************************************************* - reverse_iterator rend() { return reverse_iterator(mbegin); } + reverse_iterator rend() { + return reverse_iterator(mbegin); + } //************************************************************************* /// Returns a const reverse iterator to the end of the array. @@ -372,17 +400,23 @@ class array_view { //************************************************************************* /// Returns true if the array size is zero. //************************************************************************* - bool empty() const { return (mbegin == mend); } + bool empty() const { + return (mbegin == mend); + } //************************************************************************* /// Returns the size of the array. //************************************************************************* - size_t size() const { return (mend - mbegin); } + size_t size() const { + return (mend - mbegin); + } //************************************************************************* /// Returns the maximum possible size of the array. //************************************************************************* - size_t max_size() const { return size(); } + size_t max_size() const { + return size(); + } //************************************************************************* /// Assign from a view. @@ -415,13 +449,17 @@ class array_view { //************************************************************************* /// Returns a reference to the indexed value. //************************************************************************* - reference operator[](const size_t i) { return mbegin[i]; } + reference operator[](const size_t i) { + return mbegin[i]; + } #endif //************************************************************************* /// Returns a const reference to the indexed value. //************************************************************************* - const_reference operator[](const size_t i) const { return mbegin[i]; } + const_reference operator[](const size_t i) const { + return mbegin[i]; + } #if defined(ETL_ARRAY_VIEW_IS_MUTABLE) //************************************************************************* @@ -478,7 +516,9 @@ class array_view { //************************************************************************* /// Fills the array. //************************************************************************* - void fill(const T& value) { etl::fill(begin(), end(), value); } + void fill(const T& value) { + etl::fill(begin(), end(), value); + } //************************************************************************* /// Equality for array views. diff --git a/Components/_Libraries/embedded-template-library/include/etl/basic_string.h b/Components/_Libraries/embedded-template-library/include/etl/basic_string.h index b7cef91f..0557c7ad 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/basic_string.h +++ b/Components/_Libraries/embedded-template-library/include/etl/basic_string.h @@ -136,43 +136,57 @@ class string_base { /// Gets the current size of the string. ///\return The current size of the string. //************************************************************************* - size_type size() const { return current_size; } + size_type size() const { + return current_size; + } //************************************************************************* /// Gets the current size of the string. ///\return The current size of the string. //************************************************************************* - size_type length() const { return current_size; } + size_type length() const { + return current_size; + } //************************************************************************* /// Checks the 'empty' state of the string. ///\return true if empty. //************************************************************************* - bool empty() const { return (current_size == 0); } + bool empty() const { + return (current_size == 0); + } //************************************************************************* /// Checks the 'full' state of the string. ///\return true if full. //************************************************************************* - bool full() const { return current_size == CAPACITY; } + bool full() const { + return current_size == CAPACITY; + } //************************************************************************* /// Returns the capacity of the string. ///\return The capacity of the string. //************************************************************************* - size_type capacity() const { return CAPACITY; } + size_type capacity() const { + return CAPACITY; + } //************************************************************************* /// Returns the maximum possible size of the string. ///\return The maximum size of the string. //************************************************************************* - size_type max_size() const { return CAPACITY; } + size_type max_size() const { + return CAPACITY; + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_type available() const { return max_size() - size(); } + size_type available() const { + return max_size() - size(); + } #if ETL_HAS_STRING_TRUNCATION_CHECKS //************************************************************************* @@ -181,30 +195,40 @@ class string_base { ///\return Whether the string was truncated by the last operation. //************************************************************************* ETL_DEPRECATED - bool truncated() const { return flags.test(); } + bool truncated() const { + return flags.test(); + } //************************************************************************* /// Returns whether the string was truncated by the last operation. ///\return Whether the string was truncated by the last operation. //************************************************************************* - bool is_truncated() const { return flags.test(); } + bool is_truncated() const { + return flags.test(); + } //************************************************************************* /// Clears the 'truncated' flag. //************************************************************************* - void clear_truncated() { flags.set(); } + void clear_truncated() { + flags.set(); + } #endif #if ETL_HAS_STRING_CLEAR_AFTER_USE //************************************************************************* /// Sets the 'secure' flag to the requested state. //************************************************************************* - void set_secure() { flags.set(); } + void set_secure() { + flags.set(); + } //************************************************************************* /// Gets the 'secure' state flag. //************************************************************************* - bool is_secure() const { return flags.test(); } + bool is_secure() const { + return flags.test(); + } #endif protected: @@ -217,7 +241,9 @@ class string_base { //************************************************************************* /// Sets the 'truncated' flag. //************************************************************************* - void set_truncated(bool status) { flags.set(status); } + void set_truncated(bool status) { + flags.set(status); + } #endif //************************************************************************* @@ -392,14 +418,18 @@ class ibasic_string : public etl::string_base { ///\param i The index. ///\return A reference to the value at index 'i' //********************************************************************* - reference operator[](size_type i) { return p_buffer[i]; } + reference operator[](size_type i) { + return p_buffer[i]; + } //********************************************************************* /// Returns a const reference to the value at index 'i' ///\param i The index. ///\return A const reference to the value at index 'i' //********************************************************************* - const_reference operator[](size_type i) const { return p_buffer[i]; } + const_reference operator[](size_type i) const { + return p_buffer[i]; + } //********************************************************************* /// Returns a reference to the value at index 'i' @@ -427,49 +457,65 @@ class ibasic_string : public etl::string_base { /// Returns a reference to the first element. ///\return A reference to the first element. //********************************************************************* - reference front() { return p_buffer[0]; } + reference front() { + return p_buffer[0]; + } //********************************************************************* /// Returns a const reference to the first element. ///\return A const reference to the first element. //********************************************************************* - const_reference front() const { return p_buffer[0]; } + const_reference front() const { + return p_buffer[0]; + } //********************************************************************* /// Returns a reference to the last element. ///\return A reference to the last element. //********************************************************************* - reference back() { return p_buffer[current_size - 1]; } + reference back() { + return p_buffer[current_size - 1]; + } //********************************************************************* /// Returns a const reference to the last element. ///\return A const reference to the last element. //********************************************************************* - const_reference back() const { return p_buffer[current_size - 1]; } + const_reference back() const { + return p_buffer[current_size - 1]; + } //********************************************************************* /// Returns a pointer to the beginning of the string data. ///\return A pointer to the beginning of the string data. //********************************************************************* - pointer data() { return p_buffer; } + pointer data() { + return p_buffer; + } //********************************************************************* /// Returns a const pointer to the beginning of the string data. ///\return A const pointer to the beginning of the string data. //********************************************************************* - const_pointer data() const { return p_buffer; } + const_pointer data() const { + return p_buffer; + } //********************************************************************* /// Returns a pointer to the beginning of the string data. ///\return A pointer to the beginning of the string data. //********************************************************************* - pointer data_end() { return p_buffer + current_size; } + pointer data_end() { + return p_buffer + current_size; + } //********************************************************************* /// Returns a const pointer to the beginning of the string data. ///\return A const pointer to the beginning of the string data. //********************************************************************* - const_pointer data_end() const { return p_buffer + current_size; } + const_pointer data_end() const { + return p_buffer + current_size; + } //********************************************************************* /// Assigns values to the string. @@ -643,7 +689,9 @@ class ibasic_string : public etl::string_base { //************************************************************************* /// Clears the string. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Inserts a value at the end of the string. @@ -1125,7 +1173,9 @@ class ibasic_string : public etl::string_base { //********************************************************************* /// Return a pointer to a C string. //********************************************************************* - const_pointer c_str() const { return p_buffer; } + const_pointer c_str() const { + return p_buffer; + } //********************************************************************* /// Copies a portion of a string. @@ -1990,7 +2040,9 @@ class ibasic_string : public etl::string_base { //************************************************************************* /// Fix the internal pointers after a low level memory copy. //************************************************************************* - void repair_buffer(T* p_buffer_) { p_buffer = p_buffer_; } + void repair_buffer(T* p_buffer_) { + p_buffer = p_buffer_; + } private: //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/bit_stream.h b/Components/_Libraries/embedded-template-library/include/etl/bit_stream.h index 89adf20f..e2b8cf1b 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/bit_stream.h +++ b/Components/_Libraries/embedded-template-library/include/etl/bit_stream.h @@ -299,17 +299,23 @@ class bit_stream { //*************************************************************************** /// Returns the number of bits used in the stream. //*************************************************************************** - size_t bits() const { return (length_chars * CHAR_BIT) - bits_available; } + size_t bits() const { + return (length_chars * CHAR_BIT) - bits_available; + } //*************************************************************************** /// Returns start of the stream. //*************************************************************************** - const_iterator begin() const { return pdata; } + const_iterator begin() const { + return pdata; + } //*************************************************************************** /// Returns end of the stream. //*************************************************************************** - const_iterator end() const { return pdata + size(); } + const_iterator end() const { + return pdata + size(); + } private: //*************************************************************************** diff --git a/Components/_Libraries/embedded-template-library/include/etl/callback_timer.h b/Components/_Libraries/embedded-template-library/include/etl/callback_timer.h index 48af1ae7..8410bafc 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/callback_timer.h +++ b/Components/_Libraries/embedded-template-library/include/etl/callback_timer.h @@ -145,12 +145,16 @@ struct callback_timer_data { //******************************************* /// Returns true if the timer is active. //******************************************* - bool is_active() const { return delta != etl::timer::state::INACTIVE; } + bool is_active() const { + return delta != etl::timer::state::INACTIVE; + } //******************************************* /// Sets the timer to the inactive state. //******************************************* - void set_inactive() { delta = etl::timer::state::INACTIVE; } + void set_inactive() { + delta = etl::timer::state::INACTIVE; + } void* p_callback; uint32_t period; @@ -434,12 +438,16 @@ class icallback_timer { //******************************************* /// Enable/disable the timer. //******************************************* - void enable(bool state_) { enabled = state_; } + void enable(bool state_) { + enabled = state_; + } //******************************************* /// Get the enable/disable state. //******************************************* - bool is_running() const { return enabled; } + bool is_running() const { + return enabled; + } //******************************************* /// Clears the timer of data. diff --git a/Components/_Libraries/embedded-template-library/include/etl/circular_buffer.h b/Components/_Libraries/embedded-template-library/include/etl/circular_buffer.h index a8ccb6e4..e10020c9 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/circular_buffer.h +++ b/Components/_Libraries/embedded-template-library/include/etl/circular_buffer.h @@ -585,37 +585,51 @@ class icircular_buffer : public circular_buffer_base { //************************************************************************* /// Gets an iterator to the start of the buffer. //************************************************************************* - iterator begin() { return iterator(this, out); } + iterator begin() { + return iterator(this, out); + } //************************************************************************* /// Gets a const iterator to the start of the buffer. //************************************************************************* - const_iterator begin() const { return const_iterator(this, out); } + const_iterator begin() const { + return const_iterator(this, out); + } //************************************************************************* /// Gets a const iterator to the start of the buffer. //************************************************************************* - const_iterator cbegin() const { return const_iterator(this, out); } + const_iterator cbegin() const { + return const_iterator(this, out); + } //************************************************************************* /// Gets an iterator to the end of the buffer. //************************************************************************* - iterator end() { return iterator(this, in); } + iterator end() { + return iterator(this, in); + } //************************************************************************* /// Gets a const iterator to the end of the buffer. //************************************************************************* - const_iterator end() const { return const_iterator(this, in); } + const_iterator end() const { + return const_iterator(this, in); + } //************************************************************************* /// Gets a const iterator to the end of the buffer. //************************************************************************* - const_iterator cend() const { return const_iterator(this, in); } + const_iterator cend() const { + return const_iterator(this, in); + } //************************************************************************* /// Gets a reverse iterator to the start of the buffer. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(end()); } + reverse_iterator rbegin() { + return reverse_iterator(end()); + } //************************************************************************* /// Gets a const reverse iterator to the start of the buffer. @@ -634,7 +648,9 @@ class icircular_buffer : public circular_buffer_base { //************************************************************************* /// Gets a reverse iterator to the end of the buffer. //************************************************************************* - reverse_iterator rend() { return reverse_iterator(begin()); } + reverse_iterator rend() { + return reverse_iterator(begin()); + } //************************************************************************* /// Gets a const reverse iterator to the end of the buffer. @@ -793,7 +809,9 @@ class icircular_buffer : public circular_buffer_base { //************************************************************************* /// Fills the buffer. //************************************************************************* - void fill(const T& value) { etl::fill(begin(), end(), value); } + void fill(const T& value) { + etl::fill(begin(), end(), value); + } //************************************************************************* /// - operator for iterator @@ -980,7 +998,9 @@ class circular_buffer : public icircular_buffer { //************************************************************************* /// Destructor. //************************************************************************* - ~circular_buffer() { this->clear(); } + ~circular_buffer() { + this->clear(); + } private: /// The uninitialised storage. @@ -1123,12 +1143,16 @@ class circular_buffer_ext : public icircular_buffer { //************************************************************************* /// set_buffer //************************************************************************* - bool is_valid() const { return this->pbuffer != ETL_NULLPTR; } + bool is_valid() const { + return this->pbuffer != ETL_NULLPTR; + } //************************************************************************* /// Destructor. //************************************************************************* - ~circular_buffer_ext() { this->clear(); } + ~circular_buffer_ext() { + this->clear(); + } }; //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/debug_count.h b/Components/_Libraries/embedded-template-library/include/etl/debug_count.h index 767af206..208f2e6e 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/debug_count.h +++ b/Components/_Libraries/embedded-template-library/include/etl/debug_count.h @@ -105,16 +105,26 @@ class debug_count { count.store(temp); } #else - void swap(debug_count& other) ETL_NOEXCEPT { swap(count, other.count); } + void swap(debug_count& other) ETL_NOEXCEPT { + swap(count, other.count); + } #endif - operator int32_t() const { return count; } + operator int32_t() const { + return count; + } - int32_t get() const { return int32_t(count); } + int32_t get() const { + return int32_t(count); + } - void set(int32_t n) { count = n; } + void set(int32_t n) { + count = n; + } - void clear() { count = 0; } + void clear() { + count = 0; + } private: #if ETL_HAS_ATOMIC diff --git a/Components/_Libraries/embedded-template-library/include/etl/deprecated/factory.h b/Components/_Libraries/embedded-template-library/include/etl/deprecated/factory.h index 730f65e8..029d187d 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/deprecated/factory.h +++ b/Components/_Libraries/embedded-template-library/include/etl/deprecated/factory.h @@ -383,29 +383,39 @@ class factory { //************************************************************************* /// Returns the maximum number of items in the factory. //************************************************************************* - size_t max_size() const { return MAX_SIZE; } + size_t max_size() const { + return MAX_SIZE; + } //************************************************************************* /// Returns the number of free items in the factory. //************************************************************************* - size_t available() const { return pool.available(); } + size_t available() const { + return pool.available(); + } //************************************************************************* /// Returns the number of allocated items in the factory. //************************************************************************* - size_t size() const { return pool.size(); } + size_t size() const { + return pool.size(); + } //************************************************************************* /// Checks to see if there are no allocated items in the factory. /// \return true if there are none allocated. //************************************************************************* - bool empty() const { return pool.empty(); } + bool empty() const { + return pool.empty(); + } //************************************************************************* /// Checks to see if there are no free items in the factory. /// \return true if there are none free. //************************************************************************* - bool full() const { return pool.full(); } + bool full() const { + return pool.full(); + } private: factory(const factory&); diff --git a/Components/_Libraries/embedded-template-library/include/etl/deque.h b/Components/_Libraries/embedded-template-library/include/etl/deque.h index 414502ed..82c91d78 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/deque.h +++ b/Components/_Libraries/embedded-template-library/include/etl/deque.h @@ -682,60 +682,82 @@ class ideque : public etl::deque_base { /// Gets a reference to the item at the front of the deque. ///\return A reference to the item at the front of the deque. //************************************************************************* - reference front() { return *_begin; } + reference front() { + return *_begin; + } //************************************************************************* /// Gets a const reference to the item at the front of the deque. ///\return A const reference to the item at the front of the deque. //************************************************************************* - const_reference front() const { return *_begin; } + const_reference front() const { + return *_begin; + } //************************************************************************* /// Gets a reference to the item at the back of the deque. ///\return A reference to the item at the back of the deque. //************************************************************************* - reference back() { return *(_end - 1); } + reference back() { + return *(_end - 1); + } //************************************************************************* /// Gets a const reference to the item at the back of the deque. ///\return A const reference to the item at the back of the deque. //************************************************************************* - const_reference back() const { return *(_end - 1); } + const_reference back() const { + return *(_end - 1); + } //************************************************************************* /// Gets an iterator to the beginning of the deque. //************************************************************************* - iterator begin() { return _begin; } + iterator begin() { + return _begin; + } //************************************************************************* /// Gets a const iterator to the beginning of the deque. //************************************************************************* - const_iterator begin() const { return _begin; } + const_iterator begin() const { + return _begin; + } //************************************************************************* /// Gets a const iterator to the beginning of the deque. //************************************************************************* - const_iterator cbegin() const { return _begin; } + const_iterator cbegin() const { + return _begin; + } //************************************************************************* /// Gets an iterator to the end of the deque. //************************************************************************* - iterator end() { return iterator(_end); } + iterator end() { + return iterator(_end); + } //************************************************************************* /// Gets a const iterator to the end of the deque. //************************************************************************* - const_iterator end() const { return iterator(_end); } + const_iterator end() const { + return iterator(_end); + } //************************************************************************* /// Gets a const iterator to the end of the deque. //************************************************************************* - const_iterator cend() const { return const_iterator(_end); } + const_iterator cend() const { + return const_iterator(_end); + } //************************************************************************* /// Gets a reverse iterator to the end of the deque. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(end()); } + reverse_iterator rbegin() { + return reverse_iterator(end()); + } //************************************************************************* /// Gets a const reverse iterator to the end of the deque. @@ -754,7 +776,9 @@ class ideque : public etl::deque_base { //************************************************************************* /// Gets a reverse iterator to the beginning of the deque. //************************************************************************* - reverse_iterator rend() { return reverse_iterator(begin()); } + reverse_iterator rend() { + return reverse_iterator(begin()); + } //************************************************************************* /// Gets a const reverse iterator to the beginning of the deque. @@ -773,12 +797,16 @@ class ideque : public etl::deque_base { //************************************************************************* /// Clears the deque. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //************************************************************************* /// Fills the deque. //************************************************************************* - void fill(const T& value) { etl::fill(begin(), end(), value); } + void fill(const T& value) { + etl::fill(begin(), end(), value); + } //************************************************************************* /// Inserts data into the deque. diff --git a/Components/_Libraries/embedded-template-library/include/etl/endianness.h b/Components/_Libraries/embedded-template-library/include/etl/endianness.h index 936701a4..b37bf1eb 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/endianness.h +++ b/Components/_Libraries/embedded-template-library/include/etl/endianness.h @@ -109,7 +109,9 @@ struct endianness { #if ETL_HAS_CONSTEXPR_ENDIANNESS ETL_CONSTEXPR #endif - operator etl::endian() const { return get(); } + operator etl::endian() const { + return get(); + } #if ETL_HAS_CONSTEXPR_ENDIANNESS static ETL_CONSTEXPR etl::endian value() @@ -122,7 +124,9 @@ struct endianness { private: #if ETL_HAS_CONSTEXPR_ENDIANNESS - static ETL_CONSTEXPR etl::endian get() { return etl::endian::native; } + static ETL_CONSTEXPR etl::endian get() { + return etl::endian::native; + } #else static etl::endian get() { static const uint32_t i = 0xFFFF0000; diff --git a/Components/_Libraries/embedded-template-library/include/etl/exception.h b/Components/_Libraries/embedded-template-library/include/etl/exception.h index 4b4d8e32..f8d2f02e 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/exception.h +++ b/Components/_Libraries/embedded-template-library/include/etl/exception.h @@ -67,7 +67,9 @@ class exception { /// Gets the reason for the exception. /// \return const char* to the reason. //*************************************************************************** - string_type what() const { return reason_text; } + string_type what() const { + return reason_text; + } //*************************************************************************** /// Gets the file for the exception. @@ -85,7 +87,9 @@ class exception { /// Gets the line for the exception. /// \return const char* to the line. //*************************************************************************** - numeric_type line_number() const { return line; } + numeric_type line_number() const { + return line; + } private: string_type reason_text; ///< The reason for the exception. diff --git a/Components/_Libraries/embedded-template-library/include/etl/flat_map.h b/Components/_Libraries/embedded-template-library/include/etl/flat_map.h index 3bd53245..c8935408 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/flat_map.h +++ b/Components/_Libraries/embedded-template-library/include/etl/flat_map.h @@ -113,73 +113,97 @@ class iflat_map : private etl::ireference_flat_map { /// Returns an iterator to the beginning of the flat_map. ///\return An iterator to the beginning of the flat_map. //********************************************************************* - iterator begin() { return refmap_t::begin(); } + iterator begin() { + return refmap_t::begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_map. ///\return A const iterator to the beginning of the flat_map. //********************************************************************* - const_iterator begin() const { return refmap_t::begin(); } + const_iterator begin() const { + return refmap_t::begin(); + } //********************************************************************* /// Returns an iterator to the end of the flat_map. ///\return An iterator to the end of the flat_map. //********************************************************************* - iterator end() { return refmap_t::end(); } + iterator end() { + return refmap_t::end(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_map. ///\return A const iterator to the end of the flat_map. //********************************************************************* - const_iterator end() const { return refmap_t::end(); } + const_iterator end() const { + return refmap_t::end(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_map. ///\return A const iterator to the beginning of the flat_map. //********************************************************************* - const_iterator cbegin() const { return refmap_t::cbegin(); } + const_iterator cbegin() const { + return refmap_t::cbegin(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_map. ///\return A const iterator to the end of the flat_map. //********************************************************************* - const_iterator cend() const { return refmap_t::cend(); } + const_iterator cend() const { + return refmap_t::cend(); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the flat_map. ///\return Iterator to the reverse beginning of the flat_map. //********************************************************************* - reverse_iterator rbegin() { return refmap_t::rbegin(); } + reverse_iterator rbegin() { + return refmap_t::rbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_map. ///\return Const iterator to the reverse beginning of the flat_map. //********************************************************************* - const_reverse_iterator rbegin() const { return refmap_t::rbegin(); } + const_reverse_iterator rbegin() const { + return refmap_t::rbegin(); + } //********************************************************************* /// Returns a reverse iterator to the end + 1 of the flat_map. ///\return Reverse iterator to the end + 1 of the flat_map. //********************************************************************* - reverse_iterator rend() { return refmap_t::rend(); } + reverse_iterator rend() { + return refmap_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_map. ///\return Const reverse iterator to the end + 1 of the flat_map. //********************************************************************* - const_reverse_iterator rend() const { return refmap_t::rend(); } + const_reverse_iterator rend() const { + return refmap_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_map. ///\return Const reverse iterator to the reverse beginning of the flat_map. //********************************************************************* - const_reverse_iterator crbegin() const { return refmap_t::crbegin(); } + const_reverse_iterator crbegin() const { + return refmap_t::crbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_map. ///\return Const reverse iterator to the end + 1 of the flat_map. //********************************************************************* - const_reverse_iterator crend() const { return refmap_t::crend(); } + const_reverse_iterator crend() const { + return refmap_t::crend(); + } //********************************************************************* /// Returns a reference to the value at index 'key' @@ -196,7 +220,9 @@ class iflat_map : private etl::ireference_flat_map { ///\param i The index. ///\return A reference to the value at index 'key' //********************************************************************* - mapped_type& at(key_parameter_t key) { return refmap_t::at(key); } + mapped_type& at(key_parameter_t key) { + return refmap_t::at(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -604,7 +630,9 @@ class iflat_map : private etl::ireference_flat_map { ///\param key The key to search for. ///\return An iterator pointing to the element or end() if not found. //********************************************************************* - iterator find(key_parameter_t key) { return refmap_t::find(key); } + iterator find(key_parameter_t key) { + return refmap_t::find(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -638,7 +666,9 @@ class iflat_map : private etl::ireference_flat_map { ///\param key The key to search for. ///\return 1 if the key exists, otherwise 0. //********************************************************************* - size_t count(key_parameter_t key) const { return refmap_t::count(key); } + size_t count(key_parameter_t key) const { + return refmap_t::count(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -762,7 +792,9 @@ class iflat_map : private etl::ireference_flat_map { //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(key_parameter_t key) const { return find(key) != end(); } + bool contains(key_parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -799,37 +831,49 @@ class iflat_map : private etl::ireference_flat_map { /// Gets the current size of the flat_map. ///\return The current size of the flat_map. //************************************************************************* - size_type size() const { return refmap_t::size(); } + size_type size() const { + return refmap_t::size(); + } //************************************************************************* /// Checks the 'empty' state of the flat_map. ///\return true if empty. //************************************************************************* - bool empty() const { return refmap_t::empty(); } + bool empty() const { + return refmap_t::empty(); + } //************************************************************************* /// Checks the 'full' state of the flat_map. ///\return true if full. //************************************************************************* - bool full() const { return refmap_t::full(); } + bool full() const { + return refmap_t::full(); + } //************************************************************************* /// Returns the capacity of the flat_map. ///\return The capacity of the flat_map. //************************************************************************* - size_type capacity() const { return refmap_t::capacity(); } + size_type capacity() const { + return refmap_t::capacity(); + } //************************************************************************* /// Returns the maximum possible size of the flat_map. ///\return The maximum size of the flat_map. //************************************************************************* - size_type max_size() const { return refmap_t::max_size(); } + size_type max_size() const { + return refmap_t::max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return refmap_t::available(); } + size_t available() const { + return refmap_t::available(); + } protected: //********************************************************************* @@ -981,7 +1025,9 @@ class flat_map : public etl::iflat_map { //************************************************************************* /// Destructor. //************************************************************************* - ~flat_map() { this->clear(); } + ~flat_map() { + this->clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/flat_multimap.h b/Components/_Libraries/embedded-template-library/include/etl/flat_multimap.h index b6ecff26..a3000c96 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/flat_multimap.h +++ b/Components/_Libraries/embedded-template-library/include/etl/flat_multimap.h @@ -114,73 +114,97 @@ class iflat_multimap /// Returns an iterator to the beginning of the flat_multimap. ///\return An iterator to the beginning of the flat_multimap. //********************************************************************* - iterator begin() { return refmap_t::begin(); } + iterator begin() { + return refmap_t::begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_multimap. ///\return A const iterator to the beginning of the flat_multimap. //********************************************************************* - const_iterator begin() const { return refmap_t::begin(); } + const_iterator begin() const { + return refmap_t::begin(); + } //********************************************************************* /// Returns an iterator to the end of the flat_multimap. ///\return An iterator to the end of the flat_multimap. //********************************************************************* - iterator end() { return refmap_t::end(); } + iterator end() { + return refmap_t::end(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_multimap. ///\return A const iterator to the end of the flat_multimap. //********************************************************************* - const_iterator end() const { return refmap_t::end(); } + const_iterator end() const { + return refmap_t::end(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_multimap. ///\return A const iterator to the beginning of the flat_multimap. //********************************************************************* - const_iterator cbegin() const { return refmap_t::cbegin(); } + const_iterator cbegin() const { + return refmap_t::cbegin(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_multimap. ///\return A const iterator to the end of the flat_multimap. //********************************************************************* - const_iterator cend() const { return refmap_t::cend(); } + const_iterator cend() const { + return refmap_t::cend(); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the flat_multimap. ///\return Iterator to the reverse beginning of the flat_multimap. //********************************************************************* - reverse_iterator rbegin() { return refmap_t::rbegin(); } + reverse_iterator rbegin() { + return refmap_t::rbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_multimap. ///\return Const iterator to the reverse beginning of the flat_multimap. //********************************************************************* - const_reverse_iterator rbegin() const { return refmap_t::rbegin(); } + const_reverse_iterator rbegin() const { + return refmap_t::rbegin(); + } //********************************************************************* /// Returns a reverse iterator to the end + 1 of the flat_multimap. ///\return Reverse iterator to the end + 1 of the flat_multimap. //********************************************************************* - reverse_iterator rend() { return refmap_t::rend(); } + reverse_iterator rend() { + return refmap_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_multimap. ///\return Const reverse iterator to the end + 1 of the flat_multimap. //********************************************************************* - const_reverse_iterator rend() const { refmap_t::rend(); } + const_reverse_iterator rend() const { + refmap_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_multimap. ///\return Const reverse iterator to the reverse beginning of the flat_multimap. //********************************************************************* - const_reverse_iterator crbegin() const { return refmap_t::crbegin(); } + const_reverse_iterator crbegin() const { + return refmap_t::crbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_multimap. ///\return Const reverse iterator to the end + 1 of the flat_multimap. //********************************************************************* - const_reverse_iterator crend() const { return refmap_t::crend(); } + const_reverse_iterator crend() const { + return refmap_t::crend(); + } //********************************************************************* /// Assigns values to the flat_multimap. @@ -513,7 +537,9 @@ class iflat_multimap ///\param key The key to search for. ///\return An iterator pointing to the element or end() if not found. //********************************************************************* - iterator find(key_parameter_t key) { return refmap_t::find(key); } + iterator find(key_parameter_t key) { + return refmap_t::find(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -547,7 +573,9 @@ class iflat_multimap ///\param key The key to search for. ///\return 1 if the key exists, otherwise 0. //********************************************************************* - size_t count(key_parameter_t key) const { return refmap_t::count(key); } + size_t count(key_parameter_t key) const { + return refmap_t::count(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -671,7 +699,9 @@ class iflat_multimap //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(key_parameter_t key) const { return find(key) != end(); } + bool contains(key_parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -708,37 +738,49 @@ class iflat_multimap /// Gets the current size of the flat_multiset. ///\return The current size of the flat_multiset. //************************************************************************* - size_type size() const { return refmap_t::size(); } + size_type size() const { + return refmap_t::size(); + } //************************************************************************* /// Checks the 'empty' state of the flat_multiset. ///\return true if empty. //************************************************************************* - bool empty() const { return refmap_t::empty(); } + bool empty() const { + return refmap_t::empty(); + } //************************************************************************* /// Checks the 'full' state of the flat_multiset. ///\return true if full. //************************************************************************* - bool full() const { return refmap_t::full(); } + bool full() const { + return refmap_t::full(); + } //************************************************************************* /// Returns the capacity of the flat_multiset. ///\return The capacity of the flat_multiset. //************************************************************************* - size_type capacity() const { return refmap_t::capacity(); } + size_type capacity() const { + return refmap_t::capacity(); + } //************************************************************************* /// Returns the maximum possible size of the flat_multiset. ///\return The maximum size of the flat_multiset. //************************************************************************* - size_type max_size() const { return refmap_t::max_size(); } + size_type max_size() const { + return refmap_t::max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return refmap_t::available(); } + size_t available() const { + return refmap_t::available(); + } protected: //********************************************************************* @@ -892,7 +934,9 @@ class flat_multimap : public etl::iflat_multimap { //************************************************************************* /// Destructor. //************************************************************************* - ~flat_multimap() { this->clear(); } + ~flat_multimap() { + this->clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/flat_multiset.h b/Components/_Libraries/embedded-template-library/include/etl/flat_multiset.h index 643ea059..a77fa348 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/flat_multiset.h +++ b/Components/_Libraries/embedded-template-library/include/etl/flat_multiset.h @@ -90,73 +90,97 @@ class iflat_multiset : private etl::ireference_flat_multiset { /// Returns an iterator to the beginning of the flat_multiset. ///\return An iterator to the beginning of the flat_multiset. //********************************************************************* - iterator begin() { return refset_t::begin(); } + iterator begin() { + return refset_t::begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_multiset. ///\return A const iterator to the beginning of the flat_multiset. //********************************************************************* - const_iterator begin() const { return refset_t::begin(); } + const_iterator begin() const { + return refset_t::begin(); + } //********************************************************************* /// Returns an iterator to the end of the flat_multiset. ///\return An iterator to the end of the flat_multiset. //********************************************************************* - iterator end() { return refset_t::end(); } + iterator end() { + return refset_t::end(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_multiset. ///\return A const iterator to the end of the flat_multiset. //********************************************************************* - const_iterator end() const { return refset_t::end(); } + const_iterator end() const { + return refset_t::end(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_multiset. ///\return A const iterator to the beginning of the flat_multiset. //********************************************************************* - const_iterator cbegin() const { return refset_t::cbegin(); } + const_iterator cbegin() const { + return refset_t::cbegin(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_multiset. ///\return A const iterator to the end of the flat_multiset. //********************************************************************* - const_iterator cend() const { return refset_t::cend(); } + const_iterator cend() const { + return refset_t::cend(); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the flat_multiset. ///\return Iterator to the reverse beginning of the flat_multiset. //********************************************************************* - reverse_iterator rbegin() { return refset_t::rbegin(); } + reverse_iterator rbegin() { + return refset_t::rbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_multiset. ///\return Const iterator to the reverse beginning of the flat_multiset. //********************************************************************* - const_reverse_iterator rbegin() const { return refset_t::rbegin(); } + const_reverse_iterator rbegin() const { + return refset_t::rbegin(); + } //********************************************************************* /// Returns a reverse iterator to the end + 1 of the flat_multiset. ///\return Reverse iterator to the end + 1 of the flat_multiset. //********************************************************************* - reverse_iterator rend() { return refset_t::rend(); } + reverse_iterator rend() { + return refset_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_multiset. ///\return Const reverse iterator to the end + 1 of the flat_multiset. //********************************************************************* - const_reverse_iterator rend() const { return refset_t::rend(); } + const_reverse_iterator rend() const { + return refset_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_multiset. ///\return Const reverse iterator to the reverse beginning of the flat_multiset. //********************************************************************* - const_reverse_iterator crbegin() const { return refset_t::crbegin(); } + const_reverse_iterator crbegin() const { + return refset_t::crbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_multiset. ///\return Const reverse iterator to the end + 1 of the flat_multiset. //********************************************************************* - const_reverse_iterator crend() const { return refset_t::crend(); } + const_reverse_iterator crend() const { + return refset_t::crend(); + } //********************************************************************* /// Assigns values to the flat_multiset. @@ -467,7 +491,9 @@ class iflat_multiset : private etl::ireference_flat_multiset { ///\param key The key to search for. ///\return An iterator pointing to the element or end() if not found. //********************************************************************* - iterator find(key_parameter_t key) { return refset_t::find(key); } + iterator find(key_parameter_t key) { + return refset_t::find(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -501,7 +527,9 @@ class iflat_multiset : private etl::ireference_flat_multiset { ///\param key The key to search for. ///\return 1 if the key exists, otherwise 0. //********************************************************************* - size_t count(key_parameter_t key) const { return refset_t::count(key); } + size_t count(key_parameter_t key) const { + return refset_t::count(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -625,7 +653,9 @@ class iflat_multiset : private etl::ireference_flat_multiset { //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(key_parameter_t key) const { return find(key) != end(); } + bool contains(key_parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -662,37 +692,49 @@ class iflat_multiset : private etl::ireference_flat_multiset { /// Gets the current size of the flat_multiset. ///\return The current size of the flat_multiset. //************************************************************************* - size_type size() const { return refset_t::size(); } + size_type size() const { + return refset_t::size(); + } //************************************************************************* /// Checks the 'empty' state of the flat_multiset. ///\return true if empty. //************************************************************************* - bool empty() const { return refset_t::empty(); } + bool empty() const { + return refset_t::empty(); + } //************************************************************************* /// Checks the 'full' state of the flat_multiset. ///\return true if full. //************************************************************************* - bool full() const { return refset_t::full(); } + bool full() const { + return refset_t::full(); + } //************************************************************************* /// Returns the capacity of the flat_multiset. ///\return The capacity of the flat_multiset. //************************************************************************* - size_type capacity() const { return refset_t::capacity(); } + size_type capacity() const { + return refset_t::capacity(); + } //************************************************************************* /// Returns the maximum possible size of the flat_multiset. ///\return The maximum size of the flat_multiset. //************************************************************************* - size_type max_size() const { return refset_t::max_size(); } + size_type max_size() const { + return refset_t::max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return refset_t::available(); } + size_t available() const { + return refset_t::available(); + } protected: //********************************************************************* @@ -839,7 +881,9 @@ class flat_multiset : public etl::iflat_multiset { //************************************************************************* /// Destructor. //************************************************************************* - ~flat_multiset() { this->clear(); } + ~flat_multiset() { + this->clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/flat_set.h b/Components/_Libraries/embedded-template-library/include/etl/flat_set.h index 75710361..2171c2f0 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/flat_set.h +++ b/Components/_Libraries/embedded-template-library/include/etl/flat_set.h @@ -90,73 +90,97 @@ class iflat_set : private etl::ireference_flat_set { /// Returns an iterator to the beginning of the flat_set. ///\return An iterator to the beginning of the flat_set. //********************************************************************* - iterator begin() { return refset_t::begin(); } + iterator begin() { + return refset_t::begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_set. ///\return A const iterator to the beginning of the flat_set. //********************************************************************* - const_iterator begin() const { return refset_t::begin(); } + const_iterator begin() const { + return refset_t::begin(); + } //********************************************************************* /// Returns an iterator to the end of the flat_set. ///\return An iterator to the end of the flat_set. //********************************************************************* - iterator end() { return refset_t::end(); } + iterator end() { + return refset_t::end(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_set. ///\return A const iterator to the end of the flat_set. //********************************************************************* - const_iterator end() const { return refset_t::end(); } + const_iterator end() const { + return refset_t::end(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the flat_set. ///\return A const iterator to the beginning of the flat_set. //********************************************************************* - const_iterator cbegin() const { return refset_t::cbegin(); } + const_iterator cbegin() const { + return refset_t::cbegin(); + } //********************************************************************* /// Returns a const_iterator to the end of the flat_set. ///\return A const iterator to the end of the flat_set. //********************************************************************* - const_iterator cend() const { return refset_t::cend(); } + const_iterator cend() const { + return refset_t::cend(); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the flat_set. ///\return Iterator to the reverse beginning of the flat_set. //********************************************************************* - reverse_iterator rbegin() { return refset_t::rbegin(); } + reverse_iterator rbegin() { + return refset_t::rbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_set. ///\return Const iterator to the reverse beginning of the flat_set. //********************************************************************* - const_reverse_iterator rbegin() const { return refset_t::rbegin(); } + const_reverse_iterator rbegin() const { + return refset_t::rbegin(); + } //********************************************************************* /// Returns a reverse iterator to the end + 1 of the flat_set. ///\return Reverse iterator to the end + 1 of the flat_set. //********************************************************************* - reverse_iterator rend() { return refset_t::rend(); } + reverse_iterator rend() { + return refset_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_set. ///\return Const reverse iterator to the end + 1 of the flat_set. //********************************************************************* - const_reverse_iterator rend() const { return refset_t::rend(); } + const_reverse_iterator rend() const { + return refset_t::rend(); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the flat_set. ///\return Const reverse iterator to the reverse beginning of the flat_set. //********************************************************************* - const_reverse_iterator crbegin() const { return refset_t::crbegin(); } + const_reverse_iterator crbegin() const { + return refset_t::crbegin(); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the flat_set. ///\return Const reverse iterator to the end + 1 of the flat_set. //********************************************************************* - const_reverse_iterator crend() const { return refset_t::crend(); } + const_reverse_iterator crend() const { + return refset_t::crend(); + } //********************************************************************* /// Assigns values to the flat_set. @@ -530,7 +554,9 @@ class iflat_set : private etl::ireference_flat_set { ///\param key The key to search for. ///\return An iterator pointing to the element or end() if not found. //********************************************************************* - iterator find(key_parameter_t key) { return refset_t::find(key); } + iterator find(key_parameter_t key) { + return refset_t::find(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -564,7 +590,9 @@ class iflat_set : private etl::ireference_flat_set { ///\param key The key to search for. ///\return 1 if the key exists, otherwise 0. //********************************************************************* - size_t count(key_parameter_t key) const { return refset_t::count(key); } + size_t count(key_parameter_t key) const { + return refset_t::count(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -688,7 +716,9 @@ class iflat_set : private etl::ireference_flat_set { //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(key_parameter_t key) const { return find(key) != end(); } + bool contains(key_parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -725,37 +755,49 @@ class iflat_set : private etl::ireference_flat_set { /// Gets the current size of the flat_set. ///\return The current size of the flat_set. //************************************************************************* - size_type size() const { return refset_t::size(); } + size_type size() const { + return refset_t::size(); + } //************************************************************************* /// Checks the 'empty' state of the flat_set. ///\return true if empty. //************************************************************************* - bool empty() const { return refset_t::empty(); } + bool empty() const { + return refset_t::empty(); + } //************************************************************************* /// Checks the 'full' state of the flat_set. ///\return true if full. //************************************************************************* - bool full() const { return refset_t::full(); } + bool full() const { + return refset_t::full(); + } //************************************************************************* /// Returns the capacity of the flat_set. ///\return The capacity of the flat_set. //************************************************************************* - size_type capacity() const { return refset_t::capacity(); } + size_type capacity() const { + return refset_t::capacity(); + } //************************************************************************* /// Returns the maximum possible size of the flat_set. ///\return The maximum size of the flat_set. //************************************************************************* - size_type max_size() const { return refset_t::max_size(); } + size_type max_size() const { + return refset_t::max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return refset_t::available(); } + size_t available() const { + return refset_t::available(); + } protected: //********************************************************************* @@ -899,7 +941,9 @@ class flat_set : public etl::iflat_set { //************************************************************************* /// Destructor. //************************************************************************* - ~flat_set() { this->clear(); } + ~flat_set() { + this->clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/forward_list.h b/Components/_Libraries/embedded-template-library/include/etl/forward_list.h index 96228f59..8b1324aa 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/forward_list.h +++ b/Components/_Libraries/embedded-template-library/include/etl/forward_list.h @@ -444,57 +444,79 @@ class iforward_list : public etl::forward_list_base { //************************************************************************* /// Gets the beginning of the forward_list. //************************************************************************* - iterator begin() { return iterator(get_head()); } + iterator begin() { + return iterator(get_head()); + } //************************************************************************* /// Gets the beginning of the forward_list. //************************************************************************* - const_iterator begin() const { return const_iterator(get_head()); } + const_iterator begin() const { + return const_iterator(get_head()); + } //************************************************************************* /// Gets before the beginning of the forward_list. //************************************************************************* - iterator before_begin() { return iterator(&start_node); } + iterator before_begin() { + return iterator(&start_node); + } //************************************************************************* /// Gets before the beginning of the forward_list. //************************************************************************* - const_iterator before_begin() const { return const_iterator(&start_node); } + const_iterator before_begin() const { + return const_iterator(&start_node); + } //************************************************************************* /// Gets the beginning of the forward_list. //************************************************************************* - const_iterator cbegin() const { return const_iterator(get_head()); } + const_iterator cbegin() const { + return const_iterator(get_head()); + } //************************************************************************* /// Gets the end of the forward_list. //************************************************************************* - iterator end() { return iterator(); } + iterator end() { + return iterator(); + } //************************************************************************* /// Gets the end of the forward_list. //************************************************************************* - const_iterator end() const { return const_iterator(); } + const_iterator end() const { + return const_iterator(); + } //************************************************************************* /// Gets the end of the forward_list. //************************************************************************* - const_iterator cend() const { return const_iterator(); } + const_iterator cend() const { + return const_iterator(); + } //************************************************************************* /// Clears the forward_list. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //************************************************************************* /// Gets a reference to the first element. //************************************************************************* - reference front() { return data_cast(*get_head()).value; } + reference front() { + return data_cast(*get_head()).value; + } //************************************************************************* /// Gets a const reference to the first element. //************************************************************************* - const_reference front() const { return data_cast(*get_head()).value; } + const_reference front() const { + return data_cast(*get_head()).value; + } //************************************************************************* /// Assigns a range of values to the forward_list. @@ -657,7 +679,9 @@ class iforward_list : public etl::forward_list_base { //************************************************************************* /// Resizes the forward_list. //************************************************************************* - void resize(size_t n) { resize(n, T()); } + void resize(size_t n) { + resize(n, T()); + } //************************************************************************* /// Resizes the forward_list. @@ -968,7 +992,9 @@ class iforward_list : public etl::forward_list_base { /// Removes all but the first element from every consecutive group of equal /// elements in the container. //************************************************************************* - void unique() { unique(etl::equal_to()); } + void unique() { + unique(etl::equal_to()); + } //************************************************************************* /// Removes all but the one element from every consecutive group of equal @@ -1000,7 +1026,9 @@ class iforward_list : public etl::forward_list_base { /// Sort using in-place merge sort algorithm. /// Uses 'less-than operator as the predicate. //************************************************************************* - void sort() { sort(etl::less()); } + void sort() { + sort(etl::less()); + } //************************************************************************* /// Stable sort using in-place merge sort algorithm. @@ -1450,7 +1478,9 @@ class forward_list : public etl::iforward_list { //************************************************************************* /// Destructor. //************************************************************************* - ~forward_list() { this->initialise(); } + ~forward_list() { + this->initialise(); + } //************************************************************************* /// Assignment operator. @@ -1606,7 +1636,9 @@ class forward_list_ext : public etl::iforward_list { //************************************************************************* /// Destructor. //************************************************************************* - ~forward_list_ext() { this->initialise(); } + ~forward_list_ext() { + this->initialise(); + } //************************************************************************* /// Assignment operator. @@ -1645,7 +1677,9 @@ class forward_list_ext : public etl::iforward_list { //************************************************************************* /// Get the pool instance. //************************************************************************* - etl::ipool& get_pool() const { return *this->p_node_pool; } + etl::ipool& get_pool() const { + return *this->p_node_pool; + } }; //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/fsm.h b/Components/_Libraries/embedded-template-library/include/etl/fsm.h index 1eb6eb47..d2999a8e 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/fsm.h +++ b/Components/_Libraries/embedded-template-library/include/etl/fsm.h @@ -189,7 +189,9 @@ class ifsm_state { //******************************************* /// Gets the id for this state. //******************************************* - etl::fsm_state_id_t get_state_id() const { return state_id; } + etl::fsm_state_id_t get_state_id() const { + return state_id; + } //******************************************* /// Adds a child to this state. @@ -239,7 +241,9 @@ class ifsm_state { virtual ~ifsm_state() {} //******************************************* - etl::fsm& get_fsm_context() const { return *p_context; } + etl::fsm& get_fsm_context() const { + return *p_context; + } private: virtual fsm_state_id_t process_event(const etl::imessage& message) = 0; @@ -250,7 +254,9 @@ class ifsm_state { virtual void on_exit_state() {} // By default, do nothing. //******************************************* - void set_fsm_context(etl::fsm& context) { p_context = &context; } + void set_fsm_context(etl::fsm& context) { + p_context = &context; + } // The state id. const etl::fsm_state_id_t state_id; diff --git a/Components/_Libraries/embedded-template-library/include/etl/generators/fsm_generator.h b/Components/_Libraries/embedded-template-library/include/etl/generators/fsm_generator.h index a3f303e8..801a50ce 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/generators/fsm_generator.h +++ b/Components/_Libraries/embedded-template-library/include/etl/generators/fsm_generator.h @@ -218,7 +218,9 @@ class ifsm_state { //******************************************* /// Gets the id for this state. //******************************************* - etl::fsm_state_id_t get_state_id() const { return state_id; } + etl::fsm_state_id_t get_state_id() const { + return state_id; + } //******************************************* /// Adds a child to this state. @@ -268,7 +270,9 @@ class ifsm_state { virtual ~ifsm_state() {} //******************************************* - etl::fsm& get_fsm_context() const { return *p_context; } + etl::fsm& get_fsm_context() const { + return *p_context; + } private: virtual fsm_state_id_t process_event(const etl::imessage& message) = 0; @@ -279,7 +283,9 @@ class ifsm_state { virtual void on_exit_state() {} // By default, do nothing. //******************************************* - void set_fsm_context(etl::fsm& context) { p_context = &context; } + void set_fsm_context(etl::fsm& context) { + p_context = &context; + } // The state id. const etl::fsm_state_id_t state_id; diff --git a/Components/_Libraries/embedded-template-library/include/etl/generators/type_traits_generator.h b/Components/_Libraries/embedded-template-library/include/etl/generators/type_traits_generator.h index 3b01a341..a00f4335 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/generators/type_traits_generator.h +++ b/Components/_Libraries/embedded-template-library/include/etl/generators/type_traits_generator.h @@ -1416,7 +1416,7 @@ struct is_pod #if ETL_USING_CPP17 template inline constexpr bool is_pod_v = - std::is_standard_layout_v && std::is_trivial_v; + std::is_standard_layout_v&& std::is_trivial_v; #endif #if defined(ETL_COMPILER_GCC) diff --git a/Components/_Libraries/embedded-template-library/include/etl/histogram.h b/Components/_Libraries/embedded-template-library/include/etl/histogram.h index d07221ea..82ab6394 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/histogram.h +++ b/Components/_Libraries/embedded-template-library/include/etl/histogram.h @@ -173,7 +173,9 @@ class histogram //********************************* /// Add //********************************* - void add(key_type key) { ++this->accumulator[key - Start_Index]; } + void add(key_type key) { + ++this->accumulator[key - Start_Index]; + } //********************************* /// Add @@ -189,7 +191,9 @@ class histogram //********************************* /// operator () //********************************* - void operator()(key_type key) { add(key); } + void operator()(key_type key) { + add(key); + } //********************************* /// operator () @@ -202,7 +206,9 @@ class histogram //********************************* /// operator [] //********************************* - value_type operator[](key_type key) const { return this->accumulator[key]; } + value_type operator[](key_type key) const { + return this->accumulator[key]; + } }; //*************************************************************************** @@ -276,7 +282,9 @@ class histogram::max> //********************************* /// Add //********************************* - void add(key_type key) { ++this->accumulator[key - start_index]; } + void add(key_type key) { + ++this->accumulator[key - start_index]; + } //********************************* /// Add @@ -292,7 +300,9 @@ class histogram::max> //********************************* /// operator () //********************************* - void operator()(key_type key) { add(key); } + void operator()(key_type key) { + add(key); + } //********************************* /// operator () @@ -305,7 +315,9 @@ class histogram::max> //********************************* /// operator [] //********************************* - value_type operator[](key_type key) const { return this->accumulator[key]; } + value_type operator[](key_type key) const { + return this->accumulator[key]; + } private: key_type start_index; @@ -383,27 +395,37 @@ class sparse_histogram : public etl::unary_function { //********************************* /// Beginning of the histogram. //********************************* - const_iterator begin() const { return accumulator.begin(); } + const_iterator begin() const { + return accumulator.begin(); + } //********************************* /// Beginning of the histogram. //********************************* - const_iterator cbegin() const { return accumulator.cbegin(); } + const_iterator cbegin() const { + return accumulator.cbegin(); + } //********************************* /// End of the histogram. //********************************* - const_iterator end() const { return accumulator.begin(); } + const_iterator end() const { + return accumulator.begin(); + } //********************************* /// End of the histogram. //********************************* - const_iterator cend() const { return accumulator.cbegin(); } + const_iterator cend() const { + return accumulator.cbegin(); + } //********************************* /// Add //********************************* - void add(const key_type& key) { ++accumulator[key]; } + void add(const key_type& key) { + ++accumulator[key]; + } //********************************* /// Add @@ -419,7 +441,9 @@ class sparse_histogram : public etl::unary_function { //********************************* /// operator () //********************************* - void operator()(const key_type& key) { add(key); } + void operator()(const key_type& key) { + add(key); + } //********************************* /// operator () @@ -447,17 +471,23 @@ class sparse_histogram : public etl::unary_function { //********************************* /// Clear the histogram. //********************************* - void clear() { accumulator.clear(); } + void clear() { + accumulator.clear(); + } //********************************* /// Size of the histogram. //********************************* - size_t size() const { return accumulator.size(); } + size_t size() const { + return accumulator.size(); + } //********************************* /// Max size of the histogram. //********************************* - ETL_CONSTEXPR size_t max_size() const { return Max_Size; } + ETL_CONSTEXPR size_t max_size() const { + return Max_Size; + } //********************************* /// Count of items in the histogram. diff --git a/Components/_Libraries/embedded-template-library/include/etl/indirect_vector.h b/Components/_Libraries/embedded-template-library/include/etl/indirect_vector.h index eebbe6e4..853d3ed5 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/indirect_vector.h +++ b/Components/_Libraries/embedded-template-library/include/etl/indirect_vector.h @@ -355,43 +355,57 @@ class iindirect_vector { /// Returns an iterator to the beginning of the indirect_vector. ///\return An iterator to the beginning of the indirect_vector. //********************************************************************* - iterator begin() { return iterator(lookup.begin()); } + iterator begin() { + return iterator(lookup.begin()); + } //********************************************************************* /// Returns a const_iterator to the beginning of the indirect_vector. ///\return A const iterator to the beginning of the indirect_vector. //********************************************************************* - const_iterator begin() const { return const_iterator(lookup.begin()); } + const_iterator begin() const { + return const_iterator(lookup.begin()); + } //********************************************************************* /// Returns an iterator to the end of the indirect_vector. ///\return An iterator to the end of the indirect_vector. //********************************************************************* - iterator end() { return iterator(lookup.end()); } + iterator end() { + return iterator(lookup.end()); + } //********************************************************************* /// Returns a const_iterator to the end of the indirect_vector. ///\return A const iterator to the end of the indirect_vector. //********************************************************************* - const_iterator end() const { return const_iterator(lookup.end()); } + const_iterator end() const { + return const_iterator(lookup.end()); + } //********************************************************************* /// Returns a const_iterator to the beginning of the indirect_vector. ///\return A const iterator to the beginning of the indirect_vector. //********************************************************************* - const_iterator cbegin() const { return const_iterator(lookup.begin()); } + const_iterator cbegin() const { + return const_iterator(lookup.begin()); + } //********************************************************************* /// Returns a const_iterator to the end of the indirect_vector. ///\return A const iterator to the end of the indirect_vector. //********************************************************************* - const_iterator cend() const { return const_iterator(lookup.cend()); } + const_iterator cend() const { + return const_iterator(lookup.cend()); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the indirect_vector. ///\return Iterator to the reverse beginning of the indirect_vector. //********************************************************************* - reverse_iterator rbegin() { return reverse_iterator(end()); } + reverse_iterator rbegin() { + return reverse_iterator(end()); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the indirect_vector. @@ -405,7 +419,9 @@ class iindirect_vector { /// Returns a reverse iterator to the end + 1 of the indirect_vector. ///\return Reverse iterator to the end + 1 of the indirect_vector. //********************************************************************* - reverse_iterator rend() { return reverse_iterator(begin()); } + reverse_iterator rend() { + return reverse_iterator(begin()); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the indirect_vector. @@ -437,7 +453,9 @@ class iindirect_vector { /// maximum then a vector_full is thrown. ///\param new_size The new size. //********************************************************************* - void resize(size_t new_size) { resize(new_size, T()); } + void resize(size_t new_size) { + resize(new_size, T()); + } //********************************************************************* /// Resizes the indirect_vector. @@ -478,14 +496,18 @@ class iindirect_vector { ///\param i The index. ///\return A reference to the value at index 'i' //********************************************************************* - reference operator[](size_t i) { return *lookup[i]; } + reference operator[](size_t i) { + return *lookup[i]; + } //********************************************************************* /// Returns a const reference to the value at index 'i' ///\param i The index. ///\return A const reference to the value at index 'i' //********************************************************************* - const_reference operator[](size_t i) const { return *lookup[i]; } + const_reference operator[](size_t i) const { + return *lookup[i]; + } //********************************************************************* /// Returns a reference to the value at index 'i' @@ -493,7 +515,9 @@ class iindirect_vector { ///\param i The index. ///\return A reference to the value at index 'i' //********************************************************************* - reference at(size_t i) { return *lookup.at(i); } + reference at(size_t i) { + return *lookup.at(i); + } //********************************************************************* /// Returns a const reference to the value at index 'i' @@ -501,31 +525,41 @@ class iindirect_vector { ///\param i The index. ///\return A const reference to the value at index 'i' //********************************************************************* - const_reference at(size_t i) const { return *lookup.at(i); } + const_reference at(size_t i) const { + return *lookup.at(i); + } //********************************************************************* /// Returns a reference to the first element. ///\return A reference to the first element. //********************************************************************* - reference front() { return *(lookup.front()); } + reference front() { + return *(lookup.front()); + } //********************************************************************* /// Returns a const reference to the first element. ///\return A const reference to the first element. //********************************************************************* - const_reference front() const { return *(lookup.front()); } + const_reference front() const { + return *(lookup.front()); + } //********************************************************************* /// Returns a reference to the last element. ///\return A reference to the last element. //********************************************************************* - reference back() { return *(lookup.back()); } + reference back() { + return *(lookup.back()); + } //********************************************************************* /// Returns a const reference to the last element. ///\return A const reference to the last element. //********************************************************************* - const_reference back() const { return *(lookup.back()); } + const_reference back() const { + return *(lookup.back()); + } //********************************************************************* /// Assigns values to the indirect_vector. @@ -577,12 +611,16 @@ class iindirect_vector { //************************************************************************* /// Clears the indirect_vector. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //************************************************************************* /// Fills the buffer. //************************************************************************* - void fill(const T& value) { etl::fill(begin(), end(), value); } + void fill(const T& value) { + etl::fill(begin(), end(), value); + } //********************************************************************* /// Inserts a value at the end of the indirect_vector. @@ -900,37 +938,49 @@ class iindirect_vector { /// Gets the current size of the indirect_vector. ///\return The current size of the indirect_vector. //************************************************************************* - size_type size() const { return lookup.size(); } + size_type size() const { + return lookup.size(); + } //************************************************************************* /// Gets the current capacity of the indirect_vector. ///\return The capacity of the indirect_vector. //************************************************************************* - size_type capacity() const { return lookup.capacity(); } + size_type capacity() const { + return lookup.capacity(); + } //************************************************************************* /// Checks the 'empty' state of the indirect_vector. ///\return true if empty. //************************************************************************* - bool empty() const { return lookup.empty(); } + bool empty() const { + return lookup.empty(); + } //************************************************************************* /// Checks the 'full' state of the indirect_vector. ///\return true if full. //************************************************************************* - bool full() const { return lookup.full(); } + bool full() const { + return lookup.full(); + } //************************************************************************* /// Returns the maximum size. ///\return The maximum size. //************************************************************************* - size_type max_size() const { return lookup.max_size(); } + size_type max_size() const { + return lookup.max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_type available() const { return lookup.available(); } + size_type available() const { + return lookup.available(); + } protected: //********************************************************************* @@ -1184,7 +1234,9 @@ class indirect_vector : public etl::iindirect_vector { //************************************************************************* /// Destructor. //************************************************************************* - ~indirect_vector() { this->clear(); } + ~indirect_vector() { + this->clear(); + } private: etl::vector lookup_vector; @@ -1341,7 +1393,9 @@ class indirect_vector_ext : public etl::iindirect_vector { //************************************************************************* /// Destructor. //************************************************************************* - ~indirect_vector_ext() { this->clear(); } + ~indirect_vector_ext() { + this->clear(); + } }; } // namespace etl diff --git a/Components/_Libraries/embedded-template-library/include/etl/intrusive_forward_list.h b/Components/_Libraries/embedded-template-library/include/etl/intrusive_forward_list.h index 4f6c579c..bd2a4f99 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/intrusive_forward_list.h +++ b/Components/_Libraries/embedded-template-library/include/etl/intrusive_forward_list.h @@ -160,7 +160,9 @@ class intrusive_forward_list_base { //************************************************************************* /// Pushes a value to the front of the intrusive_forward_list. //************************************************************************* - void push_front(link_type& value) { insert_link_after(start_link, value); } + void push_front(link_type& value) { + insert_link_after(start_link, value); + } //************************************************************************* /// Removes a value from the front of the intrusive_forward_list. @@ -197,12 +199,16 @@ class intrusive_forward_list_base { //************************************************************************* /// Returns true if the list has no elements. //************************************************************************* - bool empty() const { return start_link.etl_next == ETL_NULLPTR; } + bool empty() const { + return start_link.etl_next == ETL_NULLPTR; + } //************************************************************************* /// Returns the number of elements. //************************************************************************* - size_t size() const { return current_size; } + size_t size() const { + return current_size; + } protected: link_type @@ -247,12 +253,16 @@ class intrusive_forward_list_base { //************************************************************************* /// Get the head link. //************************************************************************* - link_type* get_head() { return start_link.etl_next; } + link_type* get_head() { + return start_link.etl_next; + } //************************************************************************* /// Get the head link. //************************************************************************* - const link_type* get_head() const { return start_link.etl_next; } + const link_type* get_head() const { + return start_link.etl_next; + } //************************************************************************* /// Initialise the intrusive_forward_list. diff --git a/Components/_Libraries/embedded-template-library/include/etl/intrusive_list.h b/Components/_Libraries/embedded-template-library/include/etl/intrusive_list.h index 8ca3fbf0..e81557aa 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/intrusive_list.h +++ b/Components/_Libraries/embedded-template-library/include/etl/intrusive_list.h @@ -135,7 +135,9 @@ class intrusive_list_base { //************************************************************************* /// Pushes a value to the front of the intrusive_list. //************************************************************************* - void push_front(link_type& value) { insert_link(terminal_link, value); } + void push_front(link_type& value) { + insert_link(terminal_link, value); + } //************************************************************************* /// Removes a value from the front of the intrusive_list. @@ -167,7 +169,9 @@ class intrusive_list_base { //************************************************************************* /// Clears the intrusive_list. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //************************************************************************* /// Reverses the list. @@ -200,7 +204,9 @@ class intrusive_list_base { //************************************************************************* /// Returns the number of elements. //************************************************************************* - size_t size() const { return current_size; } + size_t size() const { + return current_size; + } protected: /// The link that acts as the intrusive_list start & end. @@ -276,22 +282,30 @@ class intrusive_list_base { //************************************************************************* /// Get the head link. //************************************************************************* - link_type* get_head() { return terminal_link.etl_next; } + link_type* get_head() { + return terminal_link.etl_next; + } //************************************************************************* /// Get the head link. //************************************************************************* - const link_type* get_head() const { return terminal_link.etl_next; } + const link_type* get_head() const { + return terminal_link.etl_next; + } //************************************************************************* /// Get the tail link. //************************************************************************* - link_type* get_tail() { return terminal_link.etl_previous; } + link_type* get_tail() { + return terminal_link.etl_previous; + } //************************************************************************* /// Get the tail link. //************************************************************************* - const link_type* get_tail() const { return terminal_link.etl_previous; } + const link_type* get_tail() const { + return terminal_link.etl_previous; + } //************************************************************************* /// Initialise the intrusive_list. diff --git a/Components/_Libraries/embedded-template-library/include/etl/intrusive_queue.h b/Components/_Libraries/embedded-template-library/include/etl/intrusive_queue.h index 26546b0a..f86a7a4b 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/intrusive_queue.h +++ b/Components/_Libraries/embedded-template-library/include/etl/intrusive_queue.h @@ -138,12 +138,16 @@ class intrusive_queue_base { //************************************************************************* /// Checks if the queue is in the empty state. //************************************************************************* - bool empty() const { return current_size == 0; } + bool empty() const { + return current_size == 0; + } //************************************************************************* /// Returns the number of elements. //************************************************************************* - size_t size() const { return current_size; } + size_t size() const { + return current_size; + } protected: //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/intrusive_stack.h b/Components/_Libraries/embedded-template-library/include/etl/intrusive_stack.h index a1b0f258..882a583c 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/intrusive_stack.h +++ b/Components/_Libraries/embedded-template-library/include/etl/intrusive_stack.h @@ -147,12 +147,16 @@ class intrusive_stack_base { //************************************************************************* /// Checks if the stack is in the empty state. //************************************************************************* - bool empty() const { return current_size == 0; } + bool empty() const { + return current_size == 0; + } //************************************************************************* /// Returns the number of elements. //************************************************************************* - size_t size() const { return current_size; } + size_t size() const { + return current_size; + } protected: //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/ipool.h b/Components/_Libraries/embedded-template-library/include/etl/ipool.h index bef37b77..46f11306 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/ipool.h +++ b/Components/_Libraries/embedded-template-library/include/etl/ipool.h @@ -241,34 +241,46 @@ class ipool { //************************************************************************* /// Returns the maximum number of items in the pool. //************************************************************************* - size_t max_size() const { return Max_Size; } + size_t max_size() const { + return Max_Size; + } //************************************************************************* /// Returns the maximum number of items in the pool. //************************************************************************* - size_t capacity() const { return Max_Size; } + size_t capacity() const { + return Max_Size; + } //************************************************************************* /// Returns the number of free items in the pool. //************************************************************************* - size_t available() const { return Max_Size - items_allocated; } + size_t available() const { + return Max_Size - items_allocated; + } //************************************************************************* /// Returns the number of allocated items in the pool. //************************************************************************* - size_t size() const { return items_allocated; } + size_t size() const { + return items_allocated; + } //************************************************************************* /// Checks to see if there are no allocated items in the pool. /// \return true if there are none allocated. //************************************************************************* - bool empty() const { return items_allocated == 0; } + bool empty() const { + return items_allocated == 0; + } //************************************************************************* /// Checks to see if there are no free items in the pool. /// \return true if there are none free. //************************************************************************* - bool full() const { return items_allocated == Max_Size; } + bool full() const { + return items_allocated == Max_Size; + } protected: //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/limits.h b/Components/_Libraries/embedded-template-library/include/etl/limits.h index 615c5000..16a909d8 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/limits.h +++ b/Components/_Libraries/embedded-template-library/include/etl/limits.h @@ -54,7 +54,7 @@ SOFTWARE. #endif #if ETL_NOT_USING_STL -#define ETL_LOG10_OF_2(x) (((x) * 301) / 1000) +#define ETL_LOG10_OF_2(x) (((x)*301) / 1000) #if !defined(LDBL_MIN) && defined(DBL_MIN) // Looks like we don't have these macros defined. diff --git a/Components/_Libraries/embedded-template-library/include/etl/list.h b/Components/_Libraries/embedded-template-library/include/etl/list.h index d62b8569..91eb46b6 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/list.h +++ b/Components/_Libraries/embedded-template-library/include/etl/list.h @@ -528,17 +528,23 @@ class ilist : public etl::list_base { //************************************************************************* /// Gets the beginning of the list. //************************************************************************* - iterator begin() { return iterator(get_head()); } + iterator begin() { + return iterator(get_head()); + } //************************************************************************* /// Gets the beginning of the list. //************************************************************************* - const_iterator begin() const { return const_iterator(get_head()); } + const_iterator begin() const { + return const_iterator(get_head()); + } //************************************************************************* /// Gets the end of the list. //************************************************************************* - iterator end() { return iterator(terminal_node); } + iterator end() { + return iterator(terminal_node); + } //************************************************************************* /// Gets the end of the list. @@ -550,7 +556,9 @@ class ilist : public etl::list_base { //************************************************************************* /// Gets the beginning of the list. //************************************************************************* - const_iterator cbegin() const { return const_iterator(get_head()); } + const_iterator cbegin() const { + return const_iterator(get_head()); + } //************************************************************************* /// Gets the end of the list. @@ -562,7 +570,9 @@ class ilist : public etl::list_base { //************************************************************************* /// Gets the reverse beginning of the list. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(terminal_node); } + reverse_iterator rbegin() { + return reverse_iterator(terminal_node); + } //************************************************************************* /// Gets the reverse beginning of the list. @@ -575,7 +585,9 @@ class ilist : public etl::list_base { //************************************************************************* /// Gets the reverse end of the list. //************************************************************************* - reverse_iterator rend() { return reverse_iterator(get_head()); } + reverse_iterator rend() { + return reverse_iterator(get_head()); + } //************************************************************************* /// Gets the reverse end of the list. @@ -602,22 +614,30 @@ class ilist : public etl::list_base { //************************************************************************* /// Gets a reference to the first element. //************************************************************************* - reference front() { return data_cast(get_head()).value; } + reference front() { + return data_cast(get_head()).value; + } //************************************************************************* /// Gets a const reference to the first element. //************************************************************************* - const_reference front() const { return data_cast(get_head()).value; } + const_reference front() const { + return data_cast(get_head()).value; + } //************************************************************************* /// Gets a reference to the last element. //************************************************************************* - reference back() { return data_cast(get_tail()).value; } + reference back() { + return data_cast(get_tail()).value; + } //************************************************************************* /// Gets a reference to the last element. //************************************************************************* - const_reference back() const { return data_cast(get_tail()).value; } + const_reference back() const { + return data_cast(get_tail()).value; + } //************************************************************************* /// Assigns a range of values to the list. @@ -1050,7 +1070,9 @@ class ilist : public etl::list_base { //************************************************************************* /// Resizes the list. //************************************************************************* - void resize(size_t n) { resize(n, T()); } + void resize(size_t n) { + resize(n, T()); + } //************************************************************************* /// Resizes the list. @@ -1077,7 +1099,9 @@ class ilist : public etl::list_base { //************************************************************************* /// Clears the list. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //************************************************************************* // Removes the values specified. @@ -1114,7 +1138,9 @@ class ilist : public etl::list_base { /// Removes all but the first element from every consecutive group of equal /// elements in the container. //************************************************************************* - void unique() { unique(etl::equal_to()); } + void unique() { + unique(etl::equal_to()); + } //************************************************************************* /// Removes all but the first element from every consecutive group of equal @@ -1236,7 +1262,9 @@ class ilist : public etl::list_base { //************************************************************************* /// Merge another list into this one. Both lists should be sorted. //************************************************************************* - void merge(ilist& other) { merge(other, etl::less()); } + void merge(ilist& other) { + merge(other, etl::less()); + } //************************************************************************* /// Merge another list into this one. Both lists should be sorted. @@ -1344,7 +1372,9 @@ class ilist : public etl::list_base { /// Sort using in-place merge sort algorithm. /// Uses 'less-than operator as the predicate. //************************************************************************* - void sort() { sort(etl::less()); } + void sort() { + sort(etl::less()); + } //************************************************************************* /// Stable sort using in-place merge sort algorithm. @@ -1732,7 +1762,9 @@ class list : public etl::ilist { //************************************************************************* /// Destructor. //************************************************************************* - ~list() { this->initialise(); } + ~list() { + this->initialise(); + } //************************************************************************* /// Construct from size. @@ -1989,7 +2021,9 @@ class list_ext : public etl::ilist { //************************************************************************* /// Get the pool instance. //************************************************************************* - etl::ipool& get_pool() const { return *this->p_node_pool; } + etl::ipool& get_pool() const { + return *this->p_node_pool; + } }; //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/map.h b/Components/_Libraries/embedded-template-library/include/etl/map.h index 57b52ad2..c6a0236e 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/map.h +++ b/Components/_Libraries/embedded-template-library/include/etl/map.h @@ -687,12 +687,16 @@ class imap : public etl::map_base { //************************************************************************* /// Gets the end of the map. //************************************************************************* - iterator end() { return iterator(*this); } + iterator end() { + return iterator(*this); + } //************************************************************************* /// Gets the end of the map. //************************************************************************* - const_iterator end() const { return const_iterator(*this); } + const_iterator end() const { + return const_iterator(*this); + } //************************************************************************* /// Gets the beginning of the map. @@ -704,12 +708,16 @@ class imap : public etl::map_base { //************************************************************************* /// Gets the end of the map. //************************************************************************* - const_iterator cend() const { return const_iterator(*this); } + const_iterator cend() const { + return const_iterator(*this); + } //************************************************************************* /// Gets the reverse beginning of the list. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(iterator(*this)); } + reverse_iterator rbegin() { + return reverse_iterator(iterator(*this)); + } //************************************************************************* /// Gets the reverse beginning of the list. @@ -839,7 +847,9 @@ class imap : public etl::map_base { //************************************************************************* /// Clears the map. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts the number of elements that contain the key specified. @@ -1204,17 +1214,23 @@ class imap : public etl::map_base { //************************************************************************* /// How to compare two key elements. //************************************************************************* - key_compare key_comp() const { return kcompare; } + key_compare key_comp() const { + return kcompare; + } //************************************************************************* /// How to compare two value elements. //************************************************************************* - value_compare value_comp() const { return vcompare; } + value_compare value_comp() const { + return vcompare; + } //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(const TKey& key) const { return find(key) != end(); } + bool contains(const TKey& key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -2281,7 +2297,9 @@ class map : public etl::imap { //************************************************************************* /// Destructor. //************************************************************************* - ~map() { this->initialise(); } + ~map() { + this->initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/mem_cast.h b/Components/_Libraries/embedded-template-library/include/etl/mem_cast.h index b02c5441..e71a6d56 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/mem_cast.h +++ b/Components/_Libraries/embedded-template-library/include/etl/mem_cast.h @@ -263,22 +263,30 @@ class mem_cast { //*********************************** /// Get the size of the buffer //*********************************** - ETL_NODISCARD static ETL_CONSTEXPR size_t size() { return Size; } + ETL_NODISCARD static ETL_CONSTEXPR size_t size() { + return Size; + } //*********************************** /// Get the alignment of the buffer //*********************************** - ETL_NODISCARD static ETL_CONSTEXPR size_t alignment() { return Alignment; } + ETL_NODISCARD static ETL_CONSTEXPR size_t alignment() { + return Alignment; + } //*********************************** /// Get a pointer to the internal buffer //*********************************** - ETL_NODISCARD char* data() { return buffer; } + ETL_NODISCARD char* data() { + return buffer; + } //*********************************** /// Get a const pointer to the internal buffer //*********************************** - ETL_NODISCARD const char* data() const { return buffer; } + ETL_NODISCARD const char* data() const { + return buffer; + } private: /// The internal buffer @@ -489,7 +497,9 @@ class mem_cast_ptr { //*********************************** /// Get the size of the buffer //*********************************** - ETL_NODISCARD size_t size() const { return buffer_size; } + ETL_NODISCARD size_t size() const { + return buffer_size; + } //*********************************** /// Get the alignment of the buffer @@ -514,12 +524,16 @@ class mem_cast_ptr { //*********************************** /// Get a pointer to the external buffer //*********************************** - ETL_NODISCARD char* data() { return pbuffer; } + ETL_NODISCARD char* data() { + return pbuffer; + } //*********************************** /// Get const a pointer to the external buffer //*********************************** - ETL_NODISCARD const char* data() const { return pbuffer; } + ETL_NODISCARD const char* data() const { + return pbuffer; + } private: /// Pointer to the buffer diff --git a/Components/_Libraries/embedded-template-library/include/etl/memory.h b/Components/_Libraries/embedded-template-library/include/etl/memory.h index ebf3c0ce..45af8f98 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/memory.h +++ b/Components/_Libraries/embedded-template-library/include/etl/memory.h @@ -1399,13 +1399,19 @@ class unique_ptr { } //********************************* - ETL_CONSTEXPR pointer get() const ETL_NOEXCEPT { return p; } + ETL_CONSTEXPR pointer get() const ETL_NOEXCEPT { + return p; + } //********************************* - TDeleter& get_deleter() ETL_NOEXCEPT { return deleter; } + TDeleter& get_deleter() ETL_NOEXCEPT { + return deleter; + } //********************************* - const TDeleter& get_deleter() const ETL_NOEXCEPT { return deleter; } + const TDeleter& get_deleter() const ETL_NOEXCEPT { + return deleter; + } //********************************* pointer release() ETL_NOEXCEPT { @@ -1462,13 +1468,19 @@ class unique_ptr { #endif //********************************* - ETL_CONSTEXPR reference operator*() const { return *get(); } + ETL_CONSTEXPR reference operator*() const { + return *get(); + } //********************************* - ETL_CONSTEXPR pointer operator->() const ETL_NOEXCEPT { return get(); } + ETL_CONSTEXPR pointer operator->() const ETL_NOEXCEPT { + return get(); + } //********************************* - ETL_CONSTEXPR reference operator[](size_t i) const { return p[i]; } + ETL_CONSTEXPR reference operator[](size_t i) const { + return p[i]; + } private: // Deleted. @@ -1529,13 +1541,19 @@ class unique_ptr { } //********************************* - ETL_CONSTEXPR pointer get() const ETL_NOEXCEPT { return p; } + ETL_CONSTEXPR pointer get() const ETL_NOEXCEPT { + return p; + } //********************************* - TDeleter& get_deleter() ETL_NOEXCEPT { return deleter; } + TDeleter& get_deleter() ETL_NOEXCEPT { + return deleter; + } //********************************* - const TDeleter& get_deleter() const ETL_NOEXCEPT { return deleter; } + const TDeleter& get_deleter() const ETL_NOEXCEPT { + return deleter; + } //********************************* pointer release() ETL_NOEXCEPT { @@ -1591,13 +1609,19 @@ class unique_ptr { #endif //********************************* - ETL_CONSTEXPR reference operator*() const { return *p; } + ETL_CONSTEXPR reference operator*() const { + return *p; + } //********************************* - ETL_CONSTEXPR pointer operator->() const ETL_NOEXCEPT { return p; } + ETL_CONSTEXPR pointer operator->() const ETL_NOEXCEPT { + return p; + } //********************************* - ETL_CONSTEXPR reference operator[](size_t i) const { return p[i]; } + ETL_CONSTEXPR reference operator[](size_t i) const { + return p[i]; + } private: // Deleted. diff --git a/Components/_Libraries/embedded-template-library/include/etl/message_packet.h b/Components/_Libraries/embedded-template-library/include/etl/message_packet.h index 8172bece..c0dff373 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/message_packet.h +++ b/Components/_Libraries/embedded-template-library/include/etl/message_packet.h @@ -421,7 +421,9 @@ class message_packet { #endif //******************************************** - ~message_packet() { delete_current_message(); } + ~message_packet() { + delete_current_message(); + } //******************************************** etl::imessage& get() ETL_NOEXCEPT { @@ -434,7 +436,9 @@ class message_packet { } //******************************************** - bool is_valid() const { return valid; } + bool is_valid() const { + return valid; + } //********************************************** static ETL_CONSTEXPR bool accepts(etl::message_id_t id) { @@ -763,7 +767,9 @@ class message_packet { //************************************************************************* /// Destructor. //************************************************************************* - ~multimap() { this->initialise(); } + ~multimap() { + this->initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/multiset.h b/Components/_Libraries/embedded-template-library/include/etl/multiset.h index ba33aacd..f7a837be 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/multiset.h +++ b/Components/_Libraries/embedded-template-library/include/etl/multiset.h @@ -822,12 +822,16 @@ class imultiset : public etl::multiset_base { //************************************************************************* /// Gets the end of the multiset. //************************************************************************* - iterator end() { return iterator(*this); } + iterator end() { + return iterator(*this); + } //************************************************************************* /// Gets the end of the multiset. //************************************************************************* - const_iterator end() const { return const_iterator(*this); } + const_iterator end() const { + return const_iterator(*this); + } //************************************************************************* /// Gets the beginning of the multiset. @@ -839,12 +843,16 @@ class imultiset : public etl::multiset_base { //************************************************************************* /// Gets the end of the multiset. //************************************************************************* - const_iterator cend() const { return const_iterator(*this); } + const_iterator cend() const { + return const_iterator(*this); + } //************************************************************************* /// Gets the reverse beginning of the list. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(iterator(*this)); } + reverse_iterator rbegin() { + return reverse_iterator(iterator(*this)); + } //************************************************************************* /// Gets the reverse beginning of the list. @@ -900,14 +908,18 @@ class imultiset : public etl::multiset_base { //************************************************************************* /// Clears the multiset. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts the number of elements that contain the key specified. ///\param key The key to search for. ///\return 1 if element was found, 0 otherwise. //********************************************************************* - size_type count(key_parameter_t key) const { return count_nodes(key); } + size_type count(key_parameter_t key) const { + return count_nodes(key); + } #if ETL_USING_CPP11 //********************************************************************* @@ -1274,17 +1286,23 @@ class imultiset : public etl::multiset_base { //************************************************************************* /// How to compare two key elements. //************************************************************************* - key_compare key_comp() const { return compare; }; + key_compare key_comp() const { + return compare; + }; //************************************************************************* /// How to compare two value elements. //************************************************************************* - value_compare value_comp() const { return compare; }; + value_compare value_comp() const { + return compare; + }; //************************************************************************* /// Check if the set contains the key. //************************************************************************* - bool contains(key_parameter_t key) const { return find(key) != end(); } + bool contains(key_parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -2033,7 +2051,9 @@ class multiset : public etl::imultiset { //************************************************************************* /// Destructor. //************************************************************************* - ~multiset() { this->initialise(); } + ~multiset() { + this->initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/murmur3.h b/Components/_Libraries/embedded-template-library/include/etl/murmur3.h index 7d12d048..ca5051af 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/murmur3.h +++ b/Components/_Libraries/embedded-template-library/include/etl/murmur3.h @@ -69,7 +69,9 @@ class murmur3 { /// Default constructor. /// \param seed The seed value. Default = 0. //************************************************************************* - murmur3(value_type seed_ = 0) : seed(seed_) { reset(); } + murmur3(value_type seed_ = 0) : seed(seed_) { + reset(); + } //************************************************************************* /// Constructor from range. @@ -167,7 +169,9 @@ class murmur3 { //************************************************************************* /// Conversion operator to value_type. //************************************************************************* - operator value_type() { return value(); } + operator value_type() { + return value(); + } private: //************************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/optional.h b/Components/_Libraries/embedded-template-library/include/etl/optional.h index 5a64d587..db15a379 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/optional.h +++ b/Components/_Libraries/embedded-template-library/include/etl/optional.h @@ -287,12 +287,16 @@ class optional { //*************************************************************************** /// Bool conversion operator. //*************************************************************************** - ETL_EXPLICIT operator bool() const { return valid; } + ETL_EXPLICIT operator bool() const { + return valid; + } //*************************************************************************** // Check whether optional contains value //*************************************************************************** - ETL_CONSTEXPR bool has_value() const ETL_NOEXCEPT { return valid; } + ETL_CONSTEXPR bool has_value() const ETL_NOEXCEPT { + return valid; + } //*************************************************************************** /// Get a reference to the value. diff --git a/Components/_Libraries/embedded-template-library/include/etl/packet.h b/Components/_Libraries/embedded-template-library/include/etl/packet.h index 0f26c2bc..4d8d7030 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/packet.h +++ b/Components/_Libraries/embedded-template-library/include/etl/packet.h @@ -89,7 +89,9 @@ class packet { //*************************************************************************** /// Destructor //*************************************************************************** - ~packet() { static_cast(data)->~TBase(); } + ~packet() { + static_cast(data)->~TBase(); + } #if ETL_USING_CPP11 //*************************************************************************** @@ -134,12 +136,16 @@ class packet { //*************************************************************************** /// Get access to the contained object. //*************************************************************************** - TBase& get() { return *static_cast(data); } + TBase& get() { + return *static_cast(data); + } //*************************************************************************** /// Get access to the contained object. //*************************************************************************** - const TBase& get() const { return *static_cast(data); } + const TBase& get() const { + return *static_cast(data); + } private: packet(const packet& other); diff --git a/Components/_Libraries/embedded-template-library/include/etl/pool.h b/Components/_Libraries/embedded-template-library/include/etl/pool.h index 4d964baf..d8bdba0d 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/pool.h +++ b/Components/_Libraries/embedded-template-library/include/etl/pool.h @@ -80,7 +80,9 @@ class pool /// If asserts or exceptions are enabled and there are no more free items an /// etl::pool_no_allocation if thrown, otherwise a null pointer is returned. //************************************************************************* - T* create() { return base_t::template create(); } + T* create() { + return base_t::template create(); + } //************************************************************************* /// Allocate storage for an object from the pool and create with 1 parameter. @@ -202,7 +204,9 @@ class pool_ext /// If asserts or exceptions are enabled and there are no more free items an /// etl::pool_no_allocation if thrown, otherwise a null pointer is returned. //************************************************************************* - T* create() { return base_t::template create(); } + T* create() { + return base_t::template create(); + } //************************************************************************* /// Allocate storage for an object from the pool and create with 1 parameter. diff --git a/Components/_Libraries/embedded-template-library/include/etl/priority_queue.h b/Components/_Libraries/embedded-template-library/include/etl/priority_queue.h index 7f0fc50d..f0084ac7 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/priority_queue.h +++ b/Components/_Libraries/embedded-template-library/include/etl/priority_queue.h @@ -128,13 +128,17 @@ class ipriority_queue { /// Gets a reference to the highest priority value in the priority queue.
/// \return A reference to the highest priority value in the priority queue. //************************************************************************* - reference top() { return container.front(); } + reference top() { + return container.front(); + } //************************************************************************* /// Gets a const reference to the highest priority value in the priority queue.
/// \return A const reference to the highest priority value in the priority queue. //************************************************************************* - const_reference top() const { return container.front(); } + const_reference top() const { + return container.front(); + } //************************************************************************* /// Adds a value to the queue. @@ -298,24 +302,32 @@ class ipriority_queue { //************************************************************************* /// Returns the current number of items in the priority queue. //************************************************************************* - size_type size() const { return container.size(); } + size_type size() const { + return container.size(); + } //************************************************************************* /// Returns the maximum number of items that can be queued. //************************************************************************* - size_type max_size() const { return container.max_size(); } + size_type max_size() const { + return container.max_size(); + } //************************************************************************* /// Checks to see if the priority queue is empty. /// \return true if the queue is empty, otherwise false //************************************************************************* - bool empty() const { return container.empty(); } + bool empty() const { + return container.empty(); + } //************************************************************************* /// Checks to see if the priority queue is full. /// \return true if the priority queue is full, otherwise false //************************************************************************* - bool full() const { return container.size() == container.max_size(); } + bool full() const { + return container.size() == container.max_size(); + } //************************************************************************* /// Returns the remaining capacity. @@ -328,7 +340,9 @@ class ipriority_queue { //************************************************************************* /// Clears the queue to the empty state. //************************************************************************* - void clear() { container.clear(); } + void clear() { + container.clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/private/bitset_legacy.h b/Components/_Libraries/embedded-template-library/include/etl/private/bitset_legacy.h index fa080ce3..30e17a55 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/private/bitset_legacy.h +++ b/Components/_Libraries/embedded-template-library/include/etl/private/bitset_legacy.h @@ -211,7 +211,9 @@ class ibitset { //************************************************************************* /// The number of bits in the bitset. //************************************************************************* - size_t size() const { return Active_Bits; } + size_t size() const { + return Active_Bits; + } //************************************************************************* /// Count the number of bits set. @@ -407,12 +409,16 @@ class ibitset { //************************************************************************* /// Put to a unsigned long. //************************************************************************* - unsigned long to_ulong() const { return value(); } + unsigned long to_ulong() const { + return value(); + } //************************************************************************* /// Put to a unsigned long long. //************************************************************************* - unsigned long long to_ullong() const { return value(); } + unsigned long long to_ullong() const { + return value(); + } //************************************************************************* /// Resets the bitset. @@ -508,7 +514,9 @@ class ibitset { //************************************************************************* /// Are any of the bits set? //************************************************************************* - bool any() const { return !none(); } + bool any() const { + return !none(); + } //************************************************************************* /// Are none of the bits set? @@ -528,7 +536,9 @@ class ibitset { ///\param state The state to search for. ///\returns The position of the bit or Number_Of_Elements if none were found. //************************************************************************* - size_t find_first(bool state) const { return find_next(state, 0); } + size_t find_first(bool state) const { + return find_next(state, 0); + } //************************************************************************* /// Finds the next bit in the specified state. @@ -589,7 +599,9 @@ class ibitset { //************************************************************************* /// Read [] operator. //************************************************************************* - bool operator[](size_t position) const { return test(position); } + bool operator[](size_t position) const { + return test(position); + } //************************************************************************* /// Write [] operator. @@ -806,7 +818,9 @@ class ibitset { /// span /// Returns a span of the underlying data. //************************************************************************* - span_type span() { return span_type(pdata, pdata + Number_Of_Elements); } + span_type span() { + return span_type(pdata, pdata + Number_Of_Elements); + } //************************************************************************* /// span diff --git a/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp03.h b/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp03.h index 8d7bda33..6a7f461a 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp03.h +++ b/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp03.h @@ -358,12 +358,16 @@ class delegate //************************************************************************* /// Returns true if the delegate is valid. //************************************************************************* - bool is_valid() const { return invocation.stub != ETL_NULLPTR; } + bool is_valid() const { + return invocation.stub != ETL_NULLPTR; + } //************************************************************************* /// Returns true if the delegate is valid. //************************************************************************* - operator bool() const { return is_valid(); } + operator bool() const { + return is_valid(); + } private: typedef TReturn (*stub_type)(void* object, TParam); @@ -687,12 +691,16 @@ class delegate //************************************************************************* /// Returns true if the delegate is valid. //************************************************************************* - bool is_valid() const { return invocation.stub != ETL_NULLPTR; } + bool is_valid() const { + return invocation.stub != ETL_NULLPTR; + } //************************************************************************* /// Returns true if the delegate is valid. //************************************************************************* - operator bool() const { return is_valid(); } + operator bool() const { + return is_valid(); + } private: typedef TReturn (*stub_type)(void* object); diff --git a/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp11.h b/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp11.h index 371d56d5..96240bf3 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp11.h +++ b/Components/_Libraries/embedded-template-library/include/etl/private/delegate_cpp11.h @@ -345,7 +345,9 @@ class delegate final { //************************************************************************* /// Returns true if the delegate is valid. //************************************************************************* - ETL_CONSTEXPR14 operator bool() const { return is_valid(); } + ETL_CONSTEXPR14 operator bool() const { + return is_valid(); + } private: using stub_type = TReturn (*)(void* object, TParams...); diff --git a/Components/_Libraries/embedded-template-library/include/etl/private/pvoidvector.h b/Components/_Libraries/embedded-template-library/include/etl/private/pvoidvector.h index 0d9e7186..3e4ef9a8 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/private/pvoidvector.h +++ b/Components/_Libraries/embedded-template-library/include/etl/private/pvoidvector.h @@ -322,7 +322,9 @@ class pvoidvector : public vector_base { //************************************************************************* /// Clears the vector. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Inserts a value at the end of the vector. @@ -520,25 +522,33 @@ class pvoidvector : public vector_base { /// Gets the current size of the vector. ///\return The current size of the vector. //************************************************************************* - size_type size() const { return size_t(p_end - p_buffer); } + size_type size() const { + return size_t(p_end - p_buffer); + } //************************************************************************* /// Checks the 'empty' state of the vector. ///\return true if empty. //************************************************************************* - bool empty() const { return (p_end == p_buffer); } + bool empty() const { + return (p_end == p_buffer); + } //************************************************************************* /// Checks the 'full' state of the vector. ///\return true if full. //************************************************************************* - bool full() const { return size() == CAPACITY; } + bool full() const { + return size() == CAPACITY; + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return max_size() - size(); } + size_t available() const { + return max_size() - size(); + } protected: //********************************************************************* @@ -550,7 +560,9 @@ class pvoidvector : public vector_base { //********************************************************************* /// Initialise the vector. //********************************************************************* - void initialise() { p_end = p_buffer; } + void initialise() { + p_end = p_buffer; + } //************************************************************************* /// Fix the internal pointers after a low level memory copy. diff --git a/Components/_Libraries/embedded-template-library/include/etl/private/variant_legacy.h b/Components/_Libraries/embedded-template-library/include/etl/private/variant_legacy.h index 87c556d7..27e2dbca 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/private/variant_legacy.h +++ b/Components/_Libraries/embedded-template-library/include/etl/private/variant_legacy.h @@ -678,7 +678,9 @@ class variant { /// Checks whether a valid value is currently stored. ///\return true if the value is valid, otherwise false. //*************************************************************************** - bool is_valid() const { return type_id != UNSUPPORTED_TYPE_ID; } + bool is_valid() const { + return type_id != UNSUPPORTED_TYPE_ID; + } //*************************************************************************** /// Checks to see if the type currently stored is the same as that specified in the template parameter. @@ -692,12 +694,16 @@ class variant { //*************************************************************************** /// Gets the index of the type currently stored or UNSUPPORTED_TYPE_ID //*************************************************************************** - size_t index() const { return type_id; } + size_t index() const { + return type_id; + } //*************************************************************************** /// Clears the value to 'no valid stored value'. //*************************************************************************** - void clear() { destruct_current(); } + void clear() { + destruct_current(); + } //*************************************************************************** /// Gets the value stored as the specified template type. @@ -821,14 +827,30 @@ class variant { //*************************************************************************** /// Conversion operators for each type. //*************************************************************************** - operator T1&() { return get(); } - operator T2&() { return get(); } - operator T3&() { return get(); } - operator T4&() { return get(); } - operator T5&() { return get(); } - operator T6&() { return get(); } - operator T7&() { return get(); } - operator T8&() { return get(); } + operator T1&() { + return get(); + } + operator T2&() { + return get(); + } + operator T3&() { + return get(); + } + operator T4&() { + return get(); + } + operator T5&() { + return get(); + } + operator T6&() { + return get(); + } + operator T7&() { + return get(); + } + operator T8&() { + return get(); + } //*************************************************************************** /// Checks if the template type is supported by the implementation of variant.. diff --git a/Components/_Libraries/embedded-template-library/include/etl/private/variant_variadic.h b/Components/_Libraries/embedded-template-library/include/etl/private/variant_variadic.h index 58d35cd5..38d9117d 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/private/variant_variadic.h +++ b/Components/_Libraries/embedded-template-library/include/etl/private/variant_variadic.h @@ -770,7 +770,9 @@ class variant { //*************************************************************************** /// Gets the index of the type currently stored or variant_npos //*************************************************************************** - constexpr size_t index() const noexcept { return type_id; } + constexpr size_t index() const noexcept { + return type_id; + } //*************************************************************************** /// Swaps this variant with another. diff --git a/Components/_Libraries/embedded-template-library/include/etl/queue.h b/Components/_Libraries/embedded-template-library/include/etl/queue.h index 196e7173..888bcd29 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/queue.h +++ b/Components/_Libraries/embedded-template-library/include/etl/queue.h @@ -231,19 +231,25 @@ class iqueue : public etl::queue_base { /// Gets a reference to the value at the front of the queue.
/// \return A reference to the value at the front of the queue. //************************************************************************* - reference front() { return p_buffer[out]; } + reference front() { + return p_buffer[out]; + } //************************************************************************* /// Gets a const reference to the value at the front of the queue.
/// \return A const reference to the value at the front of the queue. //************************************************************************* - const_reference front() const { return p_buffer[out]; } + const_reference front() const { + return p_buffer[out]; + } //************************************************************************* /// Gets a reference to the value at the back of the queue.
/// \return A reference to the value at the back of the queue. //************************************************************************* - reference back() { return p_buffer[in == 0 ? CAPACITY - 1 : in - 1]; } + reference back() { + return p_buffer[in == 0 ? CAPACITY - 1 : in - 1]; + } //************************************************************************* /// Gets a const reference to the value at the back of the queue.
@@ -535,7 +541,9 @@ class queue : public etl::iqueue { //************************************************************************* /// Destructor. //************************************************************************* - ~queue() { base_t::clear(); } + ~queue() { + base_t::clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/queue_lockable.h b/Components/_Libraries/embedded-template-library/include/etl/queue_lockable.h index 3f6b74a0..f41e7072 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/queue_lockable.h +++ b/Components/_Libraries/embedded-template-library/include/etl/queue_lockable.h @@ -383,7 +383,9 @@ class iqueue_lockable : public etl::queue_lockable_base { //************************************************************************* /// Pop a value from the queue without locking, and discard. //************************************************************************* - bool pop_unlocked() { return pop_implementation(); } + bool pop_unlocked() { + return pop_implementation(); + } //************************************************************************* /// Pop a value from the queue and discard. @@ -401,7 +403,9 @@ class iqueue_lockable : public etl::queue_lockable_base { //************************************************************************* /// Pop a value from the queue without locking //************************************************************************* - bool pop_unlocked(reference value) { return pop_implementation(value); } + bool pop_unlocked(reference value) { + return pop_implementation(value); + } //************************************************************************* /// Pop a value from the queue. @@ -419,12 +423,16 @@ class iqueue_lockable : public etl::queue_lockable_base { //************************************************************************* /// Peek a value at the front of the queue without locking. //************************************************************************* - reference front_unlocked() { return front_implementation(); } + reference front_unlocked() { + return front_implementation(); + } //************************************************************************* /// Peek a value at the front of the queue without locking. //************************************************************************* - const_reference front_unlocked() const { return front_implementation(); } + const_reference front_unlocked() const { + return front_implementation(); + } //************************************************************************* /// Peek a value at the front of the queue. diff --git a/Components/_Libraries/embedded-template-library/include/etl/queue_mpmc_mutex.h b/Components/_Libraries/embedded-template-library/include/etl/queue_mpmc_mutex.h index da1c66c4..c9aae8f0 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/queue_mpmc_mutex.h +++ b/Components/_Libraries/embedded-template-library/include/etl/queue_mpmc_mutex.h @@ -551,7 +551,9 @@ class iqueue_mpmc_mutex : public queue_mpmc_mutex_base { //************************************************************************* /// Peek a value at the front of the queue. //************************************************************************* - reference front_implementation() { return p_buffer[read_index]; } + reference front_implementation() { + return p_buffer[read_index]; + } //************************************************************************* /// Peek a value at the front of the queue. diff --git a/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_isr.h b/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_isr.h index c7d5a4a5..4f4f6cb1 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_isr.h +++ b/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_isr.h @@ -91,28 +91,38 @@ class queue_spsc_isr_base { //************************************************************************* /// Pop a value from the queue from an ISR //************************************************************************* - bool pop_from_isr(reference value) { return pop_implementation(value); } + bool pop_from_isr(reference value) { + return pop_implementation(value); + } //************************************************************************* /// Pop a value from the queue from an ISR, and discard. //************************************************************************* - bool pop_from_isr() { return pop_implementation(); } + bool pop_from_isr() { + return pop_implementation(); + } //************************************************************************* /// Peek a value at the front of the queue from an ISR //************************************************************************* - reference front_from_isr() { return front_implementation(); } + reference front_from_isr() { + return front_implementation(); + } //************************************************************************* /// Peek a value at the front of the queue from an ISR //************************************************************************* - const_reference front_from_isr() const { return front_implementation(); } + const_reference front_from_isr() const { + return front_implementation(); + } //************************************************************************* /// How much free space available in the queue. /// Called from ISR. //************************************************************************* - size_type available_from_isr() const { return MAX_SIZE - current_size; } + size_type available_from_isr() const { + return MAX_SIZE - current_size; + } //************************************************************************* /// Clear the queue from the ISR. @@ -127,29 +137,39 @@ class queue_spsc_isr_base { /// Is the queue empty? /// Called from ISR. //************************************************************************* - bool empty_from_isr() const { return (current_size == 0); } + bool empty_from_isr() const { + return (current_size == 0); + } //************************************************************************* /// Is the queue full? /// Called from ISR. //************************************************************************* - bool full_from_isr() const { return (current_size == MAX_SIZE); } + bool full_from_isr() const { + return (current_size == MAX_SIZE); + } //************************************************************************* /// How many items in the queue? /// Called from ISR. //************************************************************************* - size_type size_from_isr() const { return current_size; } + size_type size_from_isr() const { + return current_size; + } //************************************************************************* /// How many items can the queue hold. //************************************************************************* - size_type capacity() const { return MAX_SIZE; } + size_type capacity() const { + return MAX_SIZE; + } //************************************************************************* /// How many items can the queue hold. //************************************************************************* - size_type max_size() const { return MAX_SIZE; } + size_type max_size() const { + return MAX_SIZE; + } protected: queue_spsc_isr_base(T* p_buffer_, size_type max_size_) @@ -332,7 +352,9 @@ class queue_spsc_isr_base { //************************************************************************* /// Peek a value at the front of the queue. //************************************************************************* - reference front_implementation() { return p_buffer[read_index]; } + reference front_implementation() { + return p_buffer[read_index]; + } //************************************************************************* /// Peek a value at the front of the queue. diff --git a/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_locked.h b/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_locked.h index 1f303550..2ccac44f 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_locked.h +++ b/Components/_Libraries/embedded-template-library/include/etl/queue_spsc_locked.h @@ -363,7 +363,9 @@ class iqueue_spsc_locked : public iqueue_spsc_locked_base { /// Pop a value from the queue and discard. /// Unlocked //************************************************************************* - bool pop_from_unlocked() { return pop_implementation(); } + bool pop_from_unlocked() { + return pop_implementation(); + } //************************************************************************* /// Pop a value from the queue and discard. @@ -382,7 +384,9 @@ class iqueue_spsc_locked : public iqueue_spsc_locked_base { /// Peek a value from the front of the queue. /// Unlocked //************************************************************************* - reference front_from_unlocked() { return front_implementation(); } + reference front_from_unlocked() { + return front_implementation(); + } //************************************************************************* /// Peek a value from the front of the queue. @@ -685,7 +689,9 @@ class iqueue_spsc_locked : public iqueue_spsc_locked_base { /// Peek a value from the front of the queue. /// Unlocked //************************************************************************* - reference front_implementation() { return p_buffer[this->read_index]; } + reference front_implementation() { + return p_buffer[this->read_index]; + } //************************************************************************* /// Peek a value from the front of the queue. diff --git a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_map.h b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_map.h index 2afa2cc8..9cc922a0 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_map.h +++ b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_map.h @@ -291,43 +291,57 @@ class ireference_flat_map { /// Returns an iterator to the beginning of the reference_flat_map. ///\return An iterator to the beginning of the reference_flat_map. //********************************************************************* - iterator begin() { return iterator(lookup.begin()); } + iterator begin() { + return iterator(lookup.begin()); + } //********************************************************************* /// Returns a const_iterator to the beginning of the reference_flat_map. ///\return A const iterator to the beginning of the reference_flat_map. //********************************************************************* - const_iterator begin() const { return const_iterator(lookup.begin()); } + const_iterator begin() const { + return const_iterator(lookup.begin()); + } //********************************************************************* /// Returns an iterator to the end of the reference_flat_map. ///\return An iterator to the end of the reference_flat_map. //********************************************************************* - iterator end() { return iterator(lookup.end()); } + iterator end() { + return iterator(lookup.end()); + } //********************************************************************* /// Returns a const_iterator to the end of the reference_flat_map. ///\return A const iterator to the end of the reference_flat_map. //********************************************************************* - const_iterator end() const { return const_iterator(lookup.end()); } + const_iterator end() const { + return const_iterator(lookup.end()); + } //********************************************************************* /// Returns a const_iterator to the beginning of the reference_flat_map. ///\return A const iterator to the beginning of the reference_flat_map. //********************************************************************* - const_iterator cbegin() const { return const_iterator(lookup.cbegin()); } + const_iterator cbegin() const { + return const_iterator(lookup.cbegin()); + } //********************************************************************* /// Returns a const_iterator to the end of the reference_flat_map. ///\return A const iterator to the end of the reference_flat_map. //********************************************************************* - const_iterator cend() const { return const_iterator(lookup.cend()); } + const_iterator cend() const { + return const_iterator(lookup.cend()); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the reference_flat_map. ///\return Iterator to the reverse beginning of the reference_flat_map. //********************************************************************* - reverse_iterator rbegin() { return reverse_iterator(lookup.rbegin()); } + reverse_iterator rbegin() { + return reverse_iterator(lookup.rbegin()); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the reference_flat_map. @@ -341,7 +355,9 @@ class ireference_flat_map { /// Returns a reverse iterator to the end + 1 of the reference_flat_map. ///\return Reverse iterator to the end + 1 of the reference_flat_map. //********************************************************************* - reverse_iterator rend() { return reverse_iterator(lookup.rend()); } + reverse_iterator rend() { + return reverse_iterator(lookup.rend()); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the reference_flat_map. @@ -584,7 +600,9 @@ class ireference_flat_map { //************************************************************************* /// Clears the reference_flat_map. //************************************************************************* - void clear() { lookup.clear(); } + void clear() { + lookup.clear(); + } //********************************************************************* /// Finds an element. @@ -807,7 +825,9 @@ class ireference_flat_map { //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(const TKey& key) const { return find(key) != end(); } + bool contains(const TKey& key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -822,37 +842,49 @@ class ireference_flat_map { /// Gets the current size of the reference_flat_map. ///\return The current size of the reference_flat_map. //************************************************************************* - size_type size() const { return lookup.size(); } + size_type size() const { + return lookup.size(); + } //************************************************************************* /// Checks the 'empty' state of the reference_flat_map. ///\return true if empty. //************************************************************************* - bool empty() const { return lookup.empty(); } + bool empty() const { + return lookup.empty(); + } //************************************************************************* /// Checks the 'full' state of the reference_flat_map. ///\return true if full. //************************************************************************* - bool full() const { return lookup.full(); } + bool full() const { + return lookup.full(); + } //************************************************************************* /// Returns the capacity of the reference_flat_map. ///\return The capacity of the reference_flat_map. //************************************************************************* - size_type capacity() const { return lookup.capacity(); } + size_type capacity() const { + return lookup.capacity(); + } //************************************************************************* /// Returns the maximum possible size of the reference_flat_map. ///\return The maximum size of the reference_flat_map. //************************************************************************* - size_type max_size() const { return lookup.max_size(); } + size_type max_size() const { + return lookup.max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return lookup.available(); } + size_t available() const { + return lookup.available(); + } protected: //********************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multimap.h b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multimap.h index f2088d69..53ac12c8 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multimap.h +++ b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multimap.h @@ -267,43 +267,57 @@ class ireference_flat_multimap { /// Returns an iterator to the beginning of the reference_flat_multimap. ///\return An iterator to the beginning of the reference_flat_multimap. //********************************************************************* - iterator begin() { return iterator(lookup.begin()); } + iterator begin() { + return iterator(lookup.begin()); + } //********************************************************************* /// Returns a const_iterator to the beginning of the reference_flat_multimap. ///\return A const iterator to the beginning of the reference_flat_multimap. //********************************************************************* - const_iterator begin() const { return const_iterator(lookup.begin()); } + const_iterator begin() const { + return const_iterator(lookup.begin()); + } //********************************************************************* /// Returns an iterator to the end of the reference_flat_multimap. ///\return An iterator to the end of the reference_flat_multimap. //********************************************************************* - iterator end() { return iterator(lookup.end()); } + iterator end() { + return iterator(lookup.end()); + } //********************************************************************* /// Returns a const_iterator to the end of the reference_flat_multimap. ///\return A const iterator to the end of the reference_flat_multimap. //********************************************************************* - const_iterator end() const { return const_iterator(lookup.end()); } + const_iterator end() const { + return const_iterator(lookup.end()); + } //********************************************************************* /// Returns a const_iterator to the beginning of the reference_flat_multimap. ///\return A const iterator to the beginning of the reference_flat_multimap. //********************************************************************* - const_iterator cbegin() const { return const_iterator(lookup.cbegin()); } + const_iterator cbegin() const { + return const_iterator(lookup.cbegin()); + } //********************************************************************* /// Returns a const_iterator to the end of the reference_flat_multimap. ///\return A const iterator to the end of the reference_flat_multimap. //********************************************************************* - const_iterator cend() const { return const_iterator(lookup.cend()); } + const_iterator cend() const { + return const_iterator(lookup.cend()); + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the reference_flat_multimap. ///\return Iterator to the reverse beginning of the reference_flat_multimap. //********************************************************************* - reverse_iterator rbegin() { return reverse_iterator(lookup.rbegin()); } + reverse_iterator rbegin() { + return reverse_iterator(lookup.rbegin()); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap. @@ -317,7 +331,9 @@ class ireference_flat_multimap { /// Returns a reverse iterator to the end + 1 of the reference_flat_multimap. ///\return Reverse iterator to the end + 1 of the reference_flat_multimap. //********************************************************************* - reverse_iterator rend() { return reverse_iterator(lookup.rend()); } + reverse_iterator rend() { + return reverse_iterator(lookup.rend()); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the reference_flat_multimap. @@ -470,7 +486,9 @@ class ireference_flat_multimap { //************************************************************************* /// Clears the reference_flat_multimap. //************************************************************************* - void clear() { lookup.clear(); } + void clear() { + lookup.clear(); + } //********************************************************************* /// Finds an element. @@ -703,7 +721,9 @@ class ireference_flat_multimap { //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(const TKey& key) const { return find(key) != end(); } + bool contains(const TKey& key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -718,37 +738,49 @@ class ireference_flat_multimap { /// Gets the current size of the flat_multiset. ///\return The current size of the flat_multiset. //************************************************************************* - size_type size() const { return lookup.size(); } + size_type size() const { + return lookup.size(); + } //************************************************************************* /// Checks the 'empty' state of the flat_multiset. ///\return true if empty. //************************************************************************* - bool empty() const { return lookup.empty(); } + bool empty() const { + return lookup.empty(); + } //************************************************************************* /// Checks the 'full' state of the flat_multiset. ///\return true if full. //************************************************************************* - bool full() const { return lookup.full(); } + bool full() const { + return lookup.full(); + } //************************************************************************* /// Returns the capacity of the flat_multiset. ///\return The capacity of the flat_multiset. //************************************************************************* - size_type capacity() const { return lookup.capacity(); } + size_type capacity() const { + return lookup.capacity(); + } //************************************************************************* /// Returns the maximum possible size of the flat_multiset. ///\return The maximum size of the flat_multiset. //************************************************************************* - size_type max_size() const { return lookup.max_size(); } + size_type max_size() const { + return lookup.max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return lookup.available(); } + size_t available() const { + return lookup.available(); + } protected: //********************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multiset.h b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multiset.h index 1bc0fc97..488d2c3e 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multiset.h +++ b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_multiset.h @@ -462,7 +462,9 @@ class ireference_flat_multiset { //************************************************************************* /// Clears the reference_flat_multiset. //************************************************************************* - void clear() { lookup.clear(); } + void clear() { + lookup.clear(); + } //********************************************************************* /// Finds an element. @@ -657,7 +659,9 @@ class ireference_flat_multiset { //************************************************************************* /// Check if the map contains the key. //************************************************************************* - bool contains(parameter_t key) const { return find(key) != end(); } + bool contains(parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -682,37 +686,49 @@ class ireference_flat_multiset { /// Gets the current size of the reference_flat_multiset. ///\return The current size of the reference_flat_multiset. //************************************************************************* - size_type size() const { return lookup.size(); } + size_type size() const { + return lookup.size(); + } //************************************************************************* /// Checks the 'empty' state of the reference_flat_multiset. ///\return true if empty. //************************************************************************* - bool empty() const { return lookup.empty(); } + bool empty() const { + return lookup.empty(); + } //************************************************************************* /// Checks the 'full' state of the reference_flat_multiset. ///\return true if full. //************************************************************************* - bool full() const { return lookup.full(); } + bool full() const { + return lookup.full(); + } //************************************************************************* /// Returns the capacity of the reference_flat_multiset. ///\return The capacity of the reference_flat_multiset. //************************************************************************* - size_type capacity() const { return lookup.capacity(); } + size_type capacity() const { + return lookup.capacity(); + } //************************************************************************* /// Returns the maximum possible size of the reference_flat_multiset. ///\return The maximum size of the reference_flat_multiset. //************************************************************************* - size_type max_size() const { return lookup.max_size(); } + size_type max_size() const { + return lookup.max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return lookup.available(); } + size_t available() const { + return lookup.available(); + } protected: //********************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_set.h b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_set.h index 9e3b39b0..e7bd6309 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/reference_flat_set.h +++ b/Components/_Libraries/embedded-template-library/include/etl/reference_flat_set.h @@ -441,7 +441,9 @@ class ireference_flat_set { //************************************************************************* /// Clears the reference_flat_set. //************************************************************************* - void clear() { lookup.clear(); } + void clear() { + lookup.clear(); + } //********************************************************************* /// Finds an element. @@ -524,7 +526,9 @@ class ireference_flat_set { ///\param key The key to search for. ///\return 1 if the key exists, otherwise 0. //********************************************************************* - size_t count(parameter_t key) const { return (find(key) == end()) ? 0 : 1; } + size_t count(parameter_t key) const { + return (find(key) == end()) ? 0 : 1; + } #if ETL_USING_CPP11 //********************************************************************* @@ -648,7 +652,9 @@ class ireference_flat_set { //************************************************************************* /// Check if the set contains the key. //************************************************************************* - bool contains(parameter_t key) const { return find(key) != end(); } + bool contains(parameter_t key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -663,37 +669,49 @@ class ireference_flat_set { /// Gets the current size of the reference_flat_set. ///\return The current size of the reference_flat_set. //************************************************************************* - size_type size() const { return lookup.size(); } + size_type size() const { + return lookup.size(); + } //************************************************************************* /// Checks the 'empty' state of the reference_flat_set. ///\return true if empty. //************************************************************************* - bool empty() const { return lookup.empty(); } + bool empty() const { + return lookup.empty(); + } //************************************************************************* /// Checks the 'full' state of the reference_flat_set. ///\return true if full. //************************************************************************* - bool full() const { return lookup.full(); } + bool full() const { + return lookup.full(); + } //************************************************************************* /// Returns the capacity of the reference_flat_set. ///\return The capacity of the reference_flat_set. //************************************************************************* - size_type capacity() const { return lookup.capacity(); } + size_type capacity() const { + return lookup.capacity(); + } //************************************************************************* /// Returns the maximum possible size of the reference_flat_set. ///\return The maximum size of the reference_flat_set. //************************************************************************* - size_type max_size() const { return lookup.max_size(); } + size_type max_size() const { + return lookup.max_size(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return lookup.available(); } + size_t available() const { + return lookup.available(); + } protected: //********************************************************************* diff --git a/Components/_Libraries/embedded-template-library/include/etl/set.h b/Components/_Libraries/embedded-template-library/include/etl/set.h index 5b9e561d..613b1ac3 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/set.h +++ b/Components/_Libraries/embedded-template-library/include/etl/set.h @@ -708,12 +708,16 @@ class iset : public etl::set_base { //************************************************************************* /// Gets the end of the set. //************************************************************************* - iterator end() { return iterator(*this); } + iterator end() { + return iterator(*this); + } //************************************************************************* /// Gets the end of the set. //************************************************************************* - const_iterator end() const { return const_iterator(*this); } + const_iterator end() const { + return const_iterator(*this); + } //************************************************************************* /// Gets the beginning of the set. @@ -725,12 +729,16 @@ class iset : public etl::set_base { //************************************************************************* /// Gets the end of the set. //************************************************************************* - const_iterator cend() const { return const_iterator(*this); } + const_iterator cend() const { + return const_iterator(*this); + } //************************************************************************* /// Gets the reverse beginning of the list. //************************************************************************* - reverse_iterator rbegin() { return reverse_iterator(iterator(*this)); } + reverse_iterator rbegin() { + return reverse_iterator(iterator(*this)); + } //************************************************************************* /// Gets the reverse beginning of the list. @@ -786,7 +794,9 @@ class iset : public etl::set_base { //************************************************************************* /// Clears the set. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts the number of elements that contain the key specified. @@ -1125,17 +1135,23 @@ class iset : public etl::set_base { //************************************************************************* /// How to compare two key elements. //************************************************************************* - key_compare key_comp() const { return compare; }; + key_compare key_comp() const { + return compare; + }; //************************************************************************* /// How to compare two value elements. //************************************************************************* - value_compare value_comp() const { return compare; }; + value_compare value_comp() const { + return compare; + }; //************************************************************************* /// Check if the set contains the key. //************************************************************************* - bool contains(const TKey& key) const { return find(key) != end(); } + bool contains(const TKey& key) const { + return find(key) != end(); + } #if ETL_USING_CPP11 //************************************************************************* @@ -2195,7 +2211,9 @@ class set : public etl::iset { //************************************************************************* /// Destructor. //************************************************************************* - ~set() { this->initialise(); } + ~set() { + this->initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/shared_message.h b/Components/_Libraries/embedded-template-library/include/etl/shared_message.h index b7656f4b..4718a330 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/shared_message.h +++ b/Components/_Libraries/embedded-template-library/include/etl/shared_message.h @@ -168,7 +168,9 @@ class shared_message { //************************************************************************* /// Checks if the shared message is valid. //************************************************************************* - ETL_NODISCARD bool is_valid() const { return p_rcmessage != ETL_NULLPTR; } + ETL_NODISCARD bool is_valid() const { + return p_rcmessage != ETL_NULLPTR; + } private: shared_message() ETL_DELETE; diff --git a/Components/_Libraries/embedded-template-library/include/etl/stack.h b/Components/_Libraries/embedded-template-library/include/etl/stack.h index 1db9f534..7670a59f 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/stack.h +++ b/Components/_Libraries/embedded-template-library/include/etl/stack.h @@ -205,7 +205,9 @@ class istack : public etl::stack_base { /// Gets a reference to the value at the top of the stack.
/// \return A reference to the value at the top of the stack. //************************************************************************* - reference top() { return p_buffer[top_index]; } + reference top() { + return p_buffer[top_index]; + } //************************************************************************* /// Adds a value to the stack. @@ -312,7 +314,9 @@ class istack : public etl::stack_base { /// Gets a const reference to the value at the top of the stack.
/// \return A const reference to the value at the top of the stack. //************************************************************************* - const_reference top() const { return p_buffer[top_index]; } + const_reference top() const { + return p_buffer[top_index]; + } //************************************************************************* /// Clears the stack to the empty state. @@ -361,7 +365,9 @@ class istack : public etl::stack_base { //************************************************************************* /// Reverses the stack. //************************************************************************* - void reverse() { etl::reverse(p_buffer, p_buffer + current_size); } + void reverse() { + etl::reverse(p_buffer, p_buffer + current_size); + } //************************************************************************* /// Assignment operator. @@ -482,7 +488,9 @@ class stack : public etl::istack { //************************************************************************* /// Destructor. //************************************************************************* - ~stack() { etl::istack::clear(); } + ~stack() { + etl::istack::clear(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/successor.h b/Components/_Libraries/embedded-template-library/include/etl/successor.h index deec6845..914dc1df 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/successor.h +++ b/Components/_Libraries/embedded-template-library/include/etl/successor.h @@ -124,7 +124,9 @@ class successor { //************************************************************************* /// Clear the successor. //************************************************************************* - void clear_successor() { p_successor = ETL_NULLPTR; } + void clear_successor() { + p_successor = ETL_NULLPTR; + } //************************************************************************* /// Clear the successor chain. @@ -149,7 +151,9 @@ class successor { //************************************************************************* /// Does this have a successor? //************************************************************************* - bool has_successor() const { return (p_successor != ETL_NULLPTR); } + bool has_successor() const { + return (p_successor != ETL_NULLPTR); + } private: successor_type* p_successor; diff --git a/Components/_Libraries/embedded-template-library/include/etl/type_traits.h b/Components/_Libraries/embedded-template-library/include/etl/type_traits.h index dcd03f9f..4b63c2b9 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/type_traits.h +++ b/Components/_Libraries/embedded-template-library/include/etl/type_traits.h @@ -1404,7 +1404,7 @@ struct is_pod #if ETL_USING_CPP17 template inline constexpr bool is_pod_v = - std::is_standard_layout_v && std::is_trivial_v; + std::is_standard_layout_v&& std::is_trivial_v; #endif #if defined(ETL_COMPILER_GCC) diff --git a/Components/_Libraries/embedded-template-library/include/etl/unordered_map.h b/Components/_Libraries/embedded-template-library/include/etl/unordered_map.h index fc61d4e7..25083678 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/unordered_map.h +++ b/Components/_Libraries/embedded-template-library/include/etl/unordered_map.h @@ -420,19 +420,25 @@ class iunordered_map { /// Returns an iterator to the beginning of the unordered_map bucket. ///\return An iterator to the beginning of the unordered_map bucket. //********************************************************************* - local_iterator begin(size_t i) { return pbuckets[i].begin(); } + local_iterator begin(size_t i) { + return pbuckets[i].begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_map bucket. ///\return A const iterator to the beginning of the unordered_map bucket. //********************************************************************* - const_local_iterator begin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator begin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_map bucket. ///\return A const iterator to the beginning of the unordered_map bucket. //********************************************************************* - const_local_iterator cbegin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator cbegin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns an iterator to the end of the unordered_map. @@ -464,19 +470,25 @@ class iunordered_map { /// Returns an iterator to the end of the unordered_map bucket. ///\return An iterator to the end of the unordered_map bucket. //********************************************************************* - local_iterator end(size_t i) { return pbuckets[i].end(); } + local_iterator end(size_t i) { + return pbuckets[i].end(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_map bucket. ///\return A const iterator to the end of the unordered_map bucket. //********************************************************************* - const_local_iterator end(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator end(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_map bucket. ///\return A const iterator to the end of the unordered_map bucket. //********************************************************************* - const_local_iterator cend(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator cend(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns the bucket index for the key. @@ -500,13 +512,17 @@ class iunordered_map { /// Returns the maximum number of the buckets the container can hold. ///\return The maximum number of the buckets the container can hold. //********************************************************************* - size_type max_bucket_count() const { return number_of_buckets; } + size_type max_bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Returns the number of the buckets the container holds. ///\return The number of the buckets the container holds. //********************************************************************* - size_type bucket_count() const { return number_of_buckets; } + size_type bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Returns a reference to the value at index 'key' @@ -932,7 +948,9 @@ class iunordered_map { //************************************************************************* /// Clears the unordered_map. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts an element. @@ -1047,33 +1065,45 @@ class iunordered_map { //************************************************************************* /// Gets the size of the unordered_map. //************************************************************************* - size_type size() const { return pnodepool->size(); } + size_type size() const { + return pnodepool->size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_map. //************************************************************************* - size_type max_size() const { return pnodepool->max_size(); } + size_type max_size() const { + return pnodepool->max_size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_map. //************************************************************************* - size_type capacity() const { return pnodepool->max_size(); } + size_type capacity() const { + return pnodepool->max_size(); + } //************************************************************************* /// Checks to see if the unordered_map is empty. //************************************************************************* - bool empty() const { return pnodepool->empty(); } + bool empty() const { + return pnodepool->empty(); + } //************************************************************************* /// Checks to see if the unordered_map is full. //************************************************************************* - bool full() const { return pnodepool->full(); } + bool full() const { + return pnodepool->full(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return pnodepool->available(); } + size_t available() const { + return pnodepool->available(); + } //************************************************************************* /// Returns the load factor = size / bucket_count. @@ -1087,13 +1117,17 @@ class iunordered_map { /// Returns the function that hashes the keys. ///\return The function that hashes the keys.. //************************************************************************* - hasher hash_function() const { return key_hash_function; } + hasher hash_function() const { + return key_hash_function; + } //************************************************************************* /// Returns the function that compares the keys. ///\return The function that compares the keys.. //************************************************************************* - key_equal key_eq() const { return key_equal_function; } + key_equal key_eq() const { + return key_equal_function; + } //************************************************************************* /// Assignment operator. @@ -1393,7 +1427,9 @@ class unordered_map //************************************************************************* /// Destructor. //************************************************************************* - ~unordered_map() { base::initialise(); } + ~unordered_map() { + base::initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/unordered_multimap.h b/Components/_Libraries/embedded-template-library/include/etl/unordered_multimap.h index f045f4e7..f9950c3a 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/unordered_multimap.h +++ b/Components/_Libraries/embedded-template-library/include/etl/unordered_multimap.h @@ -422,19 +422,25 @@ class iunordered_multimap { /// Returns an iterator to the beginning of the unordered_multimap bucket. ///\return An iterator to the beginning of the unordered_multimap bucket. //********************************************************************* - local_iterator begin(size_t i) { return pbuckets[i].begin(); } + local_iterator begin(size_t i) { + return pbuckets[i].begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_multimap bucket. ///\return A const iterator to the beginning of the unordered_multimap bucket. //********************************************************************* - const_local_iterator begin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator begin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_multimap bucket. ///\return A const iterator to the beginning of the unordered_multimap bucket. //********************************************************************* - const_local_iterator cbegin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator cbegin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns an iterator to the end of the unordered_multimap. @@ -466,19 +472,25 @@ class iunordered_multimap { /// Returns an iterator to the end of the unordered_multimap bucket. ///\return An iterator to the end of the unordered_multimap bucket. //********************************************************************* - local_iterator end(size_t i) { return pbuckets[i].end(); } + local_iterator end(size_t i) { + return pbuckets[i].end(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_multimap bucket. ///\return A const iterator to the end of the unordered_multimap bucket. //********************************************************************* - const_local_iterator end(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator end(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_multimap bucket. ///\return A const iterator to the end of the unordered_multimap bucket. //********************************************************************* - const_local_iterator cend(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator cend(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns the bucket index for the key. @@ -502,13 +514,17 @@ class iunordered_multimap { /// Returns the maximum number of the buckets the container can hold. ///\return The maximum number of the buckets the container can hold. //********************************************************************* - size_type max_bucket_count() const { return number_of_buckets; } + size_type max_bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Returns the number of the buckets the container holds. ///\return The number of the buckets the container holds. //********************************************************************* - size_type bucket_count() const { return number_of_buckets; } + size_type bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Assigns values to the unordered_multimap. @@ -828,7 +844,9 @@ class iunordered_multimap { //************************************************************************* /// Clears the unordered_multimap. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts an element. @@ -965,33 +983,45 @@ class iunordered_multimap { //************************************************************************* /// Gets the size of the unordered_multimap. //************************************************************************* - size_type size() const { return pnodepool->size(); } + size_type size() const { + return pnodepool->size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_multimap. //************************************************************************* - size_type max_size() const { return pnodepool->max_size(); } + size_type max_size() const { + return pnodepool->max_size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_multimap. //************************************************************************* - size_type capacity() const { return pnodepool->max_size(); } + size_type capacity() const { + return pnodepool->max_size(); + } //************************************************************************* /// Checks to see if the unordered_multimap is empty. //************************************************************************* - bool empty() const { return pnodepool->empty(); } + bool empty() const { + return pnodepool->empty(); + } //************************************************************************* /// Checks to see if the unordered_multimap is full. //************************************************************************* - bool full() const { return pnodepool->full(); } + bool full() const { + return pnodepool->full(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return pnodepool->available(); } + size_t available() const { + return pnodepool->available(); + } //************************************************************************* /// Returns the load factor = size / bucket_count. @@ -1005,13 +1035,17 @@ class iunordered_multimap { /// Returns the function that hashes the keys. ///\return The function that hashes the keys.. //************************************************************************* - hasher hash_function() const { return key_hash_function; } + hasher hash_function() const { + return key_hash_function; + } //************************************************************************* /// Returns the function that compares the keys. ///\return The function that compares the keys.. //************************************************************************* - key_equal key_eq() const { return key_equal_function; } + key_equal key_eq() const { + return key_equal_function; + } //************************************************************************* /// Assignment operator. @@ -1317,7 +1351,9 @@ class unordered_multimap //************************************************************************* /// Destructor. //************************************************************************* - ~unordered_multimap() { base::initialise(); } + ~unordered_multimap() { + base::initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/unordered_multiset.h b/Components/_Libraries/embedded-template-library/include/etl/unordered_multiset.h index 99ad6507..a7af1c1e 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/unordered_multiset.h +++ b/Components/_Libraries/embedded-template-library/include/etl/unordered_multiset.h @@ -417,19 +417,25 @@ class iunordered_multiset { /// Returns an iterator to the beginning of the unordered_multiset bucket. ///\return An iterator to the beginning of the unordered_multiset bucket. //********************************************************************* - local_iterator begin(size_t i) { return pbuckets[i].begin(); } + local_iterator begin(size_t i) { + return pbuckets[i].begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_multiset bucket. ///\return A const iterator to the beginning of the unordered_multiset bucket. //********************************************************************* - const_local_iterator begin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator begin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_multiset bucket. ///\return A const iterator to the beginning of the unordered_multiset bucket. //********************************************************************* - const_local_iterator cbegin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator cbegin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns an iterator to the end of the unordered_multiset. @@ -461,19 +467,25 @@ class iunordered_multiset { /// Returns an iterator to the end of the unordered_multiset bucket. ///\return An iterator to the end of the unordered_multiset bucket. //********************************************************************* - local_iterator end(size_t i) { return pbuckets[i].end(); } + local_iterator end(size_t i) { + return pbuckets[i].end(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_multiset bucket. ///\return A const iterator to the end of the unordered_multiset bucket. //********************************************************************* - const_local_iterator end(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator end(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_multiset bucket. ///\return A const iterator to the end of the unordered_multiset bucket. //********************************************************************* - const_local_iterator cend(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator cend(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns the bucket index for the key. @@ -497,13 +509,17 @@ class iunordered_multiset { /// Returns the maximum number of the buckets the container can hold. ///\return The maximum number of the buckets the container can hold. //********************************************************************* - size_type max_bucket_count() const { return number_of_buckets; } + size_type max_bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Returns the number of the buckets the container holds. ///\return The number of the buckets the container holds. //********************************************************************* - size_type bucket_count() const { return number_of_buckets; } + size_type bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Assigns values to the unordered_multiset. @@ -811,7 +827,9 @@ class iunordered_multiset { //************************************************************************* /// Clears the unordered_multiset. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts an element. @@ -948,33 +966,45 @@ class iunordered_multiset { //************************************************************************* /// Gets the size of the unordered_multiset. //************************************************************************* - size_type size() const { return pnodepool->size(); } + size_type size() const { + return pnodepool->size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_multiset. //************************************************************************* - size_type max_size() const { return pnodepool->max_size(); } + size_type max_size() const { + return pnodepool->max_size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_multiset. //************************************************************************* - size_type capacity() const { return pnodepool->max_size(); } + size_type capacity() const { + return pnodepool->max_size(); + } //************************************************************************* /// Checks to see if the unordered_multiset is empty. //************************************************************************* - bool empty() const { return pnodepool->empty(); } + bool empty() const { + return pnodepool->empty(); + } //************************************************************************* /// Checks to see if the unordered_multiset is full. //************************************************************************* - bool full() const { return pnodepool->full(); } + bool full() const { + return pnodepool->full(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return pnodepool->available(); } + size_t available() const { + return pnodepool->available(); + } //************************************************************************* /// Returns the load factor = size / bucket_count. @@ -988,13 +1018,17 @@ class iunordered_multiset { /// Returns the function that hashes the keys. ///\return The function that hashes the keys.. //************************************************************************* - hasher hash_function() const { return key_hash_function; } + hasher hash_function() const { + return key_hash_function; + } //************************************************************************* /// Returns the function that compares the keys. ///\return The function that compares the keys.. //************************************************************************* - key_equal key_eq() const { return key_equal_function; } + key_equal key_eq() const { + return key_equal_function; + } //************************************************************************* /// Assignment operator. @@ -1299,7 +1333,9 @@ class unordered_multiset //************************************************************************* /// Destructor. //************************************************************************* - ~unordered_multiset() { base::initialise(); } + ~unordered_multiset() { + base::initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/unordered_set.h b/Components/_Libraries/embedded-template-library/include/etl/unordered_set.h index ae3dfb60..a757f17b 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/unordered_set.h +++ b/Components/_Libraries/embedded-template-library/include/etl/unordered_set.h @@ -415,19 +415,25 @@ class iunordered_set { /// Returns an iterator to the beginning of the unordered_set bucket. ///\return An iterator to the beginning of the unordered_set bucket. //********************************************************************* - local_iterator begin(size_t i) { return pbuckets[i].begin(); } + local_iterator begin(size_t i) { + return pbuckets[i].begin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_set bucket. ///\return A const iterator to the beginning of the unordered_set bucket. //********************************************************************* - const_local_iterator begin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator begin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns a const_iterator to the beginning of the unordered_set bucket. ///\return A const iterator to the beginning of the unordered_set bucket. //********************************************************************* - const_local_iterator cbegin(size_t i) const { return pbuckets[i].cbegin(); } + const_local_iterator cbegin(size_t i) const { + return pbuckets[i].cbegin(); + } //********************************************************************* /// Returns an iterator to the end of the unordered_set. @@ -457,19 +463,25 @@ class iunordered_set { /// Returns an iterator to the end of the unordered_set bucket. ///\return An iterator to the end of the unordered_set bucket. //********************************************************************* - local_iterator end(size_t i) { return pbuckets[i].end(); } + local_iterator end(size_t i) { + return pbuckets[i].end(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_set bucket. ///\return A const iterator to the end of the unordered_set bucket. //********************************************************************* - const_local_iterator end(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator end(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns a const_iterator to the end of the unordered_set bucket. ///\return A const iterator to the end of the unordered_set bucket. //********************************************************************* - const_local_iterator cend(size_t i) const { return pbuckets[i].cend(); } + const_local_iterator cend(size_t i) const { + return pbuckets[i].cend(); + } //********************************************************************* /// Returns the bucket index for the key. @@ -493,13 +505,17 @@ class iunordered_set { /// Returns the maximum number of the buckets the container can hold. ///\return The maximum number of the buckets the container can hold. //********************************************************************* - size_type max_bucket_count() const { return number_of_buckets; } + size_type max_bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Returns the number of the buckets the container holds. ///\return The number of the buckets the container holds. //********************************************************************* - size_type bucket_count() const { return number_of_buckets; } + size_type bucket_count() const { + return number_of_buckets; + } //********************************************************************* /// Assigns values to the unordered_set. @@ -825,7 +841,9 @@ class iunordered_set { //************************************************************************* /// Clears the unordered_set. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //********************************************************************* /// Counts an element. @@ -940,33 +958,45 @@ class iunordered_set { //************************************************************************* /// Gets the size of the unordered_set. //************************************************************************* - size_type size() const { return pnodepool->size(); } + size_type size() const { + return pnodepool->size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_set. //************************************************************************* - size_type max_size() const { return pnodepool->max_size(); } + size_type max_size() const { + return pnodepool->max_size(); + } //************************************************************************* /// Gets the maximum possible size of the unordered_set. //************************************************************************* - size_type capacity() const { return pnodepool->max_size(); } + size_type capacity() const { + return pnodepool->max_size(); + } //************************************************************************* /// Checks to see if the unordered_set is empty. //************************************************************************* - bool empty() const { return pnodepool->empty(); } + bool empty() const { + return pnodepool->empty(); + } //************************************************************************* /// Checks to see if the unordered_set is full. //************************************************************************* - bool full() const { return pnodepool->full(); } + bool full() const { + return pnodepool->full(); + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return pnodepool->available(); } + size_t available() const { + return pnodepool->available(); + } //************************************************************************* /// Returns the load factor = size / bucket_count. @@ -980,13 +1010,17 @@ class iunordered_set { /// Returns the function that hashes the keys. ///\return The function that hashes the keys.. //************************************************************************* - hasher hash_function() const { return key_hash_function; } + hasher hash_function() const { + return key_hash_function; + } //************************************************************************* /// Returns the function that compares the keys. ///\return The function that compares the keys.. //************************************************************************* - key_equal key_eq() const { return key_equal_function; } + key_equal key_eq() const { + return key_equal_function; + } //************************************************************************* /// Assignment operator. @@ -1293,7 +1327,9 @@ class unordered_set : public etl::iunordered_set { //************************************************************************* /// Destructor. //************************************************************************* - ~unordered_set() { base::initialise(); } + ~unordered_set() { + base::initialise(); + } //************************************************************************* /// Assignment operator. diff --git a/Components/_Libraries/embedded-template-library/include/etl/user_type.h b/Components/_Libraries/embedded-template-library/include/etl/user_type.h index 33ab3f14..fb6f0d7d 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/user_type.h +++ b/Components/_Libraries/embedded-template-library/include/etl/user_type.h @@ -86,15 +86,9 @@ SOFTWARE. return *this; \ } \ explicit TypeName(ValueType value_) : value(value_) {} \ - operator ValueType() const { \ - return value; \ - } \ - ValueType& get() { \ - return value; \ - } \ - const ValueType& get() const { \ - return value; \ - } \ + operator ValueType() const { return value; } \ + ValueType& get() { return value; } \ + const ValueType& get() const { return value; } \ TypeName& operator++() { \ ++value; \ return *this; \ diff --git a/Components/_Libraries/embedded-template-library/include/etl/variant_pool.h b/Components/_Libraries/embedded-template-library/include/etl/variant_pool.h index c805a78b..a7b91fe3 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/variant_pool.h +++ b/Components/_Libraries/embedded-template-library/include/etl/variant_pool.h @@ -194,7 +194,9 @@ class variant_pool : public etl::generic_pool< //************************************************************************* /// Returns the maximum number of items in the variant_pool. //************************************************************************* - size_t max_size() const { return MAX_SIZE; } + size_t max_size() const { + return MAX_SIZE; + } private: variant_pool(const variant_pool&) ETL_DELETE; @@ -333,7 +335,9 @@ class variant_pool_ext //************************************************************************* /// Returns the maximum number of items in the variant_pool. //************************************************************************* - size_t max_size() const { return base_t::max_size(); } + size_t max_size() const { + return base_t::max_size(); + } private: variant_pool_ext(const variant_pool_ext&) ETL_DELETE; diff --git a/Components/_Libraries/embedded-template-library/include/etl/vector.h b/Components/_Libraries/embedded-template-library/include/etl/vector.h index 6022e4ba..923614f2 100644 --- a/Components/_Libraries/embedded-template-library/include/etl/vector.h +++ b/Components/_Libraries/embedded-template-library/include/etl/vector.h @@ -92,43 +92,57 @@ class ivector : public etl::vector_base { /// Returns an iterator to the beginning of the vector. ///\return An iterator to the beginning of the vector. //********************************************************************* - iterator begin() { return p_buffer; } + iterator begin() { + return p_buffer; + } //********************************************************************* /// Returns a const_iterator to the beginning of the vector. ///\return A const iterator to the beginning of the vector. //********************************************************************* - const_iterator begin() const { return p_buffer; } + const_iterator begin() const { + return p_buffer; + } //********************************************************************* /// Returns an iterator to the end of the vector. ///\return An iterator to the end of the vector. //********************************************************************* - iterator end() { return p_end; } + iterator end() { + return p_end; + } //********************************************************************* /// Returns a const_iterator to the end of the vector. ///\return A const iterator to the end of the vector. //********************************************************************* - const_iterator end() const { return p_end; } + const_iterator end() const { + return p_end; + } //********************************************************************* /// Returns a const_iterator to the beginning of the vector. ///\return A const iterator to the beginning of the vector. //********************************************************************* - const_iterator cbegin() const { return p_buffer; } + const_iterator cbegin() const { + return p_buffer; + } //********************************************************************* /// Returns a const_iterator to the end of the vector. ///\return A const iterator to the end of the vector. //********************************************************************* - const_iterator cend() const { return p_end; } + const_iterator cend() const { + return p_end; + } //********************************************************************* /// Returns an reverse iterator to the reverse beginning of the vector. ///\return Iterator to the reverse beginning of the vector. //********************************************************************* - reverse_iterator rbegin() { return reverse_iterator(end()); } + reverse_iterator rbegin() { + return reverse_iterator(end()); + } //********************************************************************* /// Returns a const reverse iterator to the reverse beginning of the vector. @@ -142,7 +156,9 @@ class ivector : public etl::vector_base { /// Returns a reverse iterator to the end + 1 of the vector. ///\return Reverse iterator to the end + 1 of the vector. //********************************************************************* - reverse_iterator rend() { return reverse_iterator(begin()); } + reverse_iterator rend() { + return reverse_iterator(begin()); + } //********************************************************************* /// Returns a const reverse iterator to the end + 1 of the vector. @@ -174,7 +190,9 @@ class ivector : public etl::vector_base { /// maximum then a vector_full is thrown. ///\param new_size The new size. //********************************************************************* - void resize(size_t new_size) { resize(new_size, T()); } + void resize(size_t new_size) { + resize(new_size, T()); + } //********************************************************************* /// Resizes the vector. @@ -230,14 +248,18 @@ class ivector : public etl::vector_base { ///\param i The index. ///\return A reference to the value at index 'i' //********************************************************************* - reference operator[](size_t i) { return p_buffer[i]; } + reference operator[](size_t i) { + return p_buffer[i]; + } //********************************************************************* /// Returns a const reference to the value at index 'i' ///\param i The index. ///\return A const reference to the value at index 'i' //********************************************************************* - const_reference operator[](size_t i) const { return p_buffer[i]; } + const_reference operator[](size_t i) const { + return p_buffer[i]; + } //********************************************************************* /// Returns a reference to the value at index 'i' @@ -265,37 +287,49 @@ class ivector : public etl::vector_base { /// Returns a reference to the first element. ///\return A reference to the first element. //********************************************************************* - reference front() { return *p_buffer; } + reference front() { + return *p_buffer; + } //********************************************************************* /// Returns a const reference to the first element. ///\return A const reference to the first element. //********************************************************************* - const_reference front() const { return *p_buffer; } + const_reference front() const { + return *p_buffer; + } //********************************************************************* /// Returns a reference to the last element. ///\return A reference to the last element. //********************************************************************* - reference back() { return *(p_end - 1); } + reference back() { + return *(p_end - 1); + } //********************************************************************* /// Returns a const reference to the last element. ///\return A const reference to the last element. //********************************************************************* - const_reference back() const { return *(p_end - 1); } + const_reference back() const { + return *(p_end - 1); + } //********************************************************************* /// Returns a pointer to the beginning of the vector data. ///\return A pointer to the beginning of the vector data. //********************************************************************* - pointer data() { return p_buffer; } + pointer data() { + return p_buffer; + } //********************************************************************* /// Returns a const pointer to the beginning of the vector data. ///\return A const pointer to the beginning of the vector data. //********************************************************************* - const_pointer data() const { return p_buffer; } + const_pointer data() const { + return p_buffer; + } //********************************************************************* /// Assigns values to the vector. @@ -342,12 +376,16 @@ class ivector : public etl::vector_base { //************************************************************************* /// Clears the vector. //************************************************************************* - void clear() { initialise(); } + void clear() { + initialise(); + } //************************************************************************* /// Fills the vector. //************************************************************************* - void fill(const T& value) { etl::fill(begin(), end(), value); } + void fill(const T& value) { + etl::fill(begin(), end(), value); + } //********************************************************************* /// Inserts a value at the end of the vector. @@ -835,25 +873,33 @@ class ivector : public etl::vector_base { /// Gets the current size of the vector. ///\return The current size of the vector. //************************************************************************* - size_type size() const { return size_t(p_end - p_buffer); } + size_type size() const { + return size_t(p_end - p_buffer); + } //************************************************************************* /// Checks the 'empty' state of the vector. ///\return true if empty. //************************************************************************* - bool empty() const { return (p_end == p_buffer); } + bool empty() const { + return (p_end == p_buffer); + } //************************************************************************* /// Checks the 'full' state of the vector. ///\return true if full. //************************************************************************* - bool full() const { return size() == CAPACITY; } + bool full() const { + return size() == CAPACITY; + } //************************************************************************* /// Returns the remaining capacity. ///\return The remaining capacity. //************************************************************************* - size_t available() const { return max_size() - size(); } + size_t available() const { + return max_size() - size(); + } #ifdef ETL_IVECTOR_REPAIR_ENABLE //************************************************************************* @@ -1323,7 +1369,9 @@ class vector_ext : public etl::ivector { //************************************************************************* /// Destructor. //************************************************************************* - ~vector_ext() { this->clear(); } + ~vector_ext() { + this->clear(); + } //************************************************************************* /// Fix the internal pointers after a low level memory copy. @@ -1587,7 +1635,9 @@ class vector_ext : public etl::ivector { //************************************************************************* /// Destructor. //************************************************************************* - ~vector_ext() { this->clear(); } + ~vector_ext() { + this->clear(); + } //************************************************************************* /// Fix the internal pointers after a low level memory copy.