diff --git a/CMakeLists.txt b/CMakeLists.txt index 61c57638..1c03b3bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,11 +34,8 @@ add_library(etl ) target_include_directories(etl PUBLIC - include/etl - include/etl/atomic + include include/etl/profiles - PRIVATE - include/etl/private ) if (${ETL_PROFILE} STREQUAL DEFAULT) diff --git a/include/etl/factory.h b/include/etl/factory.h index 6c4e46f0..57f83eca 100644 --- a/include/etl/factory.h +++ b/include/etl/factory.h @@ -40,7 +40,7 @@ SOFTWARE. #include "alignment.h" #include "static_assert.h" #include "type_lookup.h" -#include +#include "pool.h" #if defined(ETL_COMPILER_GCC) #warning THIS CLASS IS DEPRECATED!USE VARIANT_POOL INSTEAD. diff --git a/include/etl/flat_map.h b/include/etl/flat_map.h index 66ed69b4..548bd97d 100644 --- a/include/etl/flat_map.h +++ b/include/etl/flat_map.h @@ -101,13 +101,15 @@ namespace etl bool operator ()(const value_type& element, key_type key) const { - return key_compare()(element.first, key); + return comp(element.first, key); } bool operator ()(key_type key, const value_type& element) const { - return key_compare()(key, element.first); + return comp(key, element.first); } + + key_compare comp; }; public: @@ -300,7 +302,7 @@ namespace etl std::pair result(i_element, false); // Doesn't already exist? - if ((i_element == end()) || TKeyCompare()(i_element->first, value.first) || TKeyCompare()(value.first, i_element->first)) + if ((i_element == end()) || compare(i_element->first, value.first) || compare(value.first, i_element->first)) { ETL_ASSERT(!refmap_t::full(), ETL_ERROR(flat_map_full)); @@ -764,6 +766,8 @@ namespace etl storage_t& storage; + TKeyCompare compare; + /// Internal debugging. ETL_DECLARE_DEBUG_COUNT; diff --git a/include/etl/flat_multimap.h b/include/etl/flat_multimap.h index e2b9a8c4..a9efbae4 100644 --- a/include/etl/flat_multimap.h +++ b/include/etl/flat_multimap.h @@ -103,13 +103,15 @@ namespace etl bool operator ()(const value_type& element, key_type key) const { - return key_compare()(element.first, key); + return comp(element.first, key); } bool operator ()(key_type key, const value_type& element) const { - return key_compare()(key, element.first); + return comp(key, element.first); } + + key_compare comp; }; public: diff --git a/include/etl/flat_multiset.h b/include/etl/flat_multiset.h index 023a526a..8e946d36 100644 --- a/include/etl/flat_multiset.h +++ b/include/etl/flat_multiset.h @@ -232,7 +232,7 @@ namespace etl ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full)); - iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare()); + iterator i_element = std::lower_bound(begin(), end(), value, compare); value_type* pvalue = storage.allocate(); ::new (pvalue) value_type(value); @@ -605,6 +605,8 @@ namespace etl storage_t& storage; + TKeyCompare compare; + /// Internal debugging. ETL_DECLARE_DEBUG_COUNT; diff --git a/include/etl/flat_set.h b/include/etl/flat_set.h index bd58aae5..4d11ae7a 100644 --- a/include/etl/flat_set.h +++ b/include/etl/flat_set.h @@ -233,7 +233,7 @@ namespace etl std::pair result(i_element, false); // Doesn't already exist? - if ((i_element == end()) || TKeyCompare()(*i_element, value) || TKeyCompare()(value, *i_element)) + if ((i_element == end()) || compare(*i_element, value) || compare(value, *i_element)) { ETL_ASSERT(!refset_t::full(), ETL_ERROR(flat_set_full)); @@ -671,6 +671,8 @@ namespace etl storage_t& storage; + TKeyCompare compare; + /// Internal debugging. ETL_DECLARE_DEBUG_COUNT; diff --git a/include/etl/forward_list.h b/include/etl/forward_list.h index 35d3a2d4..abebaa39 100644 --- a/include/etl/forward_list.h +++ b/include/etl/forward_list.h @@ -236,17 +236,17 @@ namespace etl //************************************************************************* /// Get the head node. //************************************************************************* - node_t& get_head() + node_t* get_head() { - return *start_node.next; + return start_node.next; } //************************************************************************* /// Get the head node. //************************************************************************* - const node_t& get_head() const + const node_t* get_head() const { - return *start_node.next; + return start_node.next; } //************************************************************************* @@ -329,8 +329,8 @@ namespace etl { } - iterator(node_t& node) - : p_node(&node) + iterator(node_t* node) + : p_node(node) { } @@ -417,13 +417,13 @@ namespace etl { } - const_iterator(node_t& node) - : p_node(&node) + const_iterator(node_t* node) + : p_node(node) { } - const_iterator(const node_t& node) - : p_node(&node) + const_iterator(const node_t* node) + : p_node(node) { } @@ -493,7 +493,7 @@ namespace etl //************************************************************************* iterator begin() { - return iterator(data_cast(get_head())); + return iterator(get_head()); } //************************************************************************* @@ -501,7 +501,7 @@ namespace etl //************************************************************************* const_iterator begin() const { - return const_iterator(data_cast(get_head())); + return const_iterator(get_head()); } //************************************************************************* @@ -509,7 +509,7 @@ namespace etl //************************************************************************* iterator before_begin() { - return iterator(static_cast(start_node)); + return iterator(&start_node); } //************************************************************************* @@ -517,7 +517,7 @@ namespace etl //************************************************************************* const_iterator before_begin() const { - return const_iterator(static_cast(start_node)); + return const_iterator(&start_node); } //************************************************************************* @@ -565,7 +565,7 @@ namespace etl //************************************************************************* reference front() { - return data_cast(get_head()).value; + return data_cast(*get_head()).value; } //************************************************************************* @@ -573,7 +573,7 @@ namespace etl //************************************************************************* const_reference front() const { - return data_cast(get_head()).value; + return data_cast(*get_head()).value; } //************************************************************************* @@ -780,7 +780,7 @@ namespace etl data_node_t& data_node = allocate_data_node(value); insert_node_after(*position.p_node, data_node); - return iterator(data_node); + return iterator(&data_node); } //************************************************************************* @@ -796,7 +796,7 @@ namespace etl ETL_INCREMENT_DEBUG_COUNT; insert_node_after(*position.p_node, *p_data_node); - return iterator(*p_data_node); + return iterator(p_data_node); } //************************************************************************* @@ -812,7 +812,7 @@ namespace etl ETL_INCREMENT_DEBUG_COUNT; insert_node_after(*position.p_node, *p_data_node); - return iterator(*p_data_node); + return iterator(p_data_node); } //************************************************************************* @@ -828,7 +828,7 @@ namespace etl ETL_INCREMENT_DEBUG_COUNT; insert_node_after(*position.p_node, *p_data_node); - return iterator(*p_data_node); + return iterator(p_data_node); } //************************************************************************* @@ -844,7 +844,7 @@ namespace etl ETL_INCREMENT_DEBUG_COUNT; insert_node_after(*position.p_node, *p_data_node); - return iterator(*p_data_node); + return iterator(p_data_node); } //************************************************************************* @@ -931,7 +931,7 @@ namespace etl } else { - return iterator(*p_last); + return iterator(p_last); } } else @@ -1023,7 +1023,7 @@ namespace etl return; } - node_t* last = &get_head(); + node_t* last = get_head(); node_t* current = last->next; while (current != nullptr) diff --git a/include/etl/intrusive_forward_list.h b/include/etl/intrusive_forward_list.h index 3f6394c3..49ec0e97 100644 --- a/include/etl/intrusive_forward_list.h +++ b/include/etl/intrusive_forward_list.h @@ -278,17 +278,17 @@ namespace etl //************************************************************************* /// Get the head link. //************************************************************************* - link_type& get_head() + link_type* get_head() { - return *start_link.etl_next; + return start_link.etl_next; } //************************************************************************* /// Get the head link. //************************************************************************* - const link_type& get_head() const + const link_type* get_head() const { - return *start_link.etl_next; + return start_link.etl_next; } //************************************************************************* @@ -338,8 +338,8 @@ namespace etl { } - iterator(value_type& value) - : p_value(&value) + iterator(value_type* value) + : p_value(value) { } @@ -428,8 +428,8 @@ namespace etl { } - const_iterator(const value_type& value) - : p_value(&value) + const_iterator(const value_type* value) + : p_value(value) { } @@ -526,7 +526,7 @@ namespace etl //************************************************************************* iterator begin() { - return iterator(static_cast(this->get_head())); + return iterator(static_cast(this->get_head())); } //************************************************************************* @@ -534,7 +534,7 @@ namespace etl //************************************************************************* const_iterator begin() const { - return const_iterator(static_cast(this->get_head())); + return const_iterator(static_cast(this->get_head())); } //************************************************************************* @@ -542,7 +542,7 @@ namespace etl //************************************************************************* iterator before_begin() { - return iterator(static_cast(this->start_link)); + return iterator(&(static_cast(this->start_link))); } //************************************************************************* @@ -550,7 +550,7 @@ namespace etl //************************************************************************* const_iterator before_begin() const { - return const_iterator(static_cast(this->start_link)); + return const_iterator(&(static_cast(this->start_link))); } //************************************************************************* @@ -558,7 +558,7 @@ namespace etl //************************************************************************* const_iterator cbegin() const { - return const_iterator(static_cast(this->get_head())); + return const_iterator(static_cast(this->get_head())); } //************************************************************************* @@ -590,7 +590,7 @@ namespace etl //************************************************************************* reference front() { - return static_cast(this->get_head()); + return static_cast(*(this->get_head())); } //************************************************************************* @@ -598,7 +598,7 @@ namespace etl //************************************************************************* const_reference front() const { - return static_cast(this->get_head());; + return static_cast(*(this->get_head()));; } //************************************************************************* @@ -607,7 +607,7 @@ namespace etl iterator insert_after(iterator position, value_type& value) { this->insert_link_after(*position.p_value, value); - return iterator(value); + return iterator(&value); } //************************************************************************* @@ -686,7 +686,7 @@ namespace etl return; } - link_type* last = &this->get_head(); + link_type* last = this->get_head(); link_type* current = last->etl_next; while (current != nullptr) @@ -886,7 +886,7 @@ namespace etl { if (!other.empty()) { - link_type& first = other.get_head(); + link_type& first = *other.get_head(); if (&other != this) { @@ -982,7 +982,7 @@ namespace etl ETL_ASSERT(etl::is_sorted(begin(), end(), compare), ETL_ERROR(intrusive_forward_list_unsorted)); #endif - value_type* other_begin = static_cast(&other.get_head()); + value_type* other_begin = static_cast(other.get_head()); value_type* other_terminal = nullptr; value_type* before = static_cast(&this->start_link); diff --git a/include/etl/map.h b/include/etl/map.h index d1eb6d93..aa97d223 100644 --- a/include/etl/map.h +++ b/include/etl/map.h @@ -481,7 +481,7 @@ namespace etl { bool operator ()(const key_type& key1, const key_type& key2) const { - return key_compare()(key1, key2); + return compare(key1, key2); } }; @@ -492,7 +492,7 @@ namespace etl { bool operator ()(const value_type& value1, const value_type& value2) const { - return key_compare()(value1.first, value2.first); + return compare(value1.first, value2.first); } }; @@ -524,15 +524,15 @@ namespace etl //************************************************************************* bool node_comp(const Data_Node& node1, const Data_Node& node2) const { - return key_compare()(node1.value.first, node2.value.first); + return compare(node1.value.first, node2.value.first); } bool node_comp(const Data_Node& node, key_parameter_t key) const { - return key_compare()(node.value.first, key); + return compare(node.value.first, key); } bool node_comp(key_parameter_t key, const Data_Node& node) const { - return key_compare()(key, node.value.first); + return compare(key, node.value.first); } private: @@ -540,6 +540,8 @@ namespace etl /// The pool of data nodes used in the map. ipool* p_node_pool; + key_compare compare; + //************************************************************************* /// Downcast a Node* to a Data_Node* //************************************************************************* diff --git a/include/etl/multimap.h b/include/etl/multimap.h index b03dfdf6..c2526e17 100644 --- a/include/etl/multimap.h +++ b/include/etl/multimap.h @@ -638,7 +638,7 @@ namespace etl { bool operator ()(const key_type& key1, const key_type& key2) const { - return key_compare()(key1, key2); + return compare(key1, key2); } }; @@ -649,7 +649,7 @@ namespace etl { bool operator ()(const value_type& value1, const value_type& value2) const { - return key_compare()(value1.first, value2.first); + return compare(value1.first, value2.first); } }; @@ -676,17 +676,17 @@ namespace etl //************************************************************************* bool node_comp(const Data_Node& node1, const Data_Node& node2) const { - return key_compare()(node1.value.first, node2.value.first); + return compare(node1.value.first, node2.value.first); } bool node_comp(const Data_Node& node, key_parameter_t key) const { - return key_compare()(node.value.first, key); + return compare(node.value.first, key); } bool node_comp(key_parameter_t key, const Data_Node& node) const { - return key_compare()(key, node.value.first); + return compare(key, node.value.first); } private: @@ -694,6 +694,8 @@ namespace etl /// The pool of data nodes used in the multimap. ipool* p_node_pool; + key_compare compare; + //************************************************************************* /// Downcast a Node* to a Data_Node* //************************************************************************* diff --git a/include/etl/multiset.h b/include/etl/multiset.h index 5c2b23d9..3c8e4d82 100644 --- a/include/etl/multiset.h +++ b/include/etl/multiset.h @@ -636,7 +636,7 @@ namespace etl { bool operator ()(key_type& key1, key_type& key2) const { - return key_compare()(key1, key2); + return compare(key1, key2); } }; @@ -647,7 +647,7 @@ namespace etl { bool operator ()(value_type& value1, value_type& value2) const { - return value_compare()(value1, value2); + return compare(value1, value2); } }; @@ -674,15 +674,15 @@ namespace etl //************************************************************************* bool node_comp(const Data_Node& node1, const Data_Node& node2) const { - return key_compare()(node1.value, node2.value); + return compare(node1.value, node2.value); } bool node_comp(const Data_Node& node, key_parameter_t key) const { - return key_compare()(node.value, key); + return compare(node.value, key); } bool node_comp(key_parameter_t key, const Data_Node& node) const { - return key_compare()(key, node.value); + return compare(key, node.value); } private: @@ -690,6 +690,8 @@ namespace etl /// The pool of data nodes used in the multiset. ipool* p_node_pool; + key_compare compare; + //************************************************************************* /// Downcast a Node* to a Data_Node* //************************************************************************* diff --git a/include/etl/priority_queue.h b/include/etl/priority_queue.h index 6e0474b3..34bf15a3 100644 --- a/include/etl/priority_queue.h +++ b/include/etl/priority_queue.h @@ -165,7 +165,7 @@ namespace etl // Put element at end container.push_back(value); // Make elements in container into heap - std::push_heap(container.begin(), container.end(), TCompare()); + std::push_heap(container.begin(), container.end(), compare); } //************************************************************************* @@ -182,7 +182,7 @@ namespace etl // Put element at end container.emplace_back(value1); // Make elements in container into heap - std::push_heap(container.begin(), container.end(), TCompare()); + std::push_heap(container.begin(), container.end(), compare); } //************************************************************************* @@ -199,7 +199,7 @@ namespace etl // Put element at end container.emplace_back(value1, value2); // Make elements in container into heap - std::push_heap(container.begin(), container.end(), TCompare()); + std::push_heap(container.begin(), container.end(), compare); } //************************************************************************* @@ -216,7 +216,7 @@ namespace etl // Put element at end container.emplace_back(value1, value2, value3); // Make elements in container into heap - std::push_heap(container.begin(), container.end(), TCompare()); + std::push_heap(container.begin(), container.end(), compare); } //************************************************************************* @@ -233,7 +233,7 @@ namespace etl // Put element at end container.emplace_back(value1, value2, value3, value4); // Make elements in container into heap - std::push_heap(container.begin(), container.end(), TCompare()); + std::push_heap(container.begin(), container.end(), compare); } //************************************************************************* @@ -256,7 +256,7 @@ namespace etl clear(); container.assign(first, last); - std::make_heap(container.begin(), container.end(), TCompare()); + std::make_heap(container.begin(), container.end(), compare); } //************************************************************************* @@ -266,7 +266,7 @@ namespace etl void pop() { // Move largest element to end - std::pop_heap(container.begin(), container.end(), TCompare()); + std::pop_heap(container.begin(), container.end(), compare); // Actually remove largest element at end container.pop_back(); } @@ -356,6 +356,8 @@ namespace etl /// The container specified at instantiation of the priority_queue TContainer container; + + TCompare compare; }; //*************************************************************************** diff --git a/include/etl/reference_flat_map.h b/include/etl/reference_flat_map.h index 5ff5a908..840b7497 100644 --- a/include/etl/reference_flat_map.h +++ b/include/etl/reference_flat_map.h @@ -329,19 +329,21 @@ namespace etl //********************************************************************* /// How to compare elements and keys. //********************************************************************* - class compare + class Compare { public: bool operator ()(const value_type& element, key_type key) const { - return key_compare()(element.first, key); + return comp(element.first, key); } bool operator ()(key_type key, const value_type& element) const { - return key_compare()(key, element.first); + return comp(key, element.first); } + + key_compare comp; }; public: @@ -690,7 +692,7 @@ namespace etl //********************************************************************* iterator lower_bound(key_parameter_t key) { - return std::lower_bound(begin(), end(), key, compare()); + return std::lower_bound(begin(), end(), key, compare); } //********************************************************************* @@ -700,7 +702,7 @@ namespace etl //********************************************************************* const_iterator lower_bound(key_parameter_t key) const { - return std::lower_bound(cbegin(), cend(), key, compare()); + return std::lower_bound(cbegin(), cend(), key, compare); } //********************************************************************* @@ -710,7 +712,7 @@ namespace etl //********************************************************************* iterator upper_bound(key_parameter_t key) { - return std::upper_bound(begin(), end(), key, compare()); + return std::upper_bound(begin(), end(), key, compare); } //********************************************************************* @@ -720,7 +722,7 @@ namespace etl //********************************************************************* const_iterator upper_bound(key_parameter_t key) const { - return std::upper_bound(begin(), end(), key, compare()); + return std::upper_bound(begin(), end(), key, compare); } //********************************************************************* @@ -730,9 +732,9 @@ namespace etl //********************************************************************* std::pair equal_range(key_parameter_t key) { - iterator i_lower = std::lower_bound(begin(), end(), key, compare()); + iterator i_lower = std::lower_bound(begin(), end(), key, compare); - return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare())); + return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare)); } //********************************************************************* @@ -742,9 +744,9 @@ namespace etl //********************************************************************* std::pair equal_range(key_parameter_t key) const { - const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare()); + const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare); - return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare())); + return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare)); } //************************************************************************* @@ -855,6 +857,8 @@ namespace etl lookup_t& lookup; + Compare compare; + //************************************************************************* /// Destructor. //************************************************************************* diff --git a/include/etl/reference_flat_multimap.h b/include/etl/reference_flat_multimap.h index 3088aa75..88adde96 100644 --- a/include/etl/reference_flat_multimap.h +++ b/include/etl/reference_flat_multimap.h @@ -304,19 +304,21 @@ namespace etl //********************************************************************* /// How to compare elements and keys. //********************************************************************* - class compare + class Compare { public: bool operator ()(const value_type& element, key_type key) const { - return key_compare()(element.first, key); + return comp(element.first, key); } bool operator ()(key_type key, const value_type& element) const { - return key_compare()(key, element.first); + return comp(key, element.first); } + + key_compare comp; }; public: @@ -612,7 +614,7 @@ namespace etl //********************************************************************* iterator lower_bound(key_parameter_t key) { - return std::lower_bound(begin(), end(), key, compare()); + return std::lower_bound(begin(), end(), key, compare); } //********************************************************************* @@ -622,7 +624,7 @@ namespace etl //********************************************************************* const_iterator lower_bound(key_parameter_t key) const { - return std::lower_bound(cbegin(), cend(), key, compare()); + return std::lower_bound(cbegin(), cend(), key, compare); } //********************************************************************* @@ -632,7 +634,7 @@ namespace etl //********************************************************************* iterator upper_bound(key_parameter_t key) { - return std::upper_bound(begin(), end(), key, compare()); + return std::upper_bound(begin(), end(), key, compare); } //********************************************************************* @@ -642,7 +644,7 @@ namespace etl //********************************************************************* const_iterator upper_bound(key_parameter_t key) const { - return std::upper_bound(begin(), end(), key, compare()); + return std::upper_bound(begin(), end(), key, compare); } //********************************************************************* @@ -652,9 +654,9 @@ namespace etl //********************************************************************* std::pair equal_range(key_parameter_t key) { - iterator i_lower = std::lower_bound(begin(), end(), key, compare()); + iterator i_lower = std::lower_bound(begin(), end(), key, compare); - return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare())); + return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare)); } //********************************************************************* @@ -664,9 +666,9 @@ namespace etl //********************************************************************* std::pair equal_range(key_parameter_t key) const { - const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare()); + const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare); - return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare())); + return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare)); } //************************************************************************* @@ -768,6 +770,8 @@ namespace etl lookup_t& lookup; + Compare compare; + //************************************************************************* /// Destructor. //************************************************************************* diff --git a/include/etl/reference_flat_multiset.h b/include/etl/reference_flat_multiset.h index 11f89c8f..1cf5ca32 100644 --- a/include/etl/reference_flat_multiset.h +++ b/include/etl/reference_flat_multiset.h @@ -460,9 +460,9 @@ namespace etl { std::pair result(end(), false); - ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full)); + ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full)); - iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare()); + iterator i_element = std::lower_bound(begin(), end(), value, compare); if (i_element == end()) { @@ -566,7 +566,7 @@ namespace etl //********************************************************************* iterator find(parameter_t key) { - iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare()); + iterator itr = std::lower_bound(begin(), end(), key, compare); if (itr != end()) { @@ -590,7 +590,7 @@ namespace etl //********************************************************************* const_iterator find(parameter_t key) const { - const_iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare()); + const_iterator itr = std::lower_bound(begin(), end(), key, compare); if (itr != end()) { @@ -626,7 +626,7 @@ namespace etl //********************************************************************* iterator lower_bound(parameter_t key) { - return std::lower_bound(begin(), end(), key, TKeyCompare()); + return std::lower_bound(begin(), end(), key, compare); } //********************************************************************* @@ -636,7 +636,7 @@ namespace etl //********************************************************************* const_iterator lower_bound(parameter_t key) const { - return std::lower_bound(cbegin(), cend(), key, TKeyCompare()); + return std::lower_bound(cbegin(), cend(), key, compare); } //********************************************************************* @@ -646,7 +646,7 @@ namespace etl //********************************************************************* iterator upper_bound(parameter_t key) { - return std::upper_bound(begin(), end(), key, TKeyCompare()); + return std::upper_bound(begin(), end(), key, compare); } //********************************************************************* @@ -656,7 +656,7 @@ namespace etl //********************************************************************* const_iterator upper_bound(parameter_t key) const { - return std::upper_bound(cbegin(), cend(), key, TKeyCompare()); + return std::upper_bound(cbegin(), cend(), key, compare); } //********************************************************************* @@ -666,7 +666,7 @@ namespace etl //********************************************************************* std::pair equal_range(parameter_t key) { - return std::equal_range(begin(), end(), key, TKeyCompare()); + return std::equal_range(begin(), end(), key, compare); } //********************************************************************* @@ -676,7 +676,7 @@ namespace etl //********************************************************************* std::pair equal_range(parameter_t key) const { - return std::equal_range(begin(), end(), key, TKeyCompare()); + return std::equal_range(begin(), end(), key, compare); } //************************************************************************* @@ -783,6 +783,8 @@ namespace etl lookup_t& lookup; + TKeyCompare compare; + //************************************************************************* /// Destructor. //************************************************************************* diff --git a/include/etl/reference_flat_set.h b/include/etl/reference_flat_set.h index 0247ffc5..cfbc4793 100644 --- a/include/etl/reference_flat_set.h +++ b/include/etl/reference_flat_set.h @@ -546,7 +546,7 @@ namespace etl //********************************************************************* iterator find(parameter_t key) { - iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare()); + iterator itr = std::lower_bound(begin(), end(), key, compare); if (itr != end()) { @@ -570,7 +570,7 @@ namespace etl //********************************************************************* const_iterator find(parameter_t key) const { - const_iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare()); + const_iterator itr = std::lower_bound(begin(), end(), key, compare); if (itr != end()) { @@ -604,7 +604,7 @@ namespace etl //********************************************************************* iterator lower_bound(parameter_t key) { - return std::lower_bound(begin(), end(), key, TKeyCompare()); + return std::lower_bound(begin(), end(), key, compare); } //********************************************************************* @@ -614,7 +614,7 @@ namespace etl //********************************************************************* const_iterator lower_bound(parameter_t key) const { - return std::lower_bound(cbegin(), cend(), key, TKeyCompare()); + return std::lower_bound(cbegin(), cend(), key, compare); } //********************************************************************* @@ -624,7 +624,7 @@ namespace etl //********************************************************************* iterator upper_bound(parameter_t key) { - return std::upper_bound(begin(), end(), key, TKeyCompare()); + return std::upper_bound(begin(), end(), key, compare); } //********************************************************************* @@ -634,7 +634,7 @@ namespace etl //********************************************************************* const_iterator upper_bound(parameter_t key) const { - return std::upper_bound(cbegin(), cend(), key, TKeyCompare()); + return std::upper_bound(cbegin(), cend(), key, compare); } //********************************************************************* @@ -644,7 +644,7 @@ namespace etl //********************************************************************* std::pair equal_range(parameter_t key) { - return std::equal_range(begin(), end(), key, TKeyCompare()); + return std::equal_range(begin(), end(), key, compare); } //********************************************************************* @@ -654,7 +654,7 @@ namespace etl //********************************************************************* std::pair equal_range(parameter_t key) const { - return std::upper_bound(cbegin(), cend(), key, TKeyCompare()); + return std::upper_bound(cbegin(), cend(), key, compare); } //************************************************************************* @@ -745,7 +745,7 @@ namespace etl result.first = i_element; // Existing element? - if (TKeyCompare()(value, *i_element) || TKeyCompare()(*i_element, value)) + if (compare(value, *i_element) || compare(*i_element, value)) { // A new one. ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_set_full)); @@ -765,6 +765,8 @@ namespace etl lookup_t& lookup; + TKeyCompare compare; + //************************************************************************* /// Destructor. //************************************************************************* diff --git a/include/etl/set.h b/include/etl/set.h index 31f0ff7d..38049700 100644 --- a/include/etl/set.h +++ b/include/etl/set.h @@ -474,7 +474,7 @@ namespace etl { bool operator ()(key_type& key1, key_type& key2) const { - return key_compare()(key1, key2); + return compare(key1, key2); } }; @@ -485,7 +485,7 @@ namespace etl { bool operator ()(value_type& value1, value_type& value2) const { - return value_compare()(value1, value2); + return compare(value1, value2); } }; @@ -512,17 +512,17 @@ namespace etl //************************************************************************* bool node_comp(const Data_Node& node1, const Data_Node& node2) const { - return key_compare()(node1.value, node2.value); + return compare(node1.value, node2.value); } bool node_comp(const Data_Node& node, key_parameter_t key) const { - return key_compare()(node.value, key); + return compare(node.value, key); } bool node_comp(key_parameter_t key, const Data_Node& node) const { - return key_compare()(key, node.value); + return compare(key, node.value); } private: @@ -530,6 +530,8 @@ namespace etl /// The pool of data nodes used in the set. etl::ipool* p_node_pool; + key_compare compare; + //************************************************************************* /// Downcast a Node* to a Data_Node* //************************************************************************* diff --git a/include/etl/stl/alternate/limits.h b/include/etl/stl/alternate/limits.h index b8bf99a4..680cf7f9 100644 --- a/include/etl/stl/alternate/limits.h +++ b/include/etl/stl/alternate/limits.h @@ -34,6 +34,7 @@ SOFTWARE. #include "../../platform.h" #include "../../type_traits.h" #include "../../char_traits.h" +#include "../../integral_limits.h" #include #include diff --git a/include/etl/variant.h b/include/etl/variant.h index a539fe3f..26e9c124 100644 --- a/include/etl/variant.h +++ b/include/etl/variant.h @@ -874,18 +874,18 @@ namespace etl /// Calls the supplied reader instance. /// The 'read' function appropriate to the current type is called with the stored value. //*************************************************************************** - void call(reader& reader) + void call(reader& r) { switch (type_id) { - case 0: reader.read(static_cast(data)); break; - case 1: reader.read(static_cast(data)); break; - case 2: reader.read(static_cast(data)); break; - case 3: reader.read(static_cast(data)); break; - case 4: reader.read(static_cast(data)); break; - case 5: reader.read(static_cast(data)); break; - case 6: reader.read(static_cast(data)); break; - case 7: reader.read(static_cast(data)); break; + case 0: r.read(static_cast(data)); break; + case 1: r.read(static_cast(data)); break; + case 2: r.read(static_cast(data)); break; + case 3: r.read(static_cast(data)); break; + case 4: r.read(static_cast(data)); break; + case 5: r.read(static_cast(data)); break; + case 6: r.read(static_cast(data)); break; + case 7: r.read(static_cast(data)); break; default: break; } } diff --git a/include/etl/variant_pool.h b/include/etl/variant_pool.h index 068d0d3a..e5b6f295 100644 --- a/include/etl/variant_pool.h +++ b/include/etl/variant_pool.h @@ -64,7 +64,7 @@ SOFTWARE. #include "alignment.h" #include "static_assert.h" #include "type_lookup.h" -#include +#include "pool.h" #undef ETL_FILE #define ETL_FILE "40" diff --git a/include/etl/version.h b/include/etl/version.h index 65cec320..1b6c4836 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -37,13 +37,13 @@ SOFTWARE. /// Definitions of the ETL version ///\ingroup utilities -#define ETL_VERSION "11.14.2" -#define ETL_VERSION_W L"11.14.2" -#define ETL_VERSION_U16 u"11.14.2" -#define ETL_VERSION_U32 U"11.14.2" +#define ETL_VERSION "11.14.3" +#define ETL_VERSION_W L"11.14.3" +#define ETL_VERSION_U16 u"11.14.3" +#define ETL_VERSION_U32 U"11.14.3" #define ETL_VERSION_MAJOR 11 #define ETL_VERSION_MINOR 14 -#define ETL_VERSION_PATCH 2 +#define ETL_VERSION_PATCH 3 #define ETL_VERSION_VALUE ((ETL_VERSION_MAJOR * 10000) + (ETL_VERSION_MINOR * 100) + ETL_VERSION_PATCH) #endif diff --git a/src/binary.cpp b/src/binary.cpp index 7f676070..0024e56e 100644 --- a/src/binary.cpp +++ b/src/binary.cpp @@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ -#include "platform.h" -#include "binary.h" +#include "etl/platform.h" +#include "etl/binary.h" namespace etl { diff --git a/src/crc16.cpp b/src/crc16.cpp index 734d379b..9ac1d710 100644 --- a/src/crc16.cpp +++ b/src/crc16.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "platform.h" +#include "etl/platform.h" namespace etl { diff --git a/src/crc16_ccitt.cpp b/src/crc16_ccitt.cpp index 443873a9..12b79a76 100644 --- a/src/crc16_ccitt.cpp +++ b/src/crc16_ccitt.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "platform.h" +#include "etl/platform.h" namespace etl { diff --git a/src/crc16_kermit.cpp b/src/crc16_kermit.cpp index 93836b02..3c44e043 100644 --- a/src/crc16_kermit.cpp +++ b/src/crc16_kermit.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "platform.h" +#include "etl/platform.h" namespace etl { diff --git a/src/crc32.cpp b/src/crc32.cpp index 6ef84f49..c9217577 100644 --- a/src/crc32.cpp +++ b/src/crc32.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "platform.h" +#include "etl/platform.h" namespace etl { diff --git a/src/crc32_c.cpp b/src/crc32_c.cpp index 22700a32..1c54c3f6 100644 --- a/src/crc32_c.cpp +++ b/src/crc32_c.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "platform.h" +#include "etl/platform.h" namespace etl { diff --git a/src/crc64_ecma.cpp b/src/crc64_ecma.cpp index 82a92b0e..f818611e 100644 --- a/src/crc64_ecma.cpp +++ b/src/crc64_ecma.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "platform.h" +#include "etl/platform.h" namespace etl { diff --git a/src/crc8_ccitt.cpp b/src/crc8_ccitt.cpp index 15b80cc9..5a224aff 100644 --- a/src/crc8_ccitt.cpp +++ b/src/crc8_ccitt.cpp @@ -30,8 +30,8 @@ SOFTWARE. #include -#include "platform.h" -#include "static_assert.h" +#include "etl/platform.h" +#include "etl/static_assert.h" ETL_STATIC_ASSERT(ETL_8BIT_SUPPORT, "This file does not currently support targets with no 8bit type"); diff --git a/src/error_handler.cpp b/src/error_handler.cpp index 2107e0b5..7f3f3e0c 100644 --- a/src/error_handler.cpp +++ b/src/error_handler.cpp @@ -28,9 +28,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ -#include "platform.h" -#include "error_handler.h" -#include "nullptr.h" +#include "etl/platform.h" +#include "etl/error_handler.h" +#include "etl/nullptr.h" //***************************************************************************** /// The error function callback pointer. diff --git a/src/pearson.cpp b/src/pearson.cpp index 0852c7e5..7051d254 100644 --- a/src/pearson.cpp +++ b/src/pearson.cpp @@ -30,8 +30,8 @@ SOFTWARE. #include -#include "platform.h" -#include "static_assert.h" +#include "etl/platform.h" +#include "etl/static_assert.h" ETL_STATIC_ASSERT(ETL_8BIT_SUPPORT, "This file does not currently support targets with no 8bit type"); diff --git a/src/random.cpp b/src/random.cpp index 4edb6188..ba1b0ba9 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ -#include "platform.h" -#include "random.h" +#include "etl/platform.h" +#include "etl/random.h" namespace etl { diff --git a/test/codeblocks/ETL.cbp b/test/codeblocks/ETL.cbp index 7a3eee9d..a3c7d0cb 100644 --- a/test/codeblocks/ETL.cbp +++ b/test/codeblocks/ETL.cbp @@ -61,18 +61,18 @@ - - - - + + + + - + diff --git a/test/data.h b/test/data.h index 0fbf9ed6..c43769e8 100644 --- a/test/data.h +++ b/test/data.h @@ -31,7 +31,7 @@ SOFTWARE. #include -#include "instance_count.h" +#include "etl/instance_count.h" //***************************************************************************** // Default constructor. diff --git a/test/etl_profile.h b/test/etl_profile.h index 213e99ea..e5cc186b 100644 --- a/test/etl_profile.h +++ b/test/etl_profile.h @@ -77,9 +77,9 @@ SOFTWARE. //#define ETL_NO_STL #ifdef _MSC_VER - #include "profiles/msvc_x86.h" + #include "etl/profiles/msvc_x86.h" #else - #include "profiles/gcc_windows_x86.h" + #include "etl/profiles/gcc_windows_x86.h" #endif #endif diff --git a/test/murmurhash3.cpp b/test/murmurhash3.cpp index 39663531..31d812e1 100644 --- a/test/murmurhash3.cpp +++ b/test/murmurhash3.cpp @@ -7,7 +7,7 @@ // compile and run any of them on any platform, but your performance with the // non-native version will be less than optimal. -#include "platform.h" +#include "etl/platform.h" #ifdef ETL_COMPILER_GCC #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" diff --git a/test/murmurhash3.h b/test/murmurhash3.h index 42f8ef74..46ac322a 100644 --- a/test/murmurhash3.h +++ b/test/murmurhash3.h @@ -10,7 +10,7 @@ // Microsoft Visual Studio -#include "platform.h" +#include "etl/platform.h" #if defined(ETL_COMPILER_MICROSOFT) && (_MSC_VER < 1600) diff --git a/test/test_algorithm.cpp b/test/test_algorithm.cpp index 52984cc9..f7eea553 100644 --- a/test/test_algorithm.cpp +++ b/test/test_algorithm.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "algorithm.h" -#include "container.h" +#include "etl/algorithm.h" +#include "etl/container.h" #include #include diff --git a/test/test_alignment.cpp b/test/test_alignment.cpp index ba0b25ab..7a03a248 100644 --- a/test/test_alignment.cpp +++ b/test/test_alignment.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "alignment.h" -#include "type_traits.h" +#include "etl/alignment.h" +#include "etl/type_traits.h" #include #include diff --git a/test/test_array.cpp b/test/test_array.cpp index 993be93b..28024f19 100644 --- a/test/test_array.cpp +++ b/test/test_array.cpp @@ -28,13 +28,13 @@ SOFTWARE. #include "UnitTest++.h" -#include "array.h" +#include "etl/array.h" #include #include #include -#include "integral_limits.h" +#include "etl/integral_limits.h" namespace { diff --git a/test/test_array_view.cpp b/test/test_array_view.cpp index 875b4bb7..1ada4ddc 100644 --- a/test/test_array_view.cpp +++ b/test/test_array_view.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "array_view.h" -#include "array.h" +#include "etl/array_view.h" +#include "etl/array.h" #include #include diff --git a/test/test_array_wrapper.cpp b/test/test_array_wrapper.cpp index b803575a..461f3190 100644 --- a/test/test_array_wrapper.cpp +++ b/test/test_array_wrapper.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "array_wrapper.h" +#include "etl/array_wrapper.h" namespace { diff --git a/test/test_atomic_gcc_sync.cpp b/test/test_atomic_gcc_sync.cpp index 9af9c77e..8f26a827 100644 --- a/test/test_atomic_gcc_sync.cpp +++ b/test/test_atomic_gcc_sync.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "platform.h" -#include "atomic/atomic_std.h" +#include "etl/platform.h" +#include "etl/atomic/atomic_std.h" #include diff --git a/test/test_atomic_std.cpp b/test/test_atomic_std.cpp index d89872a9..f1655549 100644 --- a/test/test_atomic_std.cpp +++ b/test/test_atomic_std.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "platform.h" -#include "atomic/atomic_std.h" +#include "etl/platform.h" +#include "etl/atomic/atomic_std.h" #include diff --git a/test/test_binary.cpp b/test/test_binary.cpp index 35cd1c53..6923a0f7 100644 --- a/test/test_binary.cpp +++ b/test/test_binary.cpp @@ -31,10 +31,10 @@ SOFTWARE. #include #include -#include "binary.h" -#include "bitset.h" -#include "fnv_1.h" -#include "integral_limits.h" +#include "etl/binary.h" +#include "etl/bitset.h" +#include "etl/fnv_1.h" +#include "etl/integral_limits.h" // Count bits the easy way. template diff --git a/test/test_bitset.cpp b/test/test_bitset.cpp index b3991918..6e7ea3fc 100644 --- a/test/test_bitset.cpp +++ b/test/test_bitset.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include #include -#include "bitset.h" +#include "etl/bitset.h" namespace { diff --git a/test/test_bloom_filter.cpp b/test/test_bloom_filter.cpp index 7a275768..77853300 100644 --- a/test/test_bloom_filter.cpp +++ b/test/test_bloom_filter.cpp @@ -31,14 +31,14 @@ SOFTWARE. #include #include -#include "bloom_filter.h" +#include "etl/bloom_filter.h" -#include "fnv_1.h" -#include "crc16.h" -#include "crc16_ccitt.h" -#include "crc32.h" +#include "etl/fnv_1.h" +#include "etl/crc16.h" +#include "etl/crc16_ccitt.h" +#include "etl/crc32.h" -#include "char_traits.h" +#include "etl/char_traits.h" struct hash1_t { diff --git a/test/test_bsd_checksum.cpp b/test/test_bsd_checksum.cpp index 0f4cadef..0197d3cf 100644 --- a/test/test_bsd_checksum.cpp +++ b/test/test_bsd_checksum.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "checksum.h" +#include "etl/checksum.h" namespace { diff --git a/test/test_c_timer_framework.cpp b/test/test_c_timer_framework.cpp index 00e98536..d332f41f 100644 --- a/test/test_c_timer_framework.cpp +++ b/test/test_c_timer_framework.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "platform.h" +#include "etl/platform.h" extern "C" { diff --git a/test/test_callback_timer.cpp b/test/test_callback_timer.cpp index d5197d3a..b0ad6fa9 100644 --- a/test/test_callback_timer.cpp +++ b/test/test_callback_timer.cpp @@ -29,8 +29,8 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "callback_timer.h" -#include "function.h" +#include "etl/callback_timer.h" +#include "etl/function.h" #include #include diff --git a/test/test_checksum.cpp b/test/test_checksum.cpp index f7a45d9d..60add3e0 100644 --- a/test/test_checksum.cpp +++ b/test/test_checksum.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "checksum.h" +#include "etl/checksum.h" namespace { diff --git a/test/test_compare.cpp b/test/test_compare.cpp index 3c2d65f5..b09d3c8d 100644 --- a/test/test_compare.cpp +++ b/test/test_compare.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "compare.h" +#include "etl/compare.h" namespace { diff --git a/test/test_constant.cpp b/test/test_constant.cpp index 6cd1587a..4f18979d 100644 --- a/test/test_constant.cpp +++ b/test/test_constant.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "constant.h" -#include "integral_limits.h" +#include "etl/constant.h" +#include "etl/integral_limits.h" #include #include diff --git a/test/test_container.cpp b/test/test_container.cpp index 3c441f95..d78e460b 100644 --- a/test/test_container.cpp +++ b/test/test_container.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "container.h" +#include "etl/container.h" #include diff --git a/test/test_crc.cpp b/test/test_crc.cpp index a376e02d..9cb3bc5b 100644 --- a/test/test_crc.cpp +++ b/test/test_crc.cpp @@ -33,12 +33,12 @@ SOFTWARE. #include #include -#include "crc8_ccitt.h" -#include "crc16.h" -#include "crc16_ccitt.h" -#include "crc16_kermit.h" -#include "crc32.h" -#include "crc64_ecma.h" +#include "etl/crc8_ccitt.h" +#include "etl/crc16.h" +#include "etl/crc16_ccitt.h" +#include "etl/crc16_kermit.h" +#include "etl/crc32.h" +#include "etl/crc64_ecma.h" namespace { diff --git a/test/test_cyclic_value.cpp b/test/test_cyclic_value.cpp index 14a9ab94..ce92742c 100644 --- a/test/test_cyclic_value.cpp +++ b/test/test_cyclic_value.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "cyclic_value.h" +#include "etl/cyclic_value.h" namespace { diff --git a/test/test_debounce.cpp b/test/test_debounce.cpp index bab33073..8424e77e 100644 --- a/test/test_debounce.cpp +++ b/test/test_debounce.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "debounce.h" +#include "etl/debounce.h" namespace { diff --git a/test/test_deque.cpp b/test/test_deque.cpp index 869bdfcd..06a1975f 100644 --- a/test/test_deque.cpp +++ b/test/test_deque.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "deque.h" +#include "etl/deque.h" #include "data.h" diff --git a/test/test_embedded_compile.cpp b/test/test_embedded_compile.cpp index 12b78f7d..4d589371 100644 --- a/test/test_embedded_compile.cpp +++ b/test/test_embedded_compile.cpp @@ -1,30 +1,30 @@ -#include "algorithm.h" -#include "alignment.h" -#include "array.h" -#include "bitset.h" -#include "container.h" -#include "crc8_ccitt.h" -#include "crc16.h" -#include "crc16_ccitt.h" -#include "crc16_kermit.h" -#include "crc32.h" -#include "crc64_ecma.h" -#include "cyclic_value.h" -#include "deque.h" -#include "io_port.h" -#include "vector.h" -#include "variant.h" -#include "list.h" -#include "map.h" -#include "integral_limits.h" -#include "constant.h" +#include "etl/algorithm.h" +#include "etl/alignment.h" +#include "etl/array.h" +#include "etl/bitset.h" +#include "etl/container.h" +#include "etl/crc8_ccitt.h" +#include "etl/crc16.h" +#include "etl/crc16_ccitt.h" +#include "etl/crc16_kermit.h" +#include "etl/crc32.h" +#include "etl/crc64_ecma.h" +#include "etl/cyclic_value.h" +#include "etl/deque.h" +#include "etl/io_port.h" +#include "etl/vector.h" +#include "etl/variant.h" +#include "etl/list.h" +#include "etl/map.h" +#include "etl/integral_limits.h" +#include "etl/constant.h" #include #if !defined(ETL_COMPILER_IAR) & !defined(ETL_COMPILER_TI) -#include "stm32f4xx.h" +#include "etl/stm32f4xx.h" #endif #if defined(COMPILER_KEIL) diff --git a/test/test_endian.cpp b/test/test_endian.cpp index 4028eb3e..fa174a85 100644 --- a/test/test_endian.cpp +++ b/test/test_endian.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include -#include "endianness.h" +#include "etl/endianness.h" namespace { diff --git a/test/test_enum_type.cpp b/test/test_enum_type.cpp index 5db8bd18..e59e8ff5 100644 --- a/test/test_enum_type.cpp +++ b/test/test_enum_type.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include -#include "enum_type.h" +#include "etl/enum_type.h" struct enum_test { diff --git a/test/test_error_handler.cpp b/test/test_error_handler.cpp index b50ce2dd..9dc07f9d 100644 --- a/test/test_error_handler.cpp +++ b/test/test_error_handler.cpp @@ -33,8 +33,8 @@ SOFTWARE. #include #include -#include "error_handler.h" -#include "exception.h" +#include "etl/error_handler.h" +#include "etl/exception.h" bool error_received; diff --git a/test/test_exception.cpp b/test/test_exception.cpp index 4fa95c34..333842c3 100644 --- a/test/test_exception.cpp +++ b/test/test_exception.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include -#include "exception.h" +#include "etl/exception.h" namespace { diff --git a/test/test_factory.cpp b/test/test_factory.cpp index 70d6a824..e11b6ef0 100644 --- a/test/test_factory.cpp +++ b/test/test_factory.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "factory.h" +#include "etl/factory.h" #include #include diff --git a/test/test_fixed_iterator.cpp b/test/test_fixed_iterator.cpp index ae580c92..4905739e 100644 --- a/test/test_fixed_iterator.cpp +++ b/test/test_fixed_iterator.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include #include -#include "fixed_iterator.h" +#include "etl/fixed_iterator.h" template std::ostream& operator << (std::ostream& os, const etl::fixed_iterator& fi) diff --git a/test/test_flat_map.cpp b/test/test_flat_map.cpp index c290da7f..456bf688 100644 --- a/test/test_flat_map.cpp +++ b/test/test_flat_map.cpp @@ -40,7 +40,7 @@ SOFTWARE. #include "data.h" -#include "flat_map.h" +#include "etl/flat_map.h" namespace { @@ -309,6 +309,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), SIZE); CHECK_EQUAL(data.max_size(), SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_flat_multimap.cpp b/test/test_flat_multimap.cpp index 2c2486cb..7a7a3380 100644 --- a/test/test_flat_multimap.cpp +++ b/test/test_flat_multimap.cpp @@ -38,7 +38,7 @@ SOFTWARE. #include "data.h" -#include "flat_multimap.h" +#include "etl/flat_multimap.h" namespace { @@ -286,6 +286,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), SIZE); CHECK_EQUAL(data.max_size(), SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_flat_multiset.cpp b/test/test_flat_multiset.cpp index e9bccba0..00cac75d 100644 --- a/test/test_flat_multiset.cpp +++ b/test/test_flat_multiset.cpp @@ -38,7 +38,7 @@ SOFTWARE. #include "data.h" -#include "flat_multiset.h" +#include "etl/flat_multiset.h" namespace { @@ -255,6 +255,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), SIZE); CHECK_EQUAL(data.max_size(), SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_flat_set.cpp b/test/test_flat_set.cpp index 1e0e9982..a5983cf3 100644 --- a/test/test_flat_set.cpp +++ b/test/test_flat_set.cpp @@ -38,7 +38,7 @@ SOFTWARE. #include "data.h" -#include "flat_set.h" +#include "etl/flat_set.h" namespace { @@ -267,6 +267,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), SIZE); CHECK_EQUAL(data.max_size(), SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_fnv_1.cpp b/test/test_fnv_1.cpp index fd6d6c27..a852dce9 100644 --- a/test/test_fnv_1.cpp +++ b/test/test_fnv_1.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "fnv_1.h" +#include "etl/fnv_1.h" namespace { diff --git a/test/test_forward_list.cpp b/test/test_forward_list.cpp index 98827bb3..cb795c93 100644 --- a/test/test_forward_list.cpp +++ b/test/test_forward_list.cpp @@ -31,7 +31,7 @@ SOFTWARE. #include "data.h" -#include "forward_list.h" +#include "etl/forward_list.h" #include #include @@ -87,6 +87,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.max_size(), SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_fsm.cpp b/test/test_fsm.cpp index cbc6d376..0418a862 100644 --- a/test/test_fsm.cpp +++ b/test/test_fsm.cpp @@ -28,11 +28,11 @@ SOFTWARE. #include "UnitTest++.h" -#include "fsm.h" -#include "enum_type.h" -#include "container.h" -#include "packet.h" -#include "queue.h" +#include "etl/fsm.h" +#include "etl/enum_type.h" +#include "etl/container.h" +#include "etl/packet.h" +#include "etl/queue.h" #include diff --git a/test/test_function.cpp b/test/test_function.cpp index d82e3cae..cc92263c 100644 --- a/test/test_function.cpp +++ b/test/test_function.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "function.h" +#include "etl/function.h" //***************************************************************************** const int VALUE = 1; diff --git a/test/test_functional.cpp b/test/test_functional.cpp index 8a3ce993..8e2cd1a5 100644 --- a/test/test_functional.cpp +++ b/test/test_functional.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "functional.h" +#include "etl/functional.h" #include #include diff --git a/test/test_hash.cpp b/test/test_hash.cpp index c9fbc425..1a4e024d 100644 --- a/test/test_hash.cpp +++ b/test/test_hash.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "hash.h" +#include "etl/hash.h" namespace { diff --git a/test/test_instance_count.cpp b/test/test_instance_count.cpp index 72e5512c..6a0b817b 100644 --- a/test/test_instance_count.cpp +++ b/test/test_instance_count.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "instance_count.h" +#include "etl/instance_count.h" #include #include diff --git a/test/test_integral_limits.cpp b/test/test_integral_limits.cpp index 8a23abf8..d461053f 100644 --- a/test/test_integral_limits.cpp +++ b/test/test_integral_limits.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include #include -#include "integral_limits.h" +#include "etl/integral_limits.h" namespace { diff --git a/test/test_intrusive_forward_list.cpp b/test/test_intrusive_forward_list.cpp index 982e6e74..b2d3f9d0 100644 --- a/test/test_intrusive_forward_list.cpp +++ b/test/test_intrusive_forward_list.cpp @@ -31,7 +31,7 @@ SOFTWARE. #include "data.h" -#include "intrusive_forward_list.h" +#include "etl/intrusive_forward_list.h" #include #include diff --git a/test/test_intrusive_links.cpp b/test/test_intrusive_links.cpp index d98570be..b9304ca8 100644 --- a/test/test_intrusive_links.cpp +++ b/test/test_intrusive_links.cpp @@ -31,7 +31,7 @@ SOFTWARE. #include "data.h" -#include "intrusive_links.h" +#include "etl/intrusive_links.h" namespace { diff --git a/test/test_intrusive_list.cpp b/test/test_intrusive_list.cpp index 4d85c00a..382c771c 100644 --- a/test/test_intrusive_list.cpp +++ b/test/test_intrusive_list.cpp @@ -31,7 +31,7 @@ SOFTWARE. #include "data.h" -#include "intrusive_list.h" +#include "etl/intrusive_list.h" #include #include diff --git a/test/test_intrusive_queue.cpp b/test/test_intrusive_queue.cpp index 3c6f5849..ebd37ad8 100644 --- a/test/test_intrusive_queue.cpp +++ b/test/test_intrusive_queue.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "intrusive_queue.h" -#include "intrusive_links.h" +#include "etl/intrusive_queue.h" +#include "etl/intrusive_links.h" #include diff --git a/test/test_intrusive_stack.cpp b/test/test_intrusive_stack.cpp index f6340479..5b752a87 100644 --- a/test/test_intrusive_stack.cpp +++ b/test/test_intrusive_stack.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "intrusive_stack.h" -#include "intrusive_links.h" +#include "etl/intrusive_stack.h" +#include "etl/intrusive_links.h" #include diff --git a/test/test_io_port.cpp b/test/test_io_port.cpp index 398c5bc8..88223339 100644 --- a/test/test_io_port.cpp +++ b/test/test_io_port.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "io_port.h" +#include "etl/io_port.h" #include #include diff --git a/test/test_iterator.cpp b/test/test_iterator.cpp index 1505b972..728fb09b 100644 --- a/test/test_iterator.cpp +++ b/test/test_iterator.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "iterator.h" +#include "etl/iterator.h" //#include diff --git a/test/test_jenkins.cpp b/test/test_jenkins.cpp index 1f6aa80e..3b2f8647 100644 --- a/test/test_jenkins.cpp +++ b/test/test_jenkins.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "jenkins.h" +#include "etl/jenkins.h" template uint32_t jenkins(TIterator begin, TIterator end) diff --git a/test/test_largest.cpp b/test/test_largest.cpp index 48eec18a..f420ede1 100644 --- a/test/test_largest.cpp +++ b/test/test_largest.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "largest.h" +#include "etl/largest.h" #include diff --git a/test/test_list.cpp b/test/test_list.cpp index a96e1127..02305747 100644 --- a/test/test_list.cpp +++ b/test/test_list.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "list.h" +#include "etl/list.h" #include "data.h" @@ -98,6 +98,7 @@ namespace CHECK_EQUAL(data.size(), size_t(0)); CHECK(data.empty()); CHECK_EQUAL(data.max_size(), SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_map.cpp b/test/test_map.cpp index 1881f0e2..c1cdedec 100644 --- a/test/test_map.cpp +++ b/test/test_map.cpp @@ -36,7 +36,7 @@ SOFTWARE. #include #include -#include "map.h" +#include "etl/map.h" static const size_t MAX_SIZE = 10; @@ -181,6 +181,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), MAX_SIZE); CHECK_EQUAL(data.max_size(), MAX_SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_maths.cpp b/test/test_maths.cpp index 4d42f3c6..636fe335 100644 --- a/test/test_maths.cpp +++ b/test/test_maths.cpp @@ -28,13 +28,13 @@ SOFTWARE. #include "UnitTest++.h" -#include "log.h" -#include "power.h" -#include "fibonacci.h" -#include "factorial.h" -#include "sqrt.h" -#include "permutations.h" -#include "combinations.h" +#include "etl/log.h" +#include "etl/power.h" +#include "etl/fibonacci.h" +#include "etl/factorial.h" +#include "etl/sqrt.h" +#include "etl/permutations.h" +#include "etl/combinations.h" namespace { diff --git a/test/test_memory.cpp b/test/test_memory.cpp index 85eab67a..a0448891 100644 --- a/test/test_memory.cpp +++ b/test/test_memory.cpp @@ -28,8 +28,8 @@ SOFTWARE. #include "UnitTest++.h" -#include "memory.h" -#include "debug_count.h" +#include "etl/memory.h" +#include "etl/debug_count.h" #include #include diff --git a/test/test_message_bus.cpp b/test/test_message_bus.cpp index 42ad6118..2bf23e94 100644 --- a/test/test_message_bus.cpp +++ b/test/test_message_bus.cpp @@ -29,11 +29,11 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "message_router.h" -#include "message_bus.h" -#include "queue.h" -#include "largest.h" -#include "packet.h" +#include "etl/message_router.h" +#include "etl/message_bus.h" +#include "etl/queue.h" +#include "etl/largest.h" +#include "etl/packet.h" //*************************************************************************** // The set of messages. diff --git a/test/test_message_router.cpp b/test/test_message_router.cpp index 45598673..60f19273 100644 --- a/test/test_message_router.cpp +++ b/test/test_message_router.cpp @@ -29,10 +29,10 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "message_router.h" -#include "queue.h" -#include "largest.h" -#include "packet.h" +#include "etl/message_router.h" +#include "etl/queue.h" +#include "etl/largest.h" +#include "etl/packet.h" //*************************************************************************** // The set of messages. diff --git a/test/test_message_timer.cpp b/test/test_message_timer.cpp index 392cd31a..c457e759 100644 --- a/test/test_message_timer.cpp +++ b/test/test_message_timer.cpp @@ -29,9 +29,9 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "message_router.h" -#include "message_bus.h" -#include "message_timer.h" +#include "etl/message_router.h" +#include "etl/message_bus.h" +#include "etl/message_timer.h" #include #include diff --git a/test/test_multimap.cpp b/test/test_multimap.cpp index 9954afbc..018ff277 100644 --- a/test/test_multimap.cpp +++ b/test/test_multimap.cpp @@ -35,7 +35,7 @@ SOFTWARE. #include #include -#include "multimap.h" +#include "etl/multimap.h" static const size_t MAX_SIZE = 10; @@ -181,6 +181,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), MAX_SIZE); CHECK_EQUAL(data.max_size(), MAX_SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_multiset.cpp b/test/test_multiset.cpp index 03813ba0..14982819 100644 --- a/test/test_multiset.cpp +++ b/test/test_multiset.cpp @@ -35,7 +35,7 @@ SOFTWARE. #include #include -#include "multiset.h" +#include "etl/multiset.h" static const size_t MAX_SIZE = 10; @@ -173,6 +173,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), MAX_SIZE); CHECK_EQUAL(data.max_size(), MAX_SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_murmur3.cpp b/test/test_murmur3.cpp index d1185459..a4a61a5c 100644 --- a/test/test_murmur3.cpp +++ b/test/test_murmur3.cpp @@ -35,7 +35,7 @@ SOFTWARE. #include #include -#include "murmur3.h" +#include "etl/murmur3.h" namespace { diff --git a/test/test_no_stl_algorithm.cpp b/test/test_no_stl_algorithm.cpp index f29b4f9d..23ae4ef9 100644 --- a/test/test_no_stl_algorithm.cpp +++ b/test/test_no_stl_algorithm.cpp @@ -31,7 +31,7 @@ SOFTWARE. #undef min #undef max -#include "../include/etl/stl/alternate/algorithm.h" +#include "etl/stl/alternate/algorithm.h" #include #include diff --git a/test/test_no_stl_functional.cpp b/test/test_no_stl_functional.cpp index 8b92a715..90eb26e1 100644 --- a/test/test_no_stl_functional.cpp +++ b/test/test_no_stl_functional.cpp @@ -31,7 +31,7 @@ SOFTWARE. #undef min #undef max -#include "../include/etl/stl/alternate/functional.h" +#include "etl/stl/alternate/functional.h" namespace { diff --git a/test/test_no_stl_limits.cpp b/test/test_no_stl_limits.cpp index 4035020b..21df7ce4 100644 --- a/test/test_no_stl_limits.cpp +++ b/test/test_no_stl_limits.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "../include/etl/stl/alternate/limits.h" +#include "etl/stl/alternate/limits.h" #include diff --git a/test/test_no_stl_utility.cpp b/test/test_no_stl_utility.cpp index 441ef930..d4d10d67 100644 --- a/test/test_no_stl_utility.cpp +++ b/test/test_no_stl_utility.cpp @@ -31,7 +31,7 @@ SOFTWARE. #undef min #undef max -#include "../include/etl/stl/alternate/utility.h" +#include "etl/stl/alternate/utility.h" namespace { diff --git a/test/test_numeric.cpp b/test/test_numeric.cpp index 761e4f87..a594de23 100644 --- a/test/test_numeric.cpp +++ b/test/test_numeric.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "numeric.h" +#include "etl/numeric.h" #include #include diff --git a/test/test_observer.cpp b/test/test_observer.cpp index b23a1359..3f8d62f6 100644 --- a/test/test_observer.cpp +++ b/test/test_observer.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "observer.h" +#include "etl/observer.h" //***************************************************************************** // Notification1 diff --git a/test/test_optional.cpp b/test/test_optional.cpp index a8b2d665..35884641 100644 --- a/test/test_optional.cpp +++ b/test/test_optional.cpp @@ -31,8 +31,8 @@ SOFTWARE. #include #include -#include "optional.h" -#include "vector.h" +#include "etl/optional.h" +#include "etl/vector.h" #include "data.h" typedef TestDataNDC Data; diff --git a/test/test_packet.cpp b/test/test_packet.cpp index 010754a7..5ccecf13 100644 --- a/test/test_packet.cpp +++ b/test/test_packet.cpp @@ -29,10 +29,10 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "packet.h" -#include "largest.h" -#include "queue.h" -#include "pool.h" +#include "etl/packet.h" +#include "etl/largest.h" +#include "etl/queue.h" +#include "etl/pool.h" namespace { diff --git a/test/test_parameter_type.cpp b/test/test_parameter_type.cpp index add018ba..f4c445ae 100644 --- a/test/test_parameter_type.cpp +++ b/test/test_parameter_type.cpp @@ -31,7 +31,7 @@ SOFTWARE. #include #include -#include "parameter_type.h" +#include "etl/parameter_type.h" namespace { diff --git a/test/test_pearson.cpp b/test/test_pearson.cpp index 5ab1df1b..c4416764 100644 --- a/test/test_pearson.cpp +++ b/test/test_pearson.cpp @@ -34,7 +34,7 @@ SOFTWARE. #include #include -#include "pearson.h" +#include "etl/pearson.h" const size_t HASH_SIZE = 8; typedef etl::pearson::value_type hash_t; diff --git a/test/test_pool.cpp b/test/test_pool.cpp index 8f14c5f2..fbd98816 100644 --- a/test/test_pool.cpp +++ b/test/test_pool.cpp @@ -35,8 +35,8 @@ SOFTWARE. #include #include -#include "pool.h" -#include "largest.h" +#include "etl/pool.h" +#include "etl/largest.h" #if defined(ETL_COMPILER_GCC) #pragma GCC diagnostic push diff --git a/test/test_priority_queue.cpp b/test/test_priority_queue.cpp index c8fd99e6..84aa1ee8 100644 --- a/test/test_priority_queue.cpp +++ b/test/test_priority_queue.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "priority_queue.h" +#include "etl/priority_queue.h" namespace { diff --git a/test/test_queue.cpp b/test/test_queue.cpp index 09333a5c..0369f46b 100644 --- a/test/test_queue.cpp +++ b/test/test_queue.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "queue.h" +#include "etl/queue.h" namespace { diff --git a/test/test_queue_mpmc_mutex.cpp b/test/test_queue_mpmc_mutex.cpp index 9b8b7bee..ef15fee4 100644 --- a/test/test_queue_mpmc_mutex.cpp +++ b/test/test_queue_mpmc_mutex.cpp @@ -35,7 +35,7 @@ SOFTWARE. #include #include -#include "queue_mpmc_mutex.h" +#include "etl/queue_mpmc_mutex.h" #if defined(ETL_COMPILER_MICROSOFT) #include diff --git a/test/test_queue_spsc_atomic.cpp b/test/test_queue_spsc_atomic.cpp index 4e5542a4..1d49cca4 100644 --- a/test/test_queue_spsc_atomic.cpp +++ b/test/test_queue_spsc_atomic.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include #include -#include "queue_spsc_atomic.h" +#include "etl/queue_spsc_atomic.h" #if defined(ETL_COMPILER_MICROSOFT) #include diff --git a/test/test_queue_spsc_isr.cpp b/test/test_queue_spsc_isr.cpp index 91667eb9..00623103 100644 --- a/test/test_queue_spsc_isr.cpp +++ b/test/test_queue_spsc_isr.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "queue_spsc_isr.h" +#include "etl/queue_spsc_isr.h" #include #include diff --git a/test/test_random.cpp b/test/test_random.cpp index 738e2a90..4c77912b 100644 --- a/test/test_random.cpp +++ b/test/test_random.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "random.h" +#include "etl/random.h" #include #include diff --git a/test/test_reference_flat_map.cpp b/test/test_reference_flat_map.cpp index bfcd7cda..4e0988a7 100644 --- a/test/test_reference_flat_map.cpp +++ b/test/test_reference_flat_map.cpp @@ -40,7 +40,7 @@ SOFTWARE. #include "data.h" -#include "reference_flat_map.h" +#include "etl/reference_flat_map.h" namespace { diff --git a/test/test_reference_flat_multimap.cpp b/test/test_reference_flat_multimap.cpp index c9bc8e55..58d7fc71 100644 --- a/test/test_reference_flat_multimap.cpp +++ b/test/test_reference_flat_multimap.cpp @@ -38,7 +38,7 @@ SOFTWARE. #include "data.h" -#include "reference_flat_multimap.h" +#include "etl/reference_flat_multimap.h" namespace { diff --git a/test/test_reference_flat_multiset.cpp b/test/test_reference_flat_multiset.cpp index 72c1511b..056e6a80 100644 --- a/test/test_reference_flat_multiset.cpp +++ b/test/test_reference_flat_multiset.cpp @@ -38,7 +38,7 @@ SOFTWARE. #include "data.h" -#include "reference_flat_multiset.h" +#include "etl/reference_flat_multiset.h" namespace { diff --git a/test/test_reference_flat_set.cpp b/test/test_reference_flat_set.cpp index ff943446..a38b3b4e 100644 --- a/test/test_reference_flat_set.cpp +++ b/test/test_reference_flat_set.cpp @@ -38,7 +38,7 @@ SOFTWARE. #include "data.h" -#include "reference_flat_set.h" +#include "etl/reference_flat_set.h" namespace { diff --git a/test/test_set.cpp b/test/test_set.cpp index 773aeea5..57bfc7ea 100644 --- a/test/test_set.cpp +++ b/test/test_set.cpp @@ -36,7 +36,7 @@ SOFTWARE. #include #include -#include "set.h" +#include "etl/set.h" static const size_t MAX_SIZE = 10; @@ -184,6 +184,7 @@ namespace CHECK(data.empty()); CHECK_EQUAL(data.capacity(), MAX_SIZE); CHECK_EQUAL(data.max_size(), MAX_SIZE); + CHECK(data.begin() == data.end()); } //************************************************************************* diff --git a/test/test_smallest.cpp b/test/test_smallest.cpp index 3a9a4aad..aa27cd45 100644 --- a/test/test_smallest.cpp +++ b/test/test_smallest.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "smallest.h" +#include "etl/smallest.h" #include diff --git a/test/test_stack.cpp b/test/test_stack.cpp index 74a1a164..ea7f1685 100644 --- a/test/test_stack.cpp +++ b/test/test_stack.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include "data.h" -#include "stack.h" +#include "etl/stack.h" namespace { diff --git a/test/test_string_char.cpp b/test/test_string_char.cpp index 948476f3..ff90ca11 100644 --- a/test/test_string_char.cpp +++ b/test/test_string_char.cpp @@ -32,8 +32,8 @@ SOFTWARE. #include #include -#include "cstring.h" -#include "fnv_1.h" +#include "etl/cstring.h" +#include "etl/fnv_1.h" #undef STR #define STR(x) x @@ -94,6 +94,7 @@ namespace CHECK(text.empty()); CHECK_EQUAL(text.capacity(), SIZE); CHECK_EQUAL(text.max_size(), SIZE); + CHECK(text.begin() == text.end()); } //************************************************************************* diff --git a/test/test_string_u16.cpp b/test/test_string_u16.cpp index 81ed3a4a..da37ee5d 100644 --- a/test/test_string_u16.cpp +++ b/test/test_string_u16.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include #include -#include "u16string.h" +#include "etl/u16string.h" #undef STR #define STR(x) u##x @@ -93,6 +93,7 @@ namespace CHECK(text.empty()); CHECK_EQUAL(text.capacity(), SIZE); CHECK_EQUAL(text.max_size(), SIZE); + CHECK(text.begin() == text.end()); } //************************************************************************* diff --git a/test/test_string_u32.cpp b/test/test_string_u32.cpp index e3f3528e..0df0425a 100644 --- a/test/test_string_u32.cpp +++ b/test/test_string_u32.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include #include -#include "u32string.h" +#include "etl/u32string.h" #undef STR #define STR(x) U##x @@ -93,6 +93,7 @@ namespace CHECK(text.empty()); CHECK_EQUAL(text.capacity(), SIZE); CHECK_EQUAL(text.max_size(), SIZE); + CHECK(text.begin() == text.end()); } //************************************************************************* diff --git a/test/test_string_view.cpp b/test/test_string_view.cpp index 7d2f796c..353f8031 100644 --- a/test/test_string_view.cpp +++ b/test/test_string_view.cpp @@ -28,12 +28,12 @@ SOFTWARE. #include "UnitTest++.h" -#include "string_view.h" -#include "cstring.h" -#include "wstring.h" -#include "u16string.h" -#include "u32string.h" -#include "hash.h" +#include "etl/string_view.h" +#include "etl/cstring.h" +#include "etl/wstring.h" +#include "etl/u16string.h" +#include "etl/u32string.h" +#include "etl/hash.h" #include #include diff --git a/test/test_string_wchar_t.cpp b/test/test_string_wchar_t.cpp index e1cbdad2..f347c5d5 100644 --- a/test/test_string_wchar_t.cpp +++ b/test/test_string_wchar_t.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include #include -#include "wstring.h" +#include "etl/wstring.h" #undef STR #define STR(x) L##x @@ -93,6 +93,7 @@ namespace CHECK(text.empty()); CHECK_EQUAL(text.capacity(), SIZE); CHECK_EQUAL(text.max_size(), SIZE); + CHECK(text.begin() == text.end()); } //************************************************************************* diff --git a/test/test_task_scheduler.cpp b/test/test_task_scheduler.cpp index 38f505c6..7772857d 100644 --- a/test/test_task_scheduler.cpp +++ b/test/test_task_scheduler.cpp @@ -32,9 +32,9 @@ SOFTWARE. #include #include -#include "task.h" -#include "scheduler.h" -#include "container.h" +#include "etl/task.h" +#include "etl/scheduler.h" +#include "etl/container.h" typedef std::vector WorkList_t; diff --git a/test/test_type_def.cpp b/test/test_type_def.cpp index deaa90a9..dbeb32dd 100644 --- a/test/test_type_def.cpp +++ b/test/test_type_def.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include -#include "type_def.h" +#include "etl/type_def.h" namespace { diff --git a/test/test_type_lookup.cpp b/test/test_type_lookup.cpp index c944a9bd..1d6a2015 100644 --- a/test/test_type_lookup.cpp +++ b/test/test_type_lookup.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "type_lookup.h" +#include "etl/type_lookup.h" #include diff --git a/test/test_type_select.cpp b/test/test_type_select.cpp index 7ea7ecff..dec01aea 100644 --- a/test/test_type_select.cpp +++ b/test/test_type_select.cpp @@ -29,8 +29,8 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "type_select.h" -#include "null_type.h" +#include "etl/type_select.h" +#include "etl/null_type.h" #include diff --git a/test/test_type_traits.cpp b/test/test_type_traits.cpp index cd57f45d..25304d95 100644 --- a/test/test_type_traits.cpp +++ b/test/test_type_traits.cpp @@ -38,7 +38,7 @@ namespace std } #endif -#include "type_traits.h" +#include "etl/type_traits.h" #include namespace diff --git a/test/test_unordered_map.cpp b/test/test_unordered_map.cpp index 470fbecd..c5f5c73c 100644 --- a/test/test_unordered_map.cpp +++ b/test/test_unordered_map.cpp @@ -39,7 +39,7 @@ SOFTWARE. #include "data.h" -#include "unordered_map.h" +#include "etl/unordered_map.h" namespace { diff --git a/test/test_unordered_multimap.cpp b/test/test_unordered_multimap.cpp index d04dc25f..65106b71 100644 --- a/test/test_unordered_multimap.cpp +++ b/test/test_unordered_multimap.cpp @@ -39,7 +39,7 @@ SOFTWARE. #include "data.h" -#include "unordered_multimap.h" +#include "etl/unordered_multimap.h" namespace { diff --git a/test/test_unordered_multiset.cpp b/test/test_unordered_multiset.cpp index 0fddfcee..71f069dd 100644 --- a/test/test_unordered_multiset.cpp +++ b/test/test_unordered_multiset.cpp @@ -39,8 +39,8 @@ SOFTWARE. #include "data.h" -#include "unordered_multiset.h" -#include "checksum.h" +#include "etl/unordered_multiset.h" +#include "etl/checksum.h" namespace { diff --git a/test/test_unordered_set.cpp b/test/test_unordered_set.cpp index e658451c..55f28f82 100644 --- a/test/test_unordered_set.cpp +++ b/test/test_unordered_set.cpp @@ -38,8 +38,8 @@ SOFTWARE. #include "data.h" -#include "unordered_set.h" -#include "checksum.h" +#include "etl/unordered_set.h" +#include "etl/checksum.h" namespace { diff --git a/test/test_user_type.cpp b/test/test_user_type.cpp index 0e3e5da7..c7eb5a6d 100644 --- a/test/test_user_type.cpp +++ b/test/test_user_type.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include -#include "user_type.h" +#include "etl/user_type.h" ETL_DECLARE_USER_TYPE(CompassDirection, int) ETL_USER_TYPE(North, 0) diff --git a/test/test_utility.cpp b/test/test_utility.cpp index 08700fe0..ac29ed19 100644 --- a/test/test_utility.cpp +++ b/test/test_utility.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "utility.h" +#include "etl/utility.h" namespace { diff --git a/test/test_variant.cpp b/test/test_variant.cpp index 07a96cdb..305fda0d 100644 --- a/test/test_variant.cpp +++ b/test/test_variant.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "variant.h" +#include "etl/variant.h" #include #include diff --git a/test/test_variant_pool.cpp b/test/test_variant_pool.cpp index 4578c8d3..65a5bc4b 100644 --- a/test/test_variant_pool.cpp +++ b/test/test_variant_pool.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "UnitTest++.h" #include "ExtraCheckMacros.h" -#include "variant_pool.h" +#include "etl/variant_pool.h" #include #include diff --git a/test/test_vector.cpp b/test/test_vector.cpp index 9b753a15..b740f328 100644 --- a/test/test_vector.cpp +++ b/test/test_vector.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "vector.h" +#include "etl/vector.h" namespace { diff --git a/test/test_vector_non_trivial.cpp b/test/test_vector_non_trivial.cpp index 2d1d89e3..bfd099b0 100644 --- a/test/test_vector_non_trivial.cpp +++ b/test/test_vector_non_trivial.cpp @@ -32,7 +32,7 @@ #include #include -#include "vector.h" +#include "etl/vector.h" #include "data.h" namespace diff --git a/test/test_vector_pointer.cpp b/test/test_vector_pointer.cpp index d35cc045..dc5a5a33 100644 --- a/test/test_vector_pointer.cpp +++ b/test/test_vector_pointer.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "vector.h" +#include "etl/vector.h" namespace { diff --git a/test/test_visitor.cpp b/test/test_visitor.cpp index 325a0622..befc438d 100644 --- a/test/test_visitor.cpp +++ b/test/test_visitor.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "UnitTest++.h" -#include "visitor.h" +#include "etl/visitor.h" //***************************************************************************** // Pre-declare the data types. diff --git a/test/test_xor_checksum.cpp b/test/test_xor_checksum.cpp index 1d451064..207d2699 100644 --- a/test/test_xor_checksum.cpp +++ b/test/test_xor_checksum.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "checksum.h" +#include "etl/checksum.h" namespace { diff --git a/test/test_xor_rotate_checksum.cpp b/test/test_xor_rotate_checksum.cpp index 43f50436..485f9972 100644 --- a/test/test_xor_rotate_checksum.cpp +++ b/test/test_xor_rotate_checksum.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include #include -#include "checksum.h" +#include "etl/checksum.h" namespace { diff --git a/test/vs2017/etl.vcxproj b/test/vs2017/etl.vcxproj index 36cb1401..e79c511c 100644 --- a/test/vs2017/etl.vcxproj +++ b/test/vs2017/etl.vcxproj @@ -161,7 +161,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../../unittest-cpp/UnitTest++/;../../include;../../include/etl/c;../../test false @@ -203,7 +203,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../../unittest-cpp\UnitTest++;../../include/etl;../../include/etl/c;../../test + ../../../unittest-cpp\UnitTest++;../../include;../../include/etl/c;../../test false @@ -245,7 +245,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../../unittest-cpp/UnitTest++/;../../include;../../include/etl/c;../../test