Clean compile for GCC warnings

-Wundef
-Wshadow
-Wstrict-aliasing
-Wunused-parameter
This commit is contained in:
John Wellbelove 2017-11-01 09:31:16 +00:00
parent 9035b02183
commit bf195152ad
96 changed files with 1494 additions and 1161 deletions

View File

@ -58,8 +58,8 @@ namespace etl
{
public:
array_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
array_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -72,8 +72,8 @@ namespace etl
{
public:
array_out_of_range(string_type file_name, numeric_type line_number)
: array_exception("array:range", file_name, line_number)
array_out_of_range(string_type file_name_, numeric_type line_number_)
: array_exception("array:range", file_name_, line_number_)
{
}
};

View File

@ -88,8 +88,8 @@ namespace etl
{
public:
string_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
string_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -102,8 +102,8 @@ namespace etl
{
public:
string_empty(string_type file_name, numeric_type line_number)
: string_exception(ETL_ERROR_TEXT("string:empty", ETL_FILE"A"), file_name, line_number)
string_empty(string_type file_name_, numeric_type line_number_)
: string_exception(ETL_ERROR_TEXT("string:empty", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -116,8 +116,8 @@ namespace etl
{
public:
string_out_of_bounds(string_type file_name, numeric_type line_number)
: string_exception(ETL_ERROR_TEXT("string:bounds", ETL_FILE"B"), file_name, line_number)
string_out_of_bounds(string_type file_name_, numeric_type line_number_)
: string_exception(ETL_ERROR_TEXT("string:bounds", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -130,8 +130,8 @@ namespace etl
{
public:
string_iterator(string_type file_name, numeric_type line_number)
: string_exception(ETL_ERROR_TEXT("string:iterator", ETL_FILE"C"), file_name, line_number)
string_iterator(string_type file_name_, numeric_type line_number_)
: string_exception(ETL_ERROR_TEXT("string:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -228,10 +228,10 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
string_base(size_t max_size)
string_base(size_t max_size_)
: is_truncated(false),
current_size(0),
CAPACITY(max_size)
CAPACITY(max_size_)
{
}
@ -505,8 +505,8 @@ namespace etl
//*********************************************************************
void assign(const etl::ibasic_string<T>& other)
{
size_t length = std::min(CAPACITY, other.size());
assign(other.begin(), other.begin() + length);
size_t len = std::min(CAPACITY, other.size());
assign(other.begin(), other.begin() + len);
}
//*********************************************************************
@ -553,15 +553,15 @@ namespace etl
///\param other The other string.
///\param length The length to copy.
//*********************************************************************
void assign(const_pointer other, size_t length)
void assign(const_pointer other, size_t length_)
{
length = std::min(length, CAPACITY);
length_ = std::min(length_, CAPACITY);
initialise();
etl::copy_n(other, length, begin());
etl::copy_n(other, length_, begin());
current_size = length;
current_size = length_;
p_buffer[current_size] = 0;
}
@ -576,8 +576,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(string_iterator));
difference_type d = std::distance(first, last);
ETL_ASSERT(d >= 0, ETL_ERROR(string_iterator));
#endif
initialise();
@ -969,12 +969,12 @@ namespace etl
///\param length Number of characters.
///\return A refernce to this string.
//*********************************************************************
etl::ibasic_string<T>& erase(size_t position, size_t length = npos)
etl::ibasic_string<T>& erase(size_t position, size_t length_ = npos)
{
// Limit the length.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
erase(begin() + position, begin() + position + length);
erase(begin() + position, begin() + position + length_);
return *this;
}
@ -1171,9 +1171,9 @@ namespace etl
//*********************************************************************
size_t rfind(const_pointer s, size_t position = npos) const
{
size_t length = etl::strlen(s);
size_t len = etl::strlen(s);
if (length > size())
if (len > size())
{
return npos;
}
@ -1185,7 +1185,7 @@ namespace etl
position = size() - position;
const_reverse_iterator srbegin(s + length);
const_reverse_iterator srbegin(s + len);
const_reverse_iterator srend(s);
const_reverse_iterator iposition = std::search(rbegin() + position, rend(), srbegin, srend);
@ -1196,7 +1196,7 @@ namespace etl
}
else
{
return size() - length - std::distance(rbegin(), iposition);
return size() - len - std::distance(rbegin(), iposition);
}
}
@ -1205,9 +1205,9 @@ namespace etl
///\param str The content to find
///\param pos The position to start searching from.
//*********************************************************************
size_t rfind(const_pointer s, size_t position, size_t length) const
size_t rfind(const_pointer s, size_t position, size_t length_) const
{
if (length > size())
if (length_ > size())
{
return npos;
}
@ -1219,7 +1219,7 @@ namespace etl
position = size() - position;
const_reverse_iterator srbegin(s + length);
const_reverse_iterator srbegin(s + length_);
const_reverse_iterator srend(s);
const_reverse_iterator iposition = std::search(rbegin() + position, rend(), srbegin, srend);
@ -1230,7 +1230,7 @@ namespace etl
}
else
{
return size() - length - std::distance(rbegin(), iposition);
return size() - length_ - std::distance(rbegin(), iposition);
}
}
@ -1266,15 +1266,15 @@ namespace etl
///\param length The number of characters to replace.
///\param str The string to replace it with.
//*********************************************************************
ibasic_string& replace(size_t position, size_t length, const ibasic_string& str)
ibasic_string& replace(size_t position, size_t length_, const ibasic_string& str)
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
// Limit the length.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
// Erase the bit we want to replace.
erase(position, length);
erase(position, length_);
// Insert the new stuff.
insert(position, str);
@ -1306,17 +1306,17 @@ namespace etl
//*********************************************************************
/// Replace characters from 'position' of 'length' with 'str' from 'subpsotion' of 'sublength'.
//*********************************************************************
ibasic_string& replace(size_t position, size_t length, const ibasic_string& str, size_t subposition, size_t sublength)
ibasic_string& replace(size_t position, size_t length_, const ibasic_string& str, size_t subposition, size_t sublength)
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
ETL_ASSERT(subposition <= str.size(), ETL_ERROR(string_out_of_bounds));
// Limit the lengths.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
sublength = std::min(sublength, str.size() - subposition);
// Erase the bit we want to replace.
erase(position, length);
erase(position, length_);
// Insert the new stuff.
insert(position, str, subposition, sublength);
@ -1327,15 +1327,15 @@ namespace etl
//*********************************************************************
/// Replace characters from 'position' of 'length' with pointed to string.
//*********************************************************************
ibasic_string& replace(size_t position, size_t length, const_pointer s)
ibasic_string& replace(size_t position, size_t length_, const_pointer s)
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
// Limit the length.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
// Erase the bit we want to replace.
erase(position, length);
erase(position, length_);
// Insert the new stuff.
insert(position, s, etl::strlen(s));
@ -1364,15 +1364,15 @@ namespace etl
//*********************************************************************
/// Replace characters from 'position' of 'length' with 'n' characters from pointed to string.
//*********************************************************************
ibasic_string& replace(size_t position, size_t length, const_pointer s, size_t n)
ibasic_string& replace(size_t position, size_t length_, const_pointer s, size_t n)
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
// Limit the length.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
// Erase the bit we want to replace.
erase(position, length);
erase(position, length_);
// Insert the new stuff.
insert(position, s, n);
@ -1401,15 +1401,15 @@ namespace etl
//*********************************************************************
/// Replace characters from 'position' of 'length' with 'n' copies of 'c'.
//*********************************************************************
ibasic_string& replace(size_t position, size_t length, size_t n, value_type c)
ibasic_string& replace(size_t position, size_t length_, size_t n, value_type c)
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
// Limit the length.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
// Erase the bit we want to replace.
erase(position, length);
erase(position, length_);
// Insert the new stuff.
insert(position, n, c);
@ -1468,15 +1468,15 @@ namespace etl
//*************************************************************************
/// Compare position / length with string.
//*************************************************************************
int compare(size_t position, size_t length, const ibasic_string& str) const
int compare(size_t position, size_t length_, const ibasic_string& str) const
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
// Limit the length.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
return compare(p_buffer + position,
p_buffer + position + length,
p_buffer + position + length_,
str.p_buffer,
str.p_buffer + str.size());
}
@ -1484,17 +1484,17 @@ namespace etl
//*************************************************************************
/// Compare position / length with string / subposition / sublength.
//*************************************************************************
int compare(size_t position, size_t length, const ibasic_string& str, size_t subposition, size_t sublength) const
int compare(size_t position, size_t length_, const ibasic_string& str, size_t subposition, size_t sublength) const
{
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
ETL_ASSERT(subposition <= str.size(), ETL_ERROR(string_out_of_bounds));
// Limit the lengths.
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
sublength = std::min(sublength, str.size() - subposition);
return compare(p_buffer + position,
p_buffer + position + length,
p_buffer + position + length_,
str.p_buffer + subposition,
str.p_buffer + subposition + sublength);
}
@ -1513,10 +1513,10 @@ namespace etl
//*************************************************************************
/// Compare position / length with C string.
//*************************************************************************
int compare(size_t position, size_t length, const_pointer s) const
int compare(size_t position, size_t length_, const_pointer s) const
{
return compare(p_buffer + position,
p_buffer + position + length,
p_buffer + position + length_,
s,
s + etl::strlen(s));
}
@ -1524,10 +1524,10 @@ namespace etl
//*************************************************************************
/// Compare position / length with C string / n.
//*************************************************************************
int compare(size_t position, size_t length, const_pointer s, size_t n) const
int compare(size_t position, size_t length_, const_pointer s, size_t n) const
{
return compare(p_buffer + position,
p_buffer + position + length,
p_buffer + position + length_,
s,
s + n);;
}
@ -1817,7 +1817,7 @@ namespace etl
}
//*********************************************************************
//
//
//*********************************************************************
size_t find_last_not_of(value_type c, size_t position = npos) const
{
@ -1902,9 +1902,9 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
ibasic_string(T* p_buffer, size_t MAX_SIZE)
: string_base(MAX_SIZE),
p_buffer(p_buffer)
ibasic_string(T* p_buffer_, size_t MAX_SIZE_)
: string_base(MAX_SIZE_),
p_buffer(p_buffer_)
{
}

View File

@ -72,8 +72,8 @@ namespace etl
{
public:
bitset_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
bitset_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -86,8 +86,8 @@ namespace etl
{
public:
bitset_nullptr(string_type file_name, numeric_type line_number)
: bitset_exception("bitset: nullptr", file_name, line_number)
bitset_nullptr(string_type file_name_, numeric_type line_number_)
: bitset_exception("bitset: nullptr", file_name_, line_number_)
{
}
};
@ -185,9 +185,9 @@ namespace etl
//*******************************
/// Constructor.
//*******************************
bit_reference(ibitset& r_bitset, size_t position)
bit_reference(ibitset& r_bitset, size_t position_)
: p_bitset(&r_bitset),
position(position)
position(position_)
{
}
@ -690,10 +690,10 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
ibitset(size_t nbits, size_t size, element_t* pdata)
: NBITS(nbits),
SIZE(size),
pdata(pdata)
ibitset(size_t nbits_, size_t size_, element_t* pdata_)
: NBITS(nbits_),
SIZE(size_),
pdata(pdata_)
{
size_t allocated_bits = SIZE * BITS_PER_ELEMENT;
size_t top_mask_shift = ((BITS_PER_ELEMENT - (allocated_bits - NBITS)) % BITS_PER_ELEMENT);

View File

@ -82,15 +82,15 @@ namespace etl
///\param position The position of the first character.
///\param length The number of characters. Default = npos.
//*************************************************************************
string(const etl::string<MAX_SIZE_>& other, size_t position, size_t length = npos)
string(const etl::string<MAX_SIZE_>& other, size_t position, size_t length_ = npos)
: istring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
{
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
// Set the length to the exact amount.
length = (length > MAX_SIZE_) ? MAX_SIZE_ : length;
length_ = (length_ > MAX_SIZE_) ? MAX_SIZE_ : length_;
istring::assign(other.begin() + position, other.begin() + position + length);
istring::assign(other.begin() + position, other.begin() + position + length_);
}
//*************************************************************************
@ -144,7 +144,7 @@ namespace etl
///\param position The position of the first character. Default = 0.
///\param length The number of characters. Default = npos.
//*************************************************************************
etl::string<MAX_SIZE_> substr(size_t position = 0, size_t length = npos) const
etl::string<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
{
etl::string<MAX_SIZE_> new_string;
@ -152,9 +152,9 @@ namespace etl
{
ETL_ASSERT(position < this->size(), ETL_ERROR(string_out_of_bounds));
length = std::min(length, this->size() - position);
length_ = std::min(length_, this->size() - position);
new_string.assign(buffer + position, buffer + position + length);
new_string.assign(buffer + position, buffer + position + length_);
}
return new_string;

View File

@ -71,8 +71,8 @@ namespace etl
{
public:
deque_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
deque_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
deque_full(string_type file_name, numeric_type line_number)
: etl::deque_exception(ETL_ERROR_TEXT("deque:full", ETL_FILE"A"), file_name, line_number)
deque_full(string_type file_name_, numeric_type line_number_)
: etl::deque_exception(ETL_ERROR_TEXT("deque:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -99,8 +99,8 @@ namespace etl
{
public:
deque_empty(string_type file_name, numeric_type line_number)
: etl::deque_exception(ETL_ERROR_TEXT("deque:empty", ETL_FILE"B"), file_name, line_number)
deque_empty(string_type file_name_, numeric_type line_number_)
: etl::deque_exception(ETL_ERROR_TEXT("deque:empty", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -113,8 +113,8 @@ namespace etl
{
public:
deque_out_of_bounds(string_type file_name, numeric_type line_number)
: etl::deque_exception(ETL_ERROR_TEXT("deque:bounds", ETL_FILE"C"), file_name, line_number)
deque_out_of_bounds(string_type file_name_, numeric_type line_number_)
: etl::deque_exception(ETL_ERROR_TEXT("deque:bounds", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -127,8 +127,8 @@ namespace etl
{
public:
deque_incompatible_type(string_type file_name, numeric_type line_number)
: deque_exception(ETL_ERROR_TEXT("deque:type", ETL_FILE"D"), file_name, line_number)
deque_incompatible_type(string_type file_name_, numeric_type line_number_)
: deque_exception(ETL_ERROR_TEXT("deque:type", ETL_FILE"D"), file_name_, line_number_)
{
}
};
@ -193,10 +193,10 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
deque_base(size_t max_size, size_t buffer_size)
deque_base(size_t max_size_, size_t buffer_size_)
: current_size(0),
CAPACITY(max_size),
BUFFER_SIZE(buffer_size)
CAPACITY(max_size_),
BUFFER_SIZE(buffer_size_)
{
}
@ -412,10 +412,10 @@ namespace etl
private:
//***************************************************
iterator(difference_type index, ideque& the_deque, pointer p_buffer)
: index(index),
p_deque(&the_deque),
p_buffer(p_buffer)
iterator(difference_type index_, ideque& the_deque, pointer p_buffer_)
: index(index_),
p_deque(&the_deque),
p_buffer(p_buffer_)
{
}
@ -594,23 +594,23 @@ namespace etl
private:
//***************************************************
difference_type distance(difference_type firstIndex, difference_type index)
difference_type distance(difference_type firstIndex, difference_type index_)
{
if (index < firstIndex)
if (index_ < firstIndex)
{
return p_deque->BUFFER_SIZE + index - firstIndex;
return p_deque->BUFFER_SIZE + index_ - firstIndex;
}
else
{
return index - firstIndex;
return index_ - firstIndex;
}
}
//***************************************************
const_iterator(difference_type index, ideque& the_deque, pointer p_buffer)
: index(index),
p_deque(&the_deque),
p_buffer(p_buffer)
const_iterator(difference_type index_, ideque& the_deque, pointer p_buffer_)
: index(index_),
p_deque(&the_deque),
p_buffer(p_buffer_)
{
}
@ -1786,9 +1786,9 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
ideque(pointer p_buffer, size_t max_size, size_t buffer_size)
: deque_base(max_size, buffer_size),
p_buffer(p_buffer)
ideque(pointer p_buffer_, size_t max_size_, size_t buffer_size_)
: deque_base(max_size_, buffer_size_),
p_buffer(p_buffer_)
{
}
@ -2019,10 +2019,10 @@ namespace etl
/// Assigns data to the deque.
//*************************************************************************
template <typename TIterator>
deque(TIterator begin, TIterator end)
deque(TIterator begin_, TIterator end_)
: etl::ideque<T>(reinterpret_cast<T*>(&buffer[0]), MAX_SIZE, BUFFER_SIZE)
{
etl::ideque<T>::assign(begin, end);
etl::ideque<T>::assign(begin_, end_);
}
//*************************************************************************
@ -2052,7 +2052,7 @@ namespace etl
//*************************************************************************
void repair()
{
#if ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
ETL_ASSERT(std::is_trivially_copyable<T>::value, ETL_ERROR(etl::deque_incompatible_type));
#endif

View File

@ -86,9 +86,9 @@ SOFTWARE.
typedef ValueType value_type; \
TypeName() {} \
TypeName(const TypeName &other) : value(other.value) {} \
TypeName(enum_type value) : value(value) {} \
TypeName(enum_type value_) : value(value_) {} \
TypeName& operator=(const TypeName &other) {value = other.value; return *this;} \
explicit TypeName(value_type value) : value(static_cast<enum_type>(value)) {} \
explicit TypeName(value_type value_) : value(static_cast<enum_type>(value_)) {} \
operator value_type() const {return static_cast<value_type>(value);} \
value_type get_value() const {return static_cast<value_type>(value);} \
enum_type get_enum() const {return value;} \

View File

@ -57,8 +57,8 @@ namespace etl
//*************************************************************************
struct free_function : public etl::function<void, const etl::exception&>
{
free_function(void (*p_function)(const etl::exception&))
: etl::function<void, const etl::exception&>(p_function)
free_function(void (*p_function_)(const etl::exception&))
: etl::function<void, const etl::exception&>(p_function_)
{
}
};
@ -69,8 +69,8 @@ namespace etl
template <typename TObject>
struct member_function : public etl::function<TObject, const etl::exception&>
{
member_function(TObject& object, void(TObject::*p_function)(const etl::exception&))
: etl::function<TObject, const etl::exception&>(object, p_function)
member_function(TObject& object_, void(TObject::*p_function_)(const etl::exception&))
: etl::function<TObject, const etl::exception&>(object_, p_function_)
{
}
};

View File

@ -54,21 +54,21 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
exception(string_type reason, string_type file, numeric_type line)
: reason(reason),
file(file),
line(line)
exception(string_type reason_, string_type file_, numeric_type line_)
: reason_text(reason_),
file_text(file_),
line(line_)
{
}
#else
//*************************************************************************
/// Constructor.
//*************************************************************************
exception(string_type reason, string_type file, numeric_type line)
: reason(reason),
line(line)
exception(string_type reason_, string_type file_, numeric_type line_)
: reason_text(reason),
line(line_)
{
(void)file;
(void)file_text;
}
#endif
@ -78,7 +78,7 @@ namespace etl
//***************************************************************************
string_type what() const
{
return reason;
return reason_text;
}
@ -89,7 +89,7 @@ namespace etl
string_type file_name() const
{
#if defined(ETL_VERBOSE_ERRORS)
return file;
return file_text;
#else
return "";
#endif
@ -106,9 +106,9 @@ namespace etl
private:
string_type reason; ///< The reason for the exception.
string_type reason_text; ///< The reason for the exception.
#if defined(ETL_VERBOSE_ERRORS)
string_type file; ///< The file for the exception.
string_type file_text; ///< The file for the exception.
#endif
numeric_type line; ///< The line for the exception.
};

View File

@ -50,8 +50,8 @@ namespace etl
{
public:
factory_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
factory_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -61,8 +61,8 @@ namespace etl
{
public:
factory_cannot_create(string_type file_name, numeric_type line_number)
: factory_exception(ETL_ERROR_TEXT("factory:cannot create", ETL_FILE"A"), file_name, line_number)
factory_cannot_create(string_type file_name_, numeric_type line_number_)
: factory_exception(ETL_ERROR_TEXT("factory:cannot create", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -72,8 +72,8 @@ namespace etl
{
public:
factory_did_not_create(string_type file_name, numeric_type line_number)
: factory_exception(ETL_ERROR_TEXT("factory:did not create", ETL_FILE"B"), file_name, line_number)
factory_did_not_create(string_type file_name_, numeric_type line_number_)
: factory_exception(ETL_ERROR_TEXT("factory:did not create", ETL_FILE"B"), file_name_, line_number_)
{
}
};

View File

@ -59,11 +59,11 @@ namespace etl
//***************************************************************************
/// Construct from iterator.
//***************************************************************************
fixed_iterator(TIterator it)
: it(it)
fixed_iterator(TIterator it_)
: it(it_)
{
}
//***************************************************************************
/// Increment (Does nothing).
//***************************************************************************
@ -71,7 +71,7 @@ namespace etl
{
return *this;
}
//***************************************************************************
/// Increment (Does nothing).
//***************************************************************************
@ -87,15 +87,15 @@ namespace etl
{
return *this;
}
//***************************************************************************
/// Decrement (Does nothing).
//***************************************************************************
fixed_iterator operator --(int)
{
return *this;
}
}
//***************************************************************************
/// Dereference operator.
//***************************************************************************
@ -103,7 +103,7 @@ namespace etl
{
return *it;
}
//***************************************************************************
/// Dereference operator.
//***************************************************************************
@ -118,7 +118,7 @@ namespace etl
TIterator operator ->()
{
return it;
}
}
//***************************************************************************
/// -> operator.
@ -142,15 +142,15 @@ namespace etl
fixed_iterator& operator +=(typename std::iterator_traits<TIterator>::difference_type /*offset*/)
{
return *this;
}
}
//***************************************************************************
/// -= operator.
//***************************************************************************
fixed_iterator& operator -=(typename std::iterator_traits<TIterator>::difference_type /*offset*/)
{
return *this;
}
}
//***************************************************************************
/// Assignment from iterator.

View File

@ -272,8 +272,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_map_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_map_full));
#endif
clear();

View File

@ -229,8 +229,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
#endif
clear();
@ -304,9 +304,9 @@ namespace etl
}
else
{
size_t count = std::distance(range.first, range.second);
size_t d = std::distance(range.first, range.second);
erase(range.first, range.second);
return count;
return d;
}
}

View File

@ -205,8 +205,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
#endif
clear();
@ -282,9 +282,9 @@ namespace etl
}
else
{
size_t count = std::distance(range.first, range.second);
size_t d = std::distance(range.first, range.second);
erase(range.first, range.second);
return count;
return d;
}
}

View File

@ -205,8 +205,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_set_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_set_full));
#endif
clear();
@ -496,9 +496,9 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iflat_set(lookup_t& lookup_, storage_t& storage)
iflat_set(lookup_t& lookup_, storage_t& storage_)
: refset_t(lookup_),
storage(storage)
storage(storage_)
{
}

View File

@ -69,8 +69,8 @@ namespace etl
{
public:
forward_list_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
forward_list_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -83,8 +83,8 @@ namespace etl
{
public:
forward_list_full(string_type file_name, numeric_type line_number)
: etl::forward_list_exception(ETL_ERROR_TEXT("forward_list:full", ETL_FILE"A"), file_name, line_number)
forward_list_full(string_type file_name_, numeric_type line_number_)
: etl::forward_list_exception(ETL_ERROR_TEXT("forward_list:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -97,8 +97,8 @@ namespace etl
{
public:
forward_list_empty(string_type file_name, numeric_type line_number)
: etl::forward_list_exception(ETL_ERROR_TEXT("forward_list:empty", ETL_FILE"B"), file_name, line_number)
forward_list_empty(string_type file_name_, numeric_type line_number_)
: etl::forward_list_exception(ETL_ERROR_TEXT("forward_list:empty", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -111,8 +111,8 @@ namespace etl
{
public:
forward_list_iterator(string_type file_name, numeric_type line_number)
: etl::forward_list_exception(ETL_ERROR_TEXT("forward_list:iterator", ETL_FILE"C"), file_name, line_number)
forward_list_iterator(string_type file_name_, numeric_type line_number_)
: etl::forward_list_exception(ETL_ERROR_TEXT("forward_list:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -216,9 +216,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
forward_list_base(etl::ipool& node_pool, size_type max_size)
: p_node_pool(&node_pool),
MAX_SIZE(max_size)
forward_list_base(etl::ipool& node_pool_, size_type max_size_)
: p_node_pool(&node_pool_),
MAX_SIZE(max_size_)
{
}
@ -295,8 +295,8 @@ namespace etl
//*************************************************************************
struct data_node_t : public node_t
{
explicit data_node_t(parameter_t value)
: value(value)
explicit data_node_t(parameter_t value_)
: value(value_)
{}
T value;
@ -574,8 +574,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(forward_list_iterator));
difference_type d = std::distance(first, last);
ETL_ASSERT(d >= 0, ETL_ERROR(forward_list_iterator));
#endif
initialise();
@ -851,8 +851,8 @@ namespace etl
void insert_after(iterator position, TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT((count + size()) <= MAX_SIZE, ETL_ERROR(forward_list_full));
difference_type d = std::distance(first, last);
ETL_ASSERT((d + size()) <= MAX_SIZE, ETL_ERROR(forward_list_full));
#endif
while (first != last)

View File

@ -105,9 +105,9 @@ namespace etl
//*************************************************************************
/// \param value The uint8_t to add to the FCS.
//*************************************************************************
void add(uint8_t value)
void add(uint8_t value_)
{
frame_check = policy.add(frame_check, value);
frame_check = policy.add(frame_check, value_);
}
//*************************************************************************

View File

@ -91,8 +91,8 @@ namespace etl
{
public:
fsm_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
fsm_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -104,8 +104,8 @@ namespace etl
{
public:
fsm_null_state_exception(string_type file_name, numeric_type line_number)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:null state", ETL_FILE"A"), file_name, line_number)
fsm_null_state_exception(string_type file_name_, numeric_type line_number_)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:null state", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -117,8 +117,8 @@ namespace etl
{
public:
fsm_state_id_exception(string_type file_name, numeric_type line_number)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state id", ETL_FILE"B"), file_name, line_number)
fsm_state_id_exception(string_type file_name_, numeric_type line_number_)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state id", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -130,8 +130,8 @@ namespace etl
{
public:
fsm_state_list_exception(string_type file_name, numeric_type line_number)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state list", ETL_FILE"C"), file_name, line_number)
fsm_state_list_exception(string_type file_name_, numeric_type line_number_)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state list", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -324,7 +324,7 @@ namespace etl
/// Does this FSM accept the message id?
/// Yes, it accepts everything!
//*******************************************
bool accepts(etl::message_id_t id) const
bool accepts(etl::message_id_t) const
{
return true;
}
@ -383,10 +383,10 @@ namespace etl
//***************************************************************************
// The definition for all 16 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1 = void, typename T2 = void, typename T3 = void, typename T4 = void,
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1 = void, typename T2 = void, typename T3 = void, typename T4 = void,
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void>
class fsm_state : public ifsm_state
{
@ -442,10 +442,10 @@ namespace etl
//***************************************************************************
// Specialisation for 15 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13, typename T14, typename T15>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, void> : public ifsm_state
{
@ -499,10 +499,10 @@ namespace etl
//***************************************************************************
// Specialisation for 14 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13, typename T14>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, void, void> : public ifsm_state
{
@ -555,10 +555,10 @@ namespace etl
//***************************************************************************
// Specialisation for 13 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, void, void, void> : public ifsm_state
{
@ -610,9 +610,9 @@ namespace etl
//***************************************************************************
// Specialisation for 12 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, void, void, void, void> : public ifsm_state
{
@ -663,9 +663,9 @@ namespace etl
//***************************************************************************
// Specialisation for 11 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, void, void, void, void, void> : public ifsm_state
{
@ -715,9 +715,9 @@ namespace etl
//***************************************************************************
// Specialisation for 10 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, void, void, void, void, void, void> : public ifsm_state
{
@ -766,9 +766,9 @@ namespace etl
//***************************************************************************
// Specialisation for 9 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, T9, void, void, void, void, void, void, void> : public ifsm_state
{
@ -816,8 +816,8 @@ namespace etl
//***************************************************************************
// Specialisation for 8 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, T8, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -864,8 +864,8 @@ namespace etl
//***************************************************************************
// Specialisation for 7 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, T7, void, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -911,8 +911,8 @@ namespace etl
//***************************************************************************
// Specialisation for 6 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, T6, void, void, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -957,8 +957,8 @@ namespace etl
//***************************************************************************
// Specialisation for 5 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, T5, void, void, void, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -1002,7 +1002,7 @@ namespace etl
//***************************************************************************
// Specialisation for 4 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, T4, void, void, void, void, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -1045,7 +1045,7 @@ namespace etl
//***************************************************************************
// Specialisation for 3 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, T3, void, void, void, void, void, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -1087,7 +1087,7 @@ namespace etl
//***************************************************************************
// Specialisation for 2 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2>
class fsm_state<TContext, TDerived, STATE_ID_, T1, T2, void, void, void, void, void, void, void, void, void, void, void, void, void, void> : public ifsm_state
{
@ -1128,7 +1128,7 @@ namespace etl
//***************************************************************************
// Specialisation for 1 message type.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1>
class fsm_state<TContext, TDerived, STATE_ID_, T1, void, void, void, void, void, void, void, void, void, void, void, void, void, void, void> : public ifsm_state
{

View File

@ -103,8 +103,8 @@ namespace etl
{
public:
fsm_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
fsm_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -116,8 +116,8 @@ namespace etl
{
public:
fsm_null_state_exception(string_type file_name, numeric_type line_number)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:null state", ETL_FILE"A"), file_name, line_number)
fsm_null_state_exception(string_type file_name_, numeric_type line_number_)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:null state", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -129,8 +129,8 @@ namespace etl
{
public:
fsm_state_id_exception(string_type file_name, numeric_type line_number)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state id", ETL_FILE"B"), file_name, line_number)
fsm_state_id_exception(string_type file_name_, numeric_type line_number_)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state id", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -142,8 +142,8 @@ namespace etl
{
public:
fsm_state_list_exception(string_type file_name, numeric_type line_number)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state list", ETL_FILE"C"), file_name, line_number)
fsm_state_list_exception(string_type file_name_, numeric_type line_number_)
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state list", ETL_FILE"C"), file_name_, line_number_)
{
}
};

View File

@ -98,9 +98,9 @@ namespace etl
///\param object Reference to the object
///\param p_function Pointer to the member function
//*************************************************************************
function(TObject& object, void(TObject::* p_function)(TParameter))
: p_object(&object),
p_function(p_function)
function(TObject& object_, void(TObject::* p_function_)(TParameter))
: p_object(&object_),
p_function(p_function_)
{
}
@ -135,9 +135,9 @@ namespace etl
///\param object Reference to the object
///\param p_function Pointer to the member function
//*************************************************************************
function(TObject& object, void(TObject::* p_function)(void))
: p_object(&object),
p_function(p_function)
function(TObject& object_, void(TObject::* p_function_)(void))
: p_object(&object_),
p_function(p_function_)
{
}
@ -169,8 +169,8 @@ namespace etl
/// Constructor.
///\param p_function Pointer to the function
//*************************************************************************
function(void(*p_function)(TParameter))
: p_function(p_function)
function(void(*p_function_)(TParameter))
: p_function(p_function_)
{
}
@ -220,7 +220,7 @@ namespace etl
void (*p_function)(); ///< Pointer to the function.
};
//***************************************************************************
///\ingroup function
/// A derived function template that takes an object type and parameter type.
@ -239,8 +239,8 @@ namespace etl
/// Constructor.
///\param object Reference to the object
//*************************************************************************
function_mp(TObject& object)
: p_object(&object)
function_mp(TObject& object_)
: p_object(&object_)
{
}
@ -277,8 +277,8 @@ namespace etl
/// Constructor.
///\param object Reference to the object
//*************************************************************************
function_mv(TObject& object)
: p_object(&object)
function_mv(TObject& object_)
: p_object(&object_)
{
}

View File

@ -54,8 +54,8 @@ namespace etl
{
public:
hash_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
hash_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{}
};
@ -67,8 +67,8 @@ namespace etl
{
public:
hash_finalised(string_type file_name, numeric_type line_number)
: hash_exception(ETL_ERROR_TEXT("ihash:finalised", ETL_FILE"A"), file_name, line_number)
hash_finalised(string_type file_name_, numeric_type line_number_)
: hash_exception(ETL_ERROR_TEXT("ihash:finalised", ETL_FILE"A"), file_name_, line_number_)
{}
};

View File

@ -63,8 +63,8 @@ namespace etl
{
public:
intrusive_forward_list_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
intrusive_forward_list_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -77,8 +77,8 @@ namespace etl
{
public:
intrusive_forward_list_empty(string_type file_name, numeric_type line_number)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:empty", ETL_FILE"A"), file_name, line_number)
intrusive_forward_list_empty(string_type file_name_, numeric_type line_number_)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:empty", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -91,8 +91,8 @@ namespace etl
{
public:
intrusive_forward_list_iterator_exception(string_type file_name, numeric_type line_number)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:iterator", ETL_FILE"B"), file_name, line_number)
intrusive_forward_list_iterator_exception(string_type file_name_, numeric_type line_number_)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:iterator", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -105,8 +105,8 @@ namespace etl
{
public:
intrusive_forward_list_index_exception(string_type file_name, numeric_type line_number)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:bounds", ETL_FILE"C"), file_name, line_number)
intrusive_forward_list_index_exception(string_type file_name_, numeric_type line_number_)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:bounds", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -119,8 +119,8 @@ namespace etl
{
public:
intrusive_forward_list_unsorted(string_type file_name, numeric_type line_number)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:unsorted", ETL_FILE"D"), file_name, line_number)
intrusive_forward_list_unsorted(string_type file_name_, numeric_type line_number_)
: intrusive_forward_list_exception(ETL_ERROR_TEXT("intrusive_forward_list:unsorted", ETL_FILE"D"), file_name_, line_number_)
{
}
};
@ -153,8 +153,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
intmax_t count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(intrusive_forward_list_iterator_exception));
intmax_t d = std::distance(first, last);
ETL_ASSERT(d >= 0, ETL_ERROR(intrusive_forward_list_iterator_exception));
#endif
initialise();

View File

@ -63,8 +63,8 @@ namespace etl
{
public:
link_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
link_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -76,8 +76,8 @@ namespace etl
{
public:
not_unlinked_exception(string_type file_name, numeric_type line_number)
: link_exception(ETL_ERROR_TEXT("link:still linked", ETL_FILE"A"), file_name, line_number)
not_unlinked_exception(string_type file_name_, numeric_type line_number_)
: link_exception(ETL_ERROR_TEXT("link:still linked", ETL_FILE"A"), file_name_, line_number_)
{
}
};

View File

@ -64,8 +64,8 @@ namespace etl
{
public:
intrusive_list_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
intrusive_list_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -78,8 +78,8 @@ namespace etl
{
public:
intrusive_list_empty(string_type file_name, numeric_type line_number)
: intrusive_list_exception(ETL_ERROR_TEXT("intrusive_list:empty", ETL_FILE"A"), file_name, line_number)
intrusive_list_empty(string_type file_name_, numeric_type line_number_)
: intrusive_list_exception(ETL_ERROR_TEXT("intrusive_list:empty", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -92,8 +92,8 @@ namespace etl
{
public:
intrusive_list_iterator_exception(string_type file_name, numeric_type line_number)
: intrusive_list_exception(ETL_ERROR_TEXT("intrusive_list:iterator", ETL_FILE"B"), file_name, line_number)
intrusive_list_iterator_exception(string_type file_name_, numeric_type line_number_)
: intrusive_list_exception(ETL_ERROR_TEXT("intrusive_list:iterator", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -106,8 +106,8 @@ namespace etl
{
public:
intrusive_list_unsorted(string_type file_name, numeric_type line_number)
: intrusive_list_exception(ETL_ERROR_TEXT("intrusive_list:unsorted", ETL_FILE"C"), file_name, line_number)
intrusive_list_unsorted(string_type file_name_, numeric_type line_number_)
: intrusive_list_exception(ETL_ERROR_TEXT("intrusive_list:unsorted", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -133,8 +133,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
intmax_t count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(intrusive_list_iterator_exception));
intmax_t d = std::distance(first, last);
ETL_ASSERT(d >= 0, ETL_ERROR(intrusive_list_iterator_exception));
#endif
initialise();
@ -1028,31 +1028,31 @@ namespace etl
value_type* other_begin = static_cast<value_type*>(other.get_head());
value_type* other_end = static_cast<value_type*>(&other.terminal_link);
value_type* begin = static_cast<value_type*>(this->get_head());
value_type* end = static_cast<value_type*>(&this->terminal_link);
value_type* this_begin = static_cast<value_type*>(this->get_head());
value_type* this_end = static_cast<value_type*>(&this->terminal_link);
while ((begin != end) && (other_begin != other_end))
while ((this_begin != this_end) && (other_begin != other_end))
{
// Find the place to insert.
while ((begin != end) && !(compare(*other_begin, *begin)))
while ((this_begin != this_end) && !(compare(*other_begin, *this_begin)))
{
begin = static_cast<value_type*>(begin->link_type::etl_next);
this_begin = static_cast<value_type*>(this_begin->link_type::etl_next);
}
// Insert.
if (begin != end)
if (this_begin != this_end)
{
while ((other_begin != other_end) && (compare(*other_begin, *begin)))
while ((other_begin != other_end) && (compare(*other_begin, *this_begin)))
{
value_type* value = other_begin;
other_begin = static_cast<value_type*>(other_begin->link_type::etl_next);
etl::link_splice<link_type>(*begin->link_type::etl_previous, *value);
etl::link_splice<link_type>(*this_begin->link_type::etl_previous, *value);
}
}
}
// Any left over?
if ((begin == end) && (other_begin != other_end))
if ((this_begin == this_end) && (other_begin != other_end))
{
etl::link_splice<link_type>(*this->get_tail(), *other_begin, *other_end->link_type::etl_previous);
}

View File

@ -50,8 +50,8 @@ namespace etl
{
public:
intrusive_queue_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
intrusive_queue_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -64,8 +64,8 @@ namespace etl
{
public:
intrusive_queue_empty(string_type file_name, numeric_type line_number)
: intrusive_queue_exception(ETL_ERROR_TEXT("intrusive_queue:empty", ETL_FILE"A"), file_name, line_number)
intrusive_queue_empty(string_type file_name_, numeric_type line_number_)
: intrusive_queue_exception(ETL_ERROR_TEXT("intrusive_queue:empty", ETL_FILE"A"), file_name_, line_number_)
{
}
};

View File

@ -50,8 +50,8 @@ namespace etl
{
public:
intrusive_stack_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
intrusive_stack_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -64,8 +64,8 @@ namespace etl
{
public:
intrusive_stack_empty(string_type file_name, numeric_type line_number)
: intrusive_stack_exception(ETL_ERROR_TEXT("intrusive_stack:empty", ETL_FILE"A"), file_name, line_number)
intrusive_stack_empty(string_type file_name_, numeric_type line_number_)
: intrusive_stack_exception(ETL_ERROR_TEXT("intrusive_stack:empty", ETL_FILE"A"), file_name_, line_number_)
{
}
};

View File

@ -127,9 +127,9 @@ namespace etl
}
/// Write.
io_port_rw& operator =(parameter_t value)
io_port_rw& operator =(parameter_t value_)
{
*reinterpret_cast<pointer_t>(ADDRESS) = value;
*reinterpret_cast<pointer_t>(ADDRESS) = value_;
return *this;
}
@ -409,9 +409,9 @@ namespace etl
}
/// Write.
io_port_wos& operator =(parameter_t value)
io_port_wos& operator =(parameter_t value_)
{
shadow_value = value;
shadow_value = value_;
*reinterpret_cast<pointer_t>(ADDRESS) = shadow_value;
return *this;
}
@ -548,9 +548,9 @@ namespace etl
}
/// Write.
io_port_rw& operator =(parameter_t value)
io_port_rw& operator =(parameter_t value_)
{
*address = value;
*address = value_;
return *this;
}
@ -900,9 +900,9 @@ namespace etl
}
/// Write.
io_port_wos& operator =(parameter_t value)
io_port_wos& operator =(parameter_t value_)
{
shadow_value = value;
shadow_value = value_;
*address = shadow_value;
return *this;
}

View File

@ -70,8 +70,8 @@ namespace etl
{
public:
list_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
list_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -84,8 +84,8 @@ namespace etl
{
public:
list_full(string_type file_name, numeric_type line_number)
: list_exception(ETL_ERROR_TEXT("list:full", ETL_FILE"A"), file_name, line_number)
list_full(string_type file_name_, numeric_type line_number_)
: list_exception(ETL_ERROR_TEXT("list:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -98,8 +98,8 @@ namespace etl
{
public:
list_empty(string_type file_name, numeric_type line_number)
: list_exception(ETL_ERROR_TEXT("list:empty", ETL_FILE"B"), file_name, line_number)
list_empty(string_type file_name_, numeric_type line_number_)
: list_exception(ETL_ERROR_TEXT("list:empty", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -112,8 +112,8 @@ namespace etl
{
public:
list_iterator(string_type file_name, numeric_type line_number)
: list_exception(ETL_ERROR_TEXT("list:iterator", ETL_FILE"C"), file_name, line_number)
list_iterator(string_type file_name_, numeric_type line_number_)
: list_exception(ETL_ERROR_TEXT("list:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -126,8 +126,8 @@ namespace etl
{
public:
list_unsorted(string_type file_name, numeric_type line_number)
: list_exception(ETL_ERROR_TEXT("list:unsorted", ETL_FILE"D"), file_name, line_number)
list_unsorted(string_type file_name_, numeric_type line_number_)
: list_exception(ETL_ERROR_TEXT("list:unsorted", ETL_FILE"D"), file_name_, line_number_)
{
}
};
@ -299,10 +299,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
list_base(etl::ipool& node_pool,
size_type max_size)
: p_node_pool(&node_pool),
MAX_SIZE(max_size)
list_base(etl::ipool& node_pool_, size_type max_size_)
: p_node_pool(&node_pool_),
MAX_SIZE(max_size_)
{
}
@ -338,8 +337,8 @@ namespace etl
//*************************************************************************
struct data_node_t : public node_t
{
explicit data_node_t(parameter_t value)
: value(value)
explicit data_node_t(parameter_t value_)
: value(value_)
{
}
@ -713,9 +712,9 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(list_iterator));
ETL_ASSERT(size_t(count) <= MAX_SIZE, ETL_ERROR(list_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d >= 0, ETL_ERROR(list_iterator));
ETL_ASSERT(size_t(d) <= MAX_SIZE, ETL_ERROR(list_full));
#endif
initialise();

View File

@ -70,8 +70,8 @@ namespace etl
{
public:
map_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
map_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -84,8 +84,8 @@ namespace etl
{
public:
map_full(string_type file_name, numeric_type line_number)
: etl::map_exception("map:full", file_name, line_number)
map_full(string_type file_name_, numeric_type line_number_)
: etl::map_exception("map:full", file_name_, line_number_)
{
}
};
@ -98,8 +98,8 @@ namespace etl
{
public:
map_out_of_bounds(string_type file_name, numeric_type line_number)
: etl::map_exception("map:bounds", file_name, line_number)
map_out_of_bounds(string_type file_name_, numeric_type line_number_)
: etl::map_exception("map:bounds", file_name_, line_number_)
{
}
};
@ -112,8 +112,8 @@ namespace etl
{
public:
map_iterator(string_type file_name, numeric_type line_number)
: etl::map_exception("map:iterator", file_name, line_number)
map_iterator(string_type file_name_, numeric_type line_number_)
: etl::map_exception("map:iterator", file_name_, line_number_)
{
}
};
@ -225,9 +225,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
map_base(size_type max_size)
map_base(size_type max_size_)
: current_size(0)
, CAPACITY(max_size)
, CAPACITY(max_size_)
, root_node(nullptr)
{
@ -493,8 +493,8 @@ namespace etl
//*************************************************************************
struct Data_Node : public Node
{
explicit Data_Node(value_type value)
: value(value)
explicit Data_Node(value_type value_)
: value(value_)
{
}

View File

@ -46,8 +46,8 @@ namespace etl
{
public:
message_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
message_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -57,8 +57,8 @@ namespace etl
{
public:
unhandled_message_exception(string_type file_name, numeric_type line_number)
: message_exception(ETL_ERROR_TEXT("message:unknown", ETL_FILE"A"), file_name, line_number)
unhandled_message_exception(string_type file_name_, numeric_type line_number_)
: message_exception(ETL_ERROR_TEXT("message:unknown", ETL_FILE"A"), file_name_, line_number_)
{
}
};

View File

@ -54,8 +54,8 @@ namespace etl
{
public:
message_bus_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
message_bus_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -67,8 +67,8 @@ namespace etl
{
public:
message_bus_too_many_subscribers(string_type file_name, numeric_type line_number)
: message_bus_exception(ETL_ERROR_TEXT("message bus:too many subscribers", ETL_FILE"A"), file_name, line_number)
message_bus_too_many_subscribers(string_type file_name_, numeric_type line_number_)
: message_bus_exception(ETL_ERROR_TEXT("message bus:too many subscribers", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -274,7 +274,7 @@ namespace etl
/// Does this message bus accept the message id?
/// Yes!, it accepts everything!
//*******************************************
bool accepts(etl::message_id_t id) const
bool accepts(etl::message_id_t) const
{
return true;
}

View File

@ -38,12 +38,12 @@ SOFTWARE.
// To generate to header file, run this at the command line.
// Note: You will need Python and COG installed.
//
// python -m cogapp -d -e -omessage_router.h -DHandlers=<n> message_router_generator.h
// python -m cogapp -d -e -omessage_router.h -DHandlers=<n> message_router_generator.h
// Where <n> is the number of messages to support.
//
// e.g.
// To generate handlers for up to 16 messages...
// python -m cogapp -d -e -omessage_router.h -DHandlers=16 message_router_generator.h
// python -m cogapp -d -e -omessage_router.h -DHandlers=16 message_router_generator.h
//
// See generate.bat
//***************************************************************************
@ -73,8 +73,8 @@ namespace etl
{
public:
message_router_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
message_router_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -86,8 +86,8 @@ namespace etl
{
public:
message_router_illegal_id(string_type file_name, numeric_type line_number)
: message_router_exception(ETL_ERROR_TEXT("message router:illegal id", ETL_FILE"A"), file_name, line_number)
message_router_illegal_id(string_type file_name_, numeric_type line_number_)
: message_router_exception(ETL_ERROR_TEXT("message router:illegal id", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -164,17 +164,17 @@ namespace etl
}
//********************************************
void receive(const etl::imessage& message)
void receive(const etl::imessage&)
{
}
//********************************************
void receive(etl::imessage_router& source, const etl::imessage& message)
void receive(etl::imessage_router&, const etl::imessage&)
{
}
//********************************************
bool accepts(etl::message_id_t id) const
bool accepts(etl::message_id_t) const
{
return false;
}
@ -191,7 +191,7 @@ namespace etl
/// Send a message to a router.
/// Sets the 'sender' to etl::null_message_router type.
//***************************************************************************
inline static void send_message(etl::imessage_router& destination,
inline static void send_message(etl::imessage_router& destination,
const etl::imessage& message)
{
destination.receive(message);
@ -200,20 +200,20 @@ namespace etl
//***************************************************************************
/// Send a message to a router.
//***************************************************************************
inline static void send_message(etl::imessage_router& source,
etl::imessage_router& destination,
inline static void send_message(etl::imessage_router& source,
etl::imessage_router& destination,
const etl::imessage& message)
{
destination.receive(source, message);
}
//***************************************************************************
// The definition for all 16 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2 = void, typename T3 = void, typename T4 = void,
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
typename T1, typename T2 = void, typename T3 = void, typename T4 = void,
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void>
class message_router : public imessage_router
{
@ -339,8 +339,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID: case T14::ID: case T15::ID: case T16::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID: case T14::ID: case T15::ID: case T16::ID:
return true; break;
default:
return false; break;
@ -351,10 +351,10 @@ namespace etl
//***************************************************************************
// Specialisation for 15 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13, typename T14, typename T15>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, void>
: public imessage_router
@ -479,8 +479,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID: case T14::ID: case T15::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID: case T14::ID: case T15::ID:
return true; break;
default:
return false; break;
@ -491,10 +491,10 @@ namespace etl
//***************************************************************************
// Specialisation for 14 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13, typename T14>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, void, void>
: public imessage_router
@ -617,8 +617,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID: case T14::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID: case T14::ID:
return true; break;
default:
return false; break;
@ -629,10 +629,10 @@ namespace etl
//***************************************************************************
// Specialisation for 13 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, void, void, void>
: public imessage_router
@ -753,8 +753,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID: case T13::ID:
return true; break;
default:
return false; break;
@ -765,9 +765,9 @@ namespace etl
//***************************************************************************
// Specialisation for 12 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, void, void, void, void>
: public imessage_router
@ -886,8 +886,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID: case T12::ID:
return true; break;
default:
return false; break;
@ -898,9 +898,9 @@ namespace etl
//***************************************************************************
// Specialisation for 11 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, void, void, void, void, void>
: public imessage_router
@ -1017,8 +1017,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID: case T11::ID:
return true; break;
default:
return false; break;
@ -1029,9 +1029,9 @@ namespace etl
//***************************************************************************
// Specialisation for 10 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, void, void, void, void, void, void>
: public imessage_router
@ -1146,8 +1146,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID: case T10::ID:
return true; break;
default:
return false; break;
@ -1158,9 +1158,9 @@ namespace etl
//***************************************************************************
// Specialisation for 9 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, T9, void, void, void, void, void, void, void>
: public imessage_router
@ -1273,8 +1273,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T9::ID:
return true; break;
default:
return false; break;
@ -1285,8 +1285,8 @@ namespace etl
//***************************************************************************
// Specialisation for 8 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, T8, void, void, void, void, void, void, void, void>
: public imessage_router
@ -1397,8 +1397,8 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID: case T8::ID:
return true; break;
default:
return false; break;
@ -1409,8 +1409,8 @@ namespace etl
//***************************************************************************
// Specialisation for 7 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, T7, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -1519,7 +1519,7 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID: case T7::ID:
return true; break;
default:
return false; break;
@ -1530,8 +1530,8 @@ namespace etl
//***************************************************************************
// Specialisation for 6 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6>
class message_router<TDerived, T1, T2, T3, T4, T5, T6, void, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -1638,7 +1638,7 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID: case T6::ID:
return true; break;
default:
return false; break;
@ -1649,8 +1649,8 @@ namespace etl
//***************************************************************************
// Specialisation for 5 message types.
//***************************************************************************
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4,
typename T5>
class message_router<TDerived, T1, T2, T3, T4, T5, void, void, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -1755,7 +1755,7 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID: case T5::ID:
return true; break;
default:
return false; break;
@ -1766,7 +1766,7 @@ namespace etl
//***************************************************************************
// Specialisation for 4 message types.
//***************************************************************************
template <typename TDerived,
template <typename TDerived,
typename T1, typename T2, typename T3, typename T4>
class message_router<TDerived, T1, T2, T3, T4, void, void, void, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -1869,7 +1869,7 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID: case T4::ID:
case T1::ID: case T2::ID: case T3::ID: case T4::ID:
return true; break;
default:
return false; break;
@ -1880,7 +1880,7 @@ namespace etl
//***************************************************************************
// Specialisation for 3 message types.
//***************************************************************************
template <typename TDerived,
template <typename TDerived,
typename T1, typename T2, typename T3>
class message_router<TDerived, T1, T2, T3, void, void, void, void, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -1981,7 +1981,7 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID: case T3::ID:
case T1::ID: case T2::ID: case T3::ID:
return true; break;
default:
return false; break;
@ -1992,7 +1992,7 @@ namespace etl
//***************************************************************************
// Specialisation for 2 message types.
//***************************************************************************
template <typename TDerived,
template <typename TDerived,
typename T1, typename T2>
class message_router<TDerived, T1, T2, void, void, void, void, void, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -2091,7 +2091,7 @@ namespace etl
{
switch (id)
{
case T1::ID: case T2::ID:
case T1::ID: case T2::ID:
return true; break;
default:
return false; break;
@ -2102,7 +2102,7 @@ namespace etl
//***************************************************************************
// Specialisation for 1 message type.
//***************************************************************************
template <typename TDerived,
template <typename TDerived,
typename T1>
class message_router<TDerived, T1, void, void, void, void, void, void, void, void, void, void, void, void, void, void, void>
: public imessage_router
@ -2199,7 +2199,7 @@ namespace etl
{
switch (id)
{
case T1::ID:
case T1::ID:
return true; break;
default:
return false; break;

View File

@ -85,8 +85,8 @@ namespace etl
{
public:
message_router_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
message_router_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -98,8 +98,8 @@ namespace etl
{
public:
message_router_illegal_id(string_type file_name, numeric_type line_number)
: message_router_exception(ETL_ERROR_TEXT("message router:illegal id", ETL_FILE"A"), file_name, line_number)
message_router_illegal_id(string_type file_name_, numeric_type line_number_)
: message_router_exception(ETL_ERROR_TEXT("message router:illegal id", ETL_FILE"A"), file_name_, line_number_)
{
}
};

View File

@ -69,8 +69,8 @@ namespace etl
{
public:
multimap_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
multimap_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -83,8 +83,8 @@ namespace etl
{
public:
multimap_full(string_type file_name, numeric_type line_number)
: etl::multimap_exception("multimap:full", file_name, line_number)
multimap_full(string_type file_name_, numeric_type line_number_)
: etl::multimap_exception("multimap:full", file_name_, line_number_)
{
}
};
@ -97,8 +97,8 @@ namespace etl
{
public:
multimap_out_of_bounds(string_type file_name, numeric_type line_number)
: etl::multimap_exception("multimap:bounds", file_name, line_number)
multimap_out_of_bounds(string_type file_name_, numeric_type line_number_)
: etl::multimap_exception("multimap:bounds", file_name_, line_number_)
{
}
};
@ -111,8 +111,8 @@ namespace etl
{
public:
multimap_iterator(string_type file_name, numeric_type line_number)
: etl::multimap_exception("multimap:iterator", file_name, line_number)
multimap_iterator(string_type file_name_, numeric_type line_number_)
: etl::multimap_exception("multimap:iterator", file_name_, line_number_)
{
}
};
@ -218,9 +218,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
multimap_base(size_type max_size)
multimap_base(size_type max_size_)
: current_size(0)
, CAPACITY(max_size)
, CAPACITY(max_size_)
, root_node(nullptr)
{
@ -648,8 +648,8 @@ namespace etl
//*************************************************************************
struct Data_Node : public Node
{
explicit Data_Node(value_type value)
: value(value)
explicit Data_Node(value_type value_)
: value(value_)
{
}
@ -1134,19 +1134,19 @@ namespace etl
size_type erase(key_parameter_t key)
{
// Number of nodes removed
size_type count = 0;
size_type d = 0;
const_iterator lower(*this, find_lower_node(root_node, key));
const_iterator upper(*this, find_upper_node(root_node, key));
while (lower != upper)
{
// Increment count for each node removed
++count;
++d;
// Remove node using the other erase method
(void)erase(lower++);
}
// Return the total count erased
return count;
return d;
}
//*************************************************************************

View File

@ -69,8 +69,8 @@ namespace etl
{
public:
multiset_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
multiset_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -83,8 +83,8 @@ namespace etl
{
public:
multiset_full(string_type file_name, numeric_type line_number)
: etl::multiset_exception(ETL_ERROR_TEXT("multiset:full", ETL_FILE"A"), file_name, line_number)
multiset_full(string_type file_name_, numeric_type line_number_)
: etl::multiset_exception(ETL_ERROR_TEXT("multiset:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -97,8 +97,8 @@ namespace etl
{
public:
multiset_out_of_bounds(string_type file_name, numeric_type line_number)
: etl::multiset_exception(ETL_ERROR_TEXT("multiset:bounds", ETL_FILE"B"), file_name, line_number)
multiset_out_of_bounds(string_type file_name_, numeric_type line_number_)
: etl::multiset_exception(ETL_ERROR_TEXT("multiset:bounds", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -111,8 +111,8 @@ namespace etl
{
public:
multiset_iterator(string_type file_name, numeric_type line_number)
: etl::multiset_exception(ETL_ERROR_TEXT("multiset:iterator", ETL_FILE"C"), file_name, line_number)
multiset_iterator(string_type file_name_, numeric_type line_number_)
: etl::multiset_exception(ETL_ERROR_TEXT("multiset:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -218,9 +218,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
multiset_base(size_type max_size)
multiset_base(size_type max_size_)
: current_size(0)
, CAPACITY(max_size)
, CAPACITY(max_size_)
, root_node(nullptr)
{
}
@ -645,8 +645,8 @@ namespace etl
//*************************************************************************
struct Data_Node : public Node
{
explicit Data_Node(value_type value)
: value(value)
explicit Data_Node(value_type value_)
: value(value_)
{
}
@ -1114,19 +1114,19 @@ namespace etl
size_type erase(key_parameter_t key_value)
{
// Number of nodes removed
size_type count = 0;
size_type d = 0;
const_iterator lower(*this, find_lower_node(root_node, key_value));
const_iterator upper(*this, find_upper_node(root_node, key_value));
while (lower != upper)
{
// Increment count for each node removed
++count;
++d;
// Remove node using the other erase method
(void)erase(lower++);
}
// Return the total count erased
return count;
return d;
}
//*************************************************************************

View File

@ -65,8 +65,8 @@ namespace etl
/// Default constructor.
/// \param seed The seed value. Default = 0.
//*************************************************************************
murmur3(value_type seed = 0)
: seed(seed)
murmur3(value_type seed_ = 0)
: seed(seed_)
{
reset();
}
@ -78,8 +78,8 @@ namespace etl
/// \param seed The seed value. Default = 0.
//*************************************************************************
template<typename TIterator>
murmur3(TIterator begin, const TIterator end, value_type seed = 0)
: seed(seed)
murmur3(TIterator begin, const TIterator end, value_type seed_ = 0)
: seed(seed_)
{
STATIC_ASSERT(sizeof(typename std::iterator_traits<TIterator>::value_type) == 1, "Incompatible type");
@ -142,12 +142,12 @@ namespace etl
/// If the hash has already been finalised then a 'hash_finalised' error will be emitted.
/// \param value The char to add to the hash.
//*************************************************************************
void add(uint8_t value)
void add(uint8_t value_)
{
// We can't add to a finalised hash!
ETL_ASSERT(!is_finalised, ETL_ERROR(hash_finalised));
block |= value << (block_fill_count * 8);
block |= value_ << (block_fill_count * 8);
if (++block_fill_count == FULL_BLOCK)
{

View File

@ -71,8 +71,8 @@ namespace etl
{
public:
observer_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
observer_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
observer_list_full(string_type file_name, numeric_type line_number)
: observer_exception(ETL_ERROR_TEXT("observer:full", ETL_FILE"A"), file_name, line_number)
observer_list_full(string_type file_name_, numeric_type line_number_)
: observer_exception(ETL_ERROR_TEXT("observer:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};

View File

@ -74,8 +74,8 @@ namespace etl
{
public:
optional_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
optional_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -88,8 +88,8 @@ namespace etl
{
public:
optional_invalid(string_type file_name, numeric_type line_number)
: optional_exception("optional: invalid", file_name, line_number)
optional_invalid(string_type file_name_, numeric_type line_number_)
: optional_exception("optional: invalid", file_name_, line_number_)
{
}
};
@ -136,9 +136,9 @@ namespace etl
//***************************************************************************
/// Constructor from value type.
//***************************************************************************
optional(const T& value)
optional(const T& value_)
{
::new (storage.template get_address<T>()) T(value);
::new (storage.template get_address<T>()) T(value_);
valid = true;
}
@ -199,15 +199,15 @@ namespace etl
//***************************************************************************
/// Assignment operator from value type.
//***************************************************************************
optional& operator =(const T& value)
optional& operator =(const T& value_)
{
if (valid)
{
storage.template get_reference<T>() = value;
storage.template get_reference<T>() = value_;
}
else
{
::new (storage.template get_address<T>()) T(value);
::new (storage.template get_address<T>()) T(value_);
valid = true;
}

View File

@ -120,13 +120,13 @@ namespace etl
//*************************************************************************
/// \param value The char to add to the hash.
//*************************************************************************
void add(uint8_t value)
void add(uint8_t value_)
{
if (first)
{
for (size_t i = 0; i < HASH_LENGTH; ++i)
{
hash[i] = PEARSON_LOOKUP[(uint32_t(value) + i) % 256];
hash[i] = PEARSON_LOOKUP[(uint32_t(value_) + i) % 256];
}
first = false;
@ -135,7 +135,7 @@ namespace etl
{
for (size_t i = 0; i < HASH_LENGTH; ++i)
{
hash[i] = PEARSON_LOOKUP[hash[i] ^ value];
hash[i] = PEARSON_LOOKUP[hash[i] ^ value_];
}
}
}

View File

@ -63,8 +63,8 @@ namespace etl
{
public:
pool_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
pool_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{}
};
@ -76,8 +76,8 @@ namespace etl
{
public:
explicit pool_no_allocation(string_type file_name, numeric_type line_number)
: pool_exception(ETL_ERROR_TEXT("pool:allocation", ETL_FILE"A"), file_name, line_number)
explicit pool_no_allocation(string_type file_name_, numeric_type line_number_)
: pool_exception(ETL_ERROR_TEXT("pool:allocation", ETL_FILE"A"), file_name_, line_number_)
{}
};
@ -89,8 +89,8 @@ namespace etl
{
public:
pool_object_not_in_pool(string_type file_name, numeric_type line_number)
: pool_exception(ETL_ERROR_TEXT("pool:not in pool", ETL_FILE"B"), file_name, line_number)
pool_object_not_in_pool(string_type file_name_, numeric_type line_number_)
: pool_exception(ETL_ERROR_TEXT("pool:not in pool", ETL_FILE"B"), file_name_, line_number_)
{}
};
@ -102,8 +102,8 @@ namespace etl
{
public:
pool_element_size(string_type file_name, numeric_type line_number)
: pool_exception(ETL_ERROR_TEXT("pool:element size", ETL_FILE"C"), file_name, line_number)
pool_element_size(string_type file_name_, numeric_type line_number_)
: pool_exception(ETL_ERROR_TEXT("pool:element size", ETL_FILE"C"), file_name_, line_number_)
{}
};
@ -212,13 +212,13 @@ namespace etl
//*************************************************************************
/// Constructor
//*************************************************************************
ipool(char* p_buffer_, uint32_t item_size, uint32_t max_size)
ipool(char* p_buffer_, uint32_t item_size_, uint32_t max_size_)
: p_buffer(p_buffer_),
p_next(p_buffer_),
items_allocated(0),
items_initialised(0),
ITEM_SIZE(item_size),
MAX_SIZE(max_size)
ITEM_SIZE(item_size_),
MAX_SIZE(max_size_)
{
}

View File

@ -63,8 +63,8 @@ namespace etl
{
public:
priority_queue_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
priority_queue_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -77,8 +77,8 @@ namespace etl
{
public:
priority_queue_full(string_type file_name, numeric_type line_number)
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:full", ETL_FILE"A"), file_name, line_number)
priority_queue_full(string_type file_name_, numeric_type line_number_)
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -91,8 +91,8 @@ namespace etl
{
public:
priority_queue_iterator(string_type file_name, numeric_type line_number)
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:iterator", ETL_FILE"B"), file_name, line_number)
priority_queue_iterator(string_type file_name_, numeric_type line_number_)
: priority_queue_exception(ETL_ERROR_TEXT("priority_queue:iterator", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -247,9 +247,9 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(etl::priority_queue_iterator));
ETL_ASSERT(static_cast<size_t>(count) <= max_size(), ETL_ERROR(etl::priority_queue_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d >= 0, ETL_ERROR(etl::priority_queue_iterator));
ETL_ASSERT(static_cast<size_t>(d) <= max_size(), ETL_ERROR(etl::priority_queue_full));
#endif
clear();

View File

@ -440,8 +440,8 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
ivector(T** p_buffer, size_t MAX_SIZE)
: pvoidvector(reinterpret_cast<void**>(p_buffer), MAX_SIZE)
ivector(T** p_buffer_, size_t MAX_SIZE_)
: pvoidvector(reinterpret_cast<void**>(p_buffer_), MAX_SIZE_)
{
}
};

View File

@ -328,8 +328,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(static_cast<size_t>(count) <= CAPACITY, ETL_ERROR(vector_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
#endif
initialise();

View File

@ -54,8 +54,8 @@ namespace etl
{
public:
vector_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
vector_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -68,8 +68,8 @@ namespace etl
{
public:
vector_full(string_type file_name, numeric_type line_number)
: vector_exception(ETL_ERROR_TEXT("vector:full", ETL_FILE"A"), file_name, line_number)
vector_full(string_type file_name_, numeric_type line_number_)
: vector_exception(ETL_ERROR_TEXT("vector:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -82,8 +82,8 @@ namespace etl
{
public:
vector_empty(string_type file_name, numeric_type line_number)
: vector_exception(ETL_ERROR_TEXT("vector:empty", ETL_FILE"B"), file_name, line_number)
vector_empty(string_type file_name_, numeric_type line_number_)
: vector_exception(ETL_ERROR_TEXT("vector:empty", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -96,8 +96,8 @@ namespace etl
{
public:
vector_out_of_bounds(string_type file_name, numeric_type line_number)
: vector_exception(ETL_ERROR_TEXT("vector:bounds", ETL_FILE"C"), file_name, line_number)
vector_out_of_bounds(string_type file_name_, numeric_type line_number_)
: vector_exception(ETL_ERROR_TEXT("vector:bounds", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -110,8 +110,8 @@ namespace etl
{
public:
vector_incompatible_type(string_type file_name, numeric_type line_number)
: vector_exception(ETL_ERROR_TEXT("vector:type", ETL_FILE"D"), file_name, line_number)
vector_incompatible_type(string_type file_name_, numeric_type line_number_)
: vector_exception(ETL_ERROR_TEXT("vector:type", ETL_FILE"D"), file_name_, line_number_)
{
}
};
@ -149,8 +149,8 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
vector_base(size_t max_size)
: CAPACITY(max_size)
vector_base(size_t max_size_)
: CAPACITY(max_size_)
{
}

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 0
#define ETL_NO_NULLPTR_SUPPORT 1
#define ETL_NO_LARGE_CHAR_SUPPORT 1
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_ATOMIC_SUPPORTED 0
#endif

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 0
#define ETL_NO_NULLPTR_SUPPORT 1
#define ETL_NO_LARGE_CHAR_SUPPORT 1
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_ATOMIC_SUPPORTED 0
#endif

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 0
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_NO_LARGE_CHAR_SUPPORT 0
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
#define ETL_ATOMIC_SUPPORTED 1
#endif

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 0
#define ETL_NO_NULLPTR_SUPPORT 1
#define ETL_NO_LARGE_CHAR_SUPPORT 1
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_ATOMIC_SUPPORTED 0
#endif

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 0
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_NO_LARGE_CHAR_SUPPORT 0
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
#define ETL_ATOMIC_SUPPORTED 1
#endif

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_NO_LARGE_CHAR_SUPPORT 0
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
#define ETL_ATOMIC_SUPPORTED 1
#endif

View File

@ -40,11 +40,11 @@ SOFTWARE.
#define ETL_TARGET_DEVICE_GENERIC
#define ETL_TARGET_OS_NONE
#define ETL_COMPILER_GCC
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#endif

View File

@ -40,11 +40,11 @@ SOFTWARE.
#define ETL_TARGET_DEVICE_X86
#define ETL_TARGET_OS_LINUX
#define ETL_COMPILER_GCC
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#endif

View File

@ -40,11 +40,11 @@ SOFTWARE.
#define ETL_TARGET_DEVICE_X86
#define ETL_TARGET_OS_WINDOWS
#define ETL_COMPILER_GCC
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#endif

View File

@ -40,11 +40,11 @@ SOFTWARE.
#define ETL_TARGET_DEVICE_X86
#define ETL_TARGET_OS_WINDOWS
#define ETL_COMPILER_MICROSOFT
#define ETL_CPP11_SUPPORTED (_MSC_VER >= 1600)
#define ETL_CPP14_SUPPORTED (_MSC_VER >= 1900)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#define ETL_CPP11_SUPPORTED (_MSC_VER >= 1600)
#define ETL_CPP14_SUPPORTED (_MSC_VER >= 1900)
#define ETL_NO_NULLPTR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_NO_LARGE_CHAR_SUPPORT !ETL_CPP11_SUPPORTED
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
#define ETL_ATOMIC_SUPPORTED ETL_CPP11_SUPPORTED
#endif

View File

@ -44,7 +44,7 @@ SOFTWARE.
#define ETL_CPP14_SUPPORTED 0
#define ETL_NO_NULLPTR_SUPPORT 1
#define ETL_NO_LARGE_CHAR_SUPPORT 1
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_ATOMIC_SUPPORTED 0
#endif

View File

@ -64,8 +64,8 @@ namespace etl
{
public:
queue_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
queue_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -78,8 +78,8 @@ namespace etl
{
public:
queue_full(string_type file_name, numeric_type line_number)
: queue_exception(ETL_ERROR_TEXT("queue:full", ETL_FILE"A"), file_name, line_number)
queue_full(string_type file_name_, numeric_type line_number_)
: queue_exception(ETL_ERROR_TEXT("queue:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -92,8 +92,8 @@ namespace etl
{
public:
queue_empty(string_type file_name, numeric_type line_number)
: queue_exception(ETL_ERROR_TEXT("queue:empty", ETL_FILE"B"), file_name, line_number)
queue_empty(string_type file_name_, numeric_type line_number_)
: queue_exception(ETL_ERROR_TEXT("queue:empty", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -156,11 +156,11 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
queue_base(size_type max_size)
queue_base(size_type max_size_)
: in(0),
out(0),
current_size(0),
CAPACITY(max_size)
CAPACITY(max_size_)
{
}
@ -397,7 +397,7 @@ namespace etl
}
//*************************************************************************
/// Gets the oldest value and removes it from the front of the queue and
/// Gets the oldest value and removes it from the front of the queue and
/// pushes it to the destination container.
/// If asserts or exceptions are enabled, throws an etl::queue_empty if the queue is empty.
/// NOTE: The destination must support a push(T) member function.
@ -408,7 +408,7 @@ namespace etl
destination.push(front());
pop();
}
//*************************************************************************
/// Assignment operator.
//*************************************************************************
@ -444,9 +444,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
iqueue(T* p_buffer, size_type max_size)
: queue_base(max_size),
p_buffer(p_buffer)
iqueue(T* p_buffer_, size_type max_size_)
: queue_base(max_size_),
p_buffer(p_buffer_)
{
}

View File

@ -63,8 +63,8 @@ namespace etl
{
public:
flat_map_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
flat_map_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -77,8 +77,8 @@ namespace etl
{
public:
flat_map_full(string_type file_name, numeric_type line_number)
: flat_map_exception(ETL_ERROR_TEXT("flat_map: full", ETL_FILE"A"), file_name, line_number)
flat_map_full(string_type file_name_, numeric_type line_number_)
: flat_map_exception(ETL_ERROR_TEXT("flat_map: full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -91,8 +91,8 @@ namespace etl
{
public:
flat_map_out_of_bounds(string_type file_name, numeric_type line_number)
: flat_map_exception(ETL_ERROR_TEXT("flat_map:bounds", ETL_FILE"B"), file_name, line_number)
flat_map_out_of_bounds(string_type file_name_, numeric_type line_number_)
: flat_map_exception(ETL_ERROR_TEXT("flat_map:bounds", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -135,8 +135,8 @@ namespace etl
{
}
iterator(typename lookup_t::iterator ilookup)
: ilookup(ilookup)
iterator(typename lookup_t::iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -233,8 +233,8 @@ namespace etl
{
}
const_iterator(typename lookup_t::const_iterator ilookup)
: ilookup(ilookup)
const_iterator(typename lookup_t::const_iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -525,8 +525,8 @@ namespace etl
STATIC_ASSERT((etl::is_same<value_type, typename std::iterator_traits<TIterator>::value_type>::value), "Incompatible data for assign");
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_map_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_map_full));
#endif
clear();

View File

@ -52,8 +52,8 @@ namespace etl
{
public:
flat_multimap_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
flat_multimap_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -66,8 +66,8 @@ namespace etl
{
public:
flat_multimap_full(string_type file_name, numeric_type line_number)
: flat_multimap_exception(ETL_ERROR_TEXT("flat_multimap:full", ETL_FILE"A"), file_name, line_number)
flat_multimap_full(string_type file_name_, numeric_type line_number_)
: flat_multimap_exception(ETL_ERROR_TEXT("flat_multimap:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -110,8 +110,8 @@ namespace etl
{
}
iterator(typename lookup_t::iterator ilookup)
: ilookup(ilookup)
iterator(typename lookup_t::iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -208,8 +208,8 @@ namespace etl
{
}
const_iterator(typename lookup_t::const_iterator ilookup)
: ilookup(ilookup)
const_iterator(typename lookup_t::const_iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -440,8 +440,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
#endif
clear();
@ -510,9 +510,9 @@ namespace etl
}
else
{
size_t count = std::distance(range.first, range.second);
size_t d = std::distance(range.first, range.second);
erase(range.first, range.second);
return count;
return d;
}
}

View File

@ -57,8 +57,8 @@ namespace etl
{
public:
flat_multiset_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
flat_multiset_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -71,8 +71,8 @@ namespace etl
{
public:
flat_multiset_full(string_type file_name, numeric_type line_number)
: flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:full", ETL_FILE"A"), file_name, line_number)
flat_multiset_full(string_type file_name_, numeric_type line_number_)
: flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
flat_multiset_iterator(string_type file_name, numeric_type line_number)
: flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:iterator", ETL_FILE"C"), file_name, line_number)
flat_multiset_iterator(string_type file_name_, numeric_type line_number_)
: flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -127,8 +127,8 @@ namespace etl
{
}
iterator(typename lookup_t::iterator ilookup)
: ilookup(ilookup)
iterator(typename lookup_t::iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -225,8 +225,8 @@ namespace etl
{
}
const_iterator(typename lookup_t::const_iterator ilookup)
: ilookup(ilookup)
const_iterator(typename lookup_t::const_iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -437,8 +437,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
#endif
clear();
@ -522,9 +522,9 @@ namespace etl
}
else
{
size_t count = std::distance(range.first, range.second);
size_t d = std::distance(range.first, range.second);
erase(range.first, range.second);
return count;
return d;
}
}

View File

@ -57,8 +57,8 @@ namespace etl
{
public:
flat_set_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
flat_set_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -71,8 +71,8 @@ namespace etl
{
public:
flat_set_full(string_type file_name, numeric_type line_number)
: flat_set_exception(ETL_ERROR_TEXT("flat_set:full", ETL_FILE"A"), file_name, line_number)
flat_set_full(string_type file_name_, numeric_type line_number_)
: flat_set_exception(ETL_ERROR_TEXT("flat_set:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
flat_set_iterator(string_type file_name, numeric_type line_number)
: flat_set_exception(ETL_ERROR_TEXT("flat_set:iterator", ETL_FILE"C"), file_name, line_number)
flat_set_iterator(string_type file_name_, numeric_type line_number_)
: flat_set_exception(ETL_ERROR_TEXT("flat_set:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -127,8 +127,8 @@ namespace etl
{
}
iterator(typename lookup_t::iterator ilookup)
: ilookup(ilookup)
iterator(typename lookup_t::iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -225,8 +225,8 @@ namespace etl
{
}
const_iterator(typename lookup_t::const_iterator ilookup)
: ilookup(ilookup)
const_iterator(typename lookup_t::const_iterator ilookup_)
: ilookup(ilookup_)
{
}
@ -437,8 +437,8 @@ namespace etl
void assign(TIterator first, TIterator last)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_set_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_set_full));
#endif
clear();

View File

@ -52,8 +52,8 @@ namespace etl
{
public:
scheduler_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
scheduler_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -65,8 +65,8 @@ namespace etl
{
public:
scheduler_no_tasks_exception(string_type file_name, numeric_type line_number)
: etl::scheduler_exception(ETL_ERROR_TEXT("scheduler:no tasks", ETL_FILE"A"), file_name, line_number)
scheduler_no_tasks_exception(string_type file_name_, numeric_type line_number_)
: etl::scheduler_exception(ETL_ERROR_TEXT("scheduler:no tasks", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -78,8 +78,8 @@ namespace etl
{
public:
scheduler_null_task_exception(string_type file_name, numeric_type line_number)
: etl::scheduler_exception(ETL_ERROR_TEXT("scheduler:null task", ETL_FILE"B"), file_name, line_number)
scheduler_null_task_exception(string_type file_name_, numeric_type line_number_)
: etl::scheduler_exception(ETL_ERROR_TEXT("scheduler:null task", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -91,8 +91,8 @@ namespace etl
{
public:
scheduler_too_many_tasks_exception(string_type file_name, numeric_type line_number)
: etl::scheduler_exception(ETL_ERROR_TEXT("scheduler:too many tasks", ETL_FILE"C"), file_name, line_number)
scheduler_too_many_tasks_exception(string_type file_name_, numeric_type line_number_)
: etl::scheduler_exception(ETL_ERROR_TEXT("scheduler:too many tasks", ETL_FILE"C"), file_name_, line_number_)
{
}
};

View File

@ -70,8 +70,8 @@ namespace etl
{
public:
set_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
set_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -84,8 +84,8 @@ namespace etl
{
public:
set_full(string_type file_name, numeric_type line_number)
: etl::set_exception(ETL_ERROR_TEXT("set:full", ETL_FILE"A"), file_name, line_number)
set_full(string_type file_name_, numeric_type line_number_)
: etl::set_exception(ETL_ERROR_TEXT("set:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -98,8 +98,8 @@ namespace etl
{
public:
set_out_of_bounds(string_type file_name, numeric_type line_number)
: etl::set_exception(ETL_ERROR_TEXT("set:bounds", ETL_FILE"B"), file_name, line_number)
set_out_of_bounds(string_type file_name_, numeric_type line_number_)
: etl::set_exception(ETL_ERROR_TEXT("set:bounds", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -112,8 +112,8 @@ namespace etl
{
public:
set_iterator(string_type file_name, numeric_type line_number)
: etl::set_exception(ETL_ERROR_TEXT("set:iterator problem", ETL_FILE"C"), file_name, line_number)
set_iterator(string_type file_name_, numeric_type line_number_)
: etl::set_exception(ETL_ERROR_TEXT("set:iterator problem", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -220,9 +220,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
set_base(size_type max_size)
set_base(size_type max_size_)
: current_size(0)
, CAPACITY(max_size)
, CAPACITY(max_size_)
, root_node(nullptr)
{
@ -486,8 +486,8 @@ namespace etl
//*************************************************************************
struct Data_Node : public Node
{
explicit Data_Node(value_type value)
: value(value)
explicit Data_Node(value_type value_)
: value(value_)
{
}

View File

@ -64,8 +64,8 @@ namespace etl
{
public:
stack_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
stack_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -78,8 +78,8 @@ namespace etl
{
public:
stack_full(string_type file_name, numeric_type line_number)
: stack_exception(ETL_ERROR_TEXT("stack:full", ETL_FILE"A"), file_name, line_number)
stack_full(string_type file_name_, numeric_type line_number_)
: stack_exception(ETL_ERROR_TEXT("stack:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -92,8 +92,8 @@ namespace etl
{
public:
stack_empty(string_type file_name, numeric_type line_number)
: stack_exception(ETL_ERROR_TEXT("stack:empty", ETL_FILE"B"), file_name, line_number)
stack_empty(string_type file_name_, numeric_type line_number_)
: stack_exception(ETL_ERROR_TEXT("stack:empty", ETL_FILE"B"), file_name_, line_number_)
{
}
};
@ -157,10 +157,10 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
stack_base(size_type max_size)
stack_base(size_type max_size_)
: top_index(0),
current_size(0),
CAPACITY(max_size)
current_size(0),
CAPACITY(max_size_)
{
}
@ -362,7 +362,7 @@ namespace etl
}
//*************************************************************************
/// Removes the oldest item from the top of the stack and pushes it to the
/// Removes the oldest item from the top of the stack and pushes it to the
/// destination container.
/// NOTE: The destination must support a push(T) member function.
//*************************************************************************
@ -413,9 +413,9 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
istack(T* p_buffer, size_type max_size)
: stack_base(max_size),
p_buffer(p_buffer)
istack(T* p_buffer_, size_type max_size_)
: stack_base(max_size_),
p_buffer(p_buffer_)
{
}

View File

@ -47,8 +47,8 @@ namespace etl
{
public:
task_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
task_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};

View File

@ -64,8 +64,8 @@ namespace etl
}
//*********************************************************************
explicit type_def(TValue value)
: value(value)
explicit type_def(TValue value_)
: value(value_)
{
}

View File

@ -83,16 +83,16 @@ namespace etl
///\param position The position of the first character.
///\param length The number of characters. Default = npos.
//*************************************************************************
u16string(const etl::u16string<MAX_SIZE_>& other, size_t position, size_t length = npos)
u16string(const etl::u16string<MAX_SIZE_>& other, size_t position, size_t length_ = npos)
: iu16string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
{
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
// Set the length to the exact amount.
length = (length > MAX_SIZE_) ? MAX_SIZE_ : length;
length_ = (length_ > MAX_SIZE_) ? MAX_SIZE_ : length_;
iu16string::initialise();
iu16string::assign(other.begin() + position, other.begin() + position + length);
iu16string::assign(other.begin() + position, other.begin() + position + length_);
}
//*************************************************************************
@ -148,7 +148,7 @@ namespace etl
///\param position The position of the first character. Default = 0.
///\param length The number of characters. Default = npos.
//*************************************************************************
etl::u16string<MAX_SIZE_> substr(size_t position = 0, size_t length = npos) const
etl::u16string<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
{
etl::u16string<MAX_SIZE_> new_string;
@ -156,9 +156,9 @@ namespace etl
{
ETL_ASSERT(position < size(), ETL_ERROR(string_out_of_bounds));
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
new_string.assign(buffer + position, buffer + position + length);
new_string.assign(buffer + position, buffer + position + length_);
}
return new_string;

View File

@ -83,16 +83,16 @@ namespace etl
///\param position The position of the first character.
///\param length The number of characters. Default = npos.
//*************************************************************************
u32string(const etl::u32string<MAX_SIZE_>& other, size_t position, size_t length = npos)
u32string(const etl::u32string<MAX_SIZE_>& other, size_t position, size_t length_ = npos)
: iu32string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
{
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
// Set the length to the exact amount.
length = (length > MAX_SIZE_) ? MAX_SIZE_ : length;
length_ = (length_ > MAX_SIZE_) ? MAX_SIZE_ : length_;
iu32string::initialise();
iu32string::assign(other.begin() + position, other.begin() + position + length);
iu32string::assign(other.begin() + position, other.begin() + position + length_);
}
//*************************************************************************
@ -148,7 +148,7 @@ namespace etl
///\param position The position of the first character. Default = 0.
///\param length The number of characters. Default = npos.
//*************************************************************************
etl::u32string<MAX_SIZE_> substr(size_t position = 0, size_t length = npos) const
etl::u32string<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
{
etl::u32string<MAX_SIZE_> new_string;
@ -156,9 +156,9 @@ namespace etl
{
ETL_ASSERT(position < size(), ETL_ERROR(string_out_of_bounds));
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
new_string.assign(buffer + position, buffer + position + length);
new_string.assign(buffer + position, buffer + position + length_);
}
return new_string;

View File

@ -71,8 +71,8 @@ namespace etl
{
public:
unordered_map_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
unordered_map_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
unordered_map_full(string_type file_name, numeric_type line_number)
: etl::unordered_map_exception(ETL_ERROR_TEXT("unordered_map:full", ETL_FILE"A"), file_name, line_number)
unordered_map_full(string_type file_name_, numeric_type line_number_)
: etl::unordered_map_exception(ETL_ERROR_TEXT("unordered_map:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -99,8 +99,8 @@ namespace etl
{
public:
unordered_map_out_of_range(string_type file_name, numeric_type line_number)
: etl::unordered_map_exception(ETL_ERROR_TEXT("unordered_map:range", ETL_FILE"B"), file_name, line_number)
unordered_map_out_of_range(string_type file_name_, numeric_type line_number_)
: etl::unordered_map_exception(ETL_ERROR_TEXT("unordered_map:range", ETL_FILE"B"), file_name_, line_number_)
{}
};
@ -112,8 +112,8 @@ namespace etl
{
public:
unordered_map_iterator(string_type file_name, numeric_type line_number)
: etl::unordered_map_exception(ETL_ERROR_TEXT("unordered_map:iterator", ETL_FILE"C"), file_name, line_number)
unordered_map_iterator(string_type file_name_, numeric_type line_number_)
: etl::unordered_map_exception(ETL_ERROR_TEXT("unordered_map:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -148,8 +148,8 @@ namespace etl
// The nodes that store the elements.
struct node_t : public link_t
{
node_t(const value_type& key_value_pair)
: key_value_pair(key_value_pair)
node_t(const value_type& key_value_pair_)
: key_value_pair(key_value_pair_)
{
}
@ -291,10 +291,10 @@ namespace etl
private:
//*********************************
iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -354,16 +354,16 @@ namespace etl
//*********************************
const_iterator(const typename iunordered_map::iterator& other)
: pbuckets_end(other.pbuckets_end),
pbucket(other.pbucket),
inode(other.inode)
pbucket(other.pbucket),
inode(other.inode)
{
}
//*********************************
const_iterator(const const_iterator& other)
: pbuckets_end(other.pbuckets_end),
pbucket(other.pbucket),
inode(other.inode)
pbucket(other.pbucket),
inode(other.inode)
{
}
@ -442,10 +442,10 @@ namespace etl
private:
//*********************************
const_iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
const_iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -592,7 +592,7 @@ namespace etl
/// Returns the bucket index for the key.
///\return The bucket index for the key.
//*********************************************************************
size_type bucket(key_parameter_t key) const
size_type get_bucket_index(key_parameter_t key) const
{
return key_hash_function(key) % number_of_buckets;
}
@ -634,7 +634,7 @@ namespace etl
mapped_type& operator [](key_parameter_t key)
{
// Find the bucket.
bucket_t* pbucket = pbuckets + bucket(key);
bucket_t* pbucket = pbuckets + get_bucket_index(key);
// Find the first node in the bucket.
local_iterator inode = pbucket->begin();
@ -674,7 +674,7 @@ namespace etl
mapped_type& at(key_parameter_t key)
{
// Find the bucket.
bucket_t* pbucket = pbuckets + bucket(key);
bucket_t* pbucket = pbuckets + get_bucket_index(key);
// Find the first node in the bucket.
local_iterator inode = pbucket->begin();
@ -709,7 +709,7 @@ namespace etl
const mapped_type& at(key_parameter_t key) const
{
// Find the bucket.
bucket_t* pbucket = pbuckets + bucket(key);
bucket_t* pbucket = pbuckets + get_bucket_index(key);
// Find the first node in the bucket.
local_iterator inode = pbucket->begin();
@ -743,19 +743,19 @@ namespace etl
///\param last The iterator to the last element + 1.
//*********************************************************************
template <typename TIterator>
void assign(TIterator first, TIterator last)
void assign(TIterator first_, TIterator last_)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(unordered_map_iterator));
ETL_ASSERT(size_t(count) <= max_size(), ETL_ERROR(unordered_map_full));
difference_type d = std::distance(first_, last_);
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_map_iterator));
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_map_full));
#endif
clear();
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -774,7 +774,7 @@ namespace etl
const mapped_type& mapped = key_value_pair.second;
// Get the hash index.
size_t index = bucket(key);
size_t index = get_bucket_index(key);
// Get the bucket & bucket iterator.
bucket_t* pbucket = pbuckets + index;
@ -855,11 +855,11 @@ namespace etl
///\param last The last + 1 element to add.
//*********************************************************************
template <class TIterator>
void insert(TIterator first, TIterator last)
void insert(TIterator first_, TIterator last_)
{
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -870,8 +870,8 @@ namespace etl
//*********************************************************************
size_t erase(key_parameter_t key)
{
size_t count = 0;
size_t index = bucket(key);
size_t n = 0;
size_t index = get_bucket_index(key);
bucket_t& bucket = pbuckets[index];
@ -891,11 +891,11 @@ namespace etl
bucket.erase_after(iprevious); // Unlink from the bucket.
icurrent->key_value_pair.~value_type(); // Destroy the value.
pnodepool->release(&*icurrent); // Release it back to the pool.
count = 1;
n = 1;
--construct_count;
}
return count;
return n;
}
//*********************************************************************
@ -933,18 +933,18 @@ namespace etl
///\param first Iterator to the first element.
///\param last Iterator to the last element.
//*********************************************************************
iterator erase(const_iterator first, const_iterator last)
iterator erase(const_iterator first_, const_iterator last_)
{
// Make a note of the last.
iterator result((pbuckets + number_of_buckets), last.get_bucket_list_iterator(), last.get_local_iterator());
iterator result((pbuckets + number_of_buckets), last_.get_bucket_list_iterator(), last_.get_local_iterator());
// Get the starting point.
bucket_t* pbucket = first.get_bucket_list_iterator();
bucket_t* pbucket = first_.get_bucket_list_iterator();
local_iterator iprevious = pbucket->before_begin();
local_iterator icurrent = first.get_local_iterator();
local_iterator iend = last.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
local_iterator icurrent = first_.get_local_iterator();
local_iterator iend = last_.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
// Find the node previous to the first one.
// Find the node previous to the first one.
while (iprevious->etl_next != &*icurrent)
{
++iprevious;
@ -1006,7 +1006,7 @@ namespace etl
//*********************************************************************
iterator find(key_parameter_t key)
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -1040,7 +1040,7 @@ namespace etl
//*********************************************************************
const_iterator find(key_parameter_t key) const
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -1077,15 +1077,15 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_parameter_t key)
{
iterator first = find(key);
iterator last = first;
iterator f = find(key);
iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
}
return std::pair<iterator, iterator>(first, last);
return std::pair<iterator, iterator>(f, l);
}
//*********************************************************************
@ -1098,15 +1098,15 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
{
const_iterator first = find(key);
const_iterator last = first;
const_iterator f = find(key);
const_iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
}
return std::pair<const_iterator, const_iterator>(first, last);
return std::pair<const_iterator, const_iterator>(f, l);
}
//*************************************************************************
@ -1196,10 +1196,10 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iunordered_map(pool_t& node_pool, bucket_t* pbuckets_, size_t number_of_buckets)
: pnodepool(&node_pool),
iunordered_map(pool_t& node_pool_, bucket_t* pbuckets_, size_t number_of_buckets_)
: pnodepool(&node_pool_),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets)
number_of_buckets(number_of_buckets_)
{
}
@ -1351,10 +1351,10 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
unordered_map(TIterator first, TIterator last)
unordered_map(TIterator first_, TIterator last_)
: base(node_pool, buckets, MAX_BUCKETS_)
{
base::assign(first, last);
base::assign(first_, last_);
}
//*************************************************************************

View File

@ -71,8 +71,8 @@ namespace etl
{
public:
unordered_multimap_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
unordered_multimap_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
unordered_multimap_full(string_type file_name, numeric_type line_number)
: etl::unordered_multimap_exception(ETL_ERROR_TEXT("unordered_multimap:full", ETL_FILE"A"), file_name, line_number)
unordered_multimap_full(string_type file_name_, numeric_type line_number_)
: etl::unordered_multimap_exception(ETL_ERROR_TEXT("unordered_multimap:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -99,8 +99,8 @@ namespace etl
{
public:
unordered_multimap_out_of_range(string_type file_name, numeric_type line_number)
: etl::unordered_multimap_exception(ETL_ERROR_TEXT("unordered_multimap:range", ETL_FILE"B"), file_name, line_number)
unordered_multimap_out_of_range(string_type file_name_, numeric_type line_number_)
: etl::unordered_multimap_exception(ETL_ERROR_TEXT("unordered_multimap:range", ETL_FILE"B"), file_name_, line_number_)
{}
};
@ -112,8 +112,8 @@ namespace etl
{
public:
unordered_multimap_iterator(string_type file_name, numeric_type line_number)
: etl::unordered_multimap_exception(ETL_ERROR_TEXT("unordered_multimap:iterator", ETL_FILE"C"), file_name, line_number)
unordered_multimap_iterator(string_type file_name_, numeric_type line_number_)
: etl::unordered_multimap_exception(ETL_ERROR_TEXT("unordered_multimap:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -147,8 +147,8 @@ namespace etl
struct node_t : public link_t // The nodes that store the elements.
{
node_t(const value_type& key_value_pair)
: key_value_pair(key_value_pair)
node_t(const value_type& key_value_pair_)
: key_value_pair(key_value_pair_)
{
}
@ -290,10 +290,10 @@ namespace etl
private:
//*********************************
iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -442,10 +442,10 @@ namespace etl
private:
//*********************************
const_iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
const_iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -592,7 +592,7 @@ namespace etl
/// Returns the bucket index for the key.
///\return The bucket index for the key.
//*********************************************************************
size_type bucket(key_parameter_t key) const
size_type get_bucket_index(key_parameter_t key) const
{
return key_hash_function(key) % number_of_buckets;
}
@ -634,19 +634,19 @@ namespace etl
///\param last The iterator to the last element + 1.
//*********************************************************************
template <typename TIterator>
void assign(TIterator first, TIterator last)
void assign(TIterator first_, TIterator last_)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(unordered_multimap_iterator));
ETL_ASSERT(size_t(count) <= max_size(), ETL_ERROR(unordered_multimap_full));
difference_type d = std::distance(first_, last_);
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_multimap_iterator));
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_multimap_full));
#endif
clear();
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -665,7 +665,7 @@ namespace etl
const mapped_type& mapped = key_value_pair.second;
// Get the hash index.
size_t index = bucket(key);
size_t index = get_bucket_index(key);
// Get the bucket & bucket iterator.
bucket_t* pbucket = pbuckets + index;
@ -738,11 +738,11 @@ namespace etl
///\param last The last + 1 element to add.
//*********************************************************************
template <class TIterator>
void insert(TIterator first, TIterator last)
void insert(TIterator first_, TIterator last_)
{
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -753,8 +753,8 @@ namespace etl
//*********************************************************************
size_t erase(key_parameter_t key)
{
size_t count = 0;
size_t bucket_id = bucket(key);
size_t n = 0;
size_t bucket_id = get_bucket_index(key);
bucket_t& bucket = pbuckets[bucket_id];
@ -768,7 +768,7 @@ namespace etl
bucket.erase_after(iprevious); // Unlink from the bucket.
icurrent->key_value_pair.~value_type(); // Destroy the value.
pnodepool->release(&*icurrent); // Release it back to the pool.
++count;
++n;
icurrent = iprevious;
--construct_count;
}
@ -780,7 +780,7 @@ namespace etl
++icurrent;
}
return count;
return n;
}
//*********************************************************************
@ -818,16 +818,16 @@ namespace etl
///\param first Iterator to the first element.
///\param last Iterator to the last element.
//*********************************************************************
iterator erase(const_iterator first, const_iterator last)
iterator erase(const_iterator first_, const_iterator last_)
{
// Make a note of the last.
iterator result((pbuckets + number_of_buckets), last.get_bucket_list_iterator(), last.get_local_iterator());
iterator result((pbuckets + number_of_buckets), last_.get_bucket_list_iterator(), last_.get_local_iterator());
// Get the starting point.
bucket_t* pbucket = first.get_bucket_list_iterator();
bucket_t* pbucket = first_.get_bucket_list_iterator();
local_iterator iprevious = pbucket->before_begin();
local_iterator icurrent = first.get_local_iterator();
local_iterator iend = last.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
local_iterator icurrent = first_.get_local_iterator();
local_iterator iend = last_.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
// Find the node previous to the first one.
while (iprevious->etl_next != &*icurrent)
@ -882,17 +882,17 @@ namespace etl
size_t count(key_parameter_t key) const
{
size_t n = 0;
const_iterator first = find(key);
const_iterator last = first;
const_iterator f = find(key);
const_iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
++n;
while ((last != end()) && (key == last->first))
while ((l != end()) && (key == l->first))
{
++last;
++l;
++n;
}
}
@ -907,7 +907,7 @@ namespace etl
//*********************************************************************
iterator find(key_parameter_t key)
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -941,7 +941,7 @@ namespace etl
//*********************************************************************
const_iterator find(key_parameter_t key) const
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -978,20 +978,20 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_parameter_t key)
{
iterator first = find(key);
iterator last = first;
iterator f = find(key);
iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
while ((last != end()) && (key == last->first))
while ((l != end()) && (key == l->first))
{
++last;
++l;
}
}
return std::pair<iterator, iterator>(first, last);
return std::pair<iterator, iterator>(f, l);
}
//*********************************************************************
@ -1004,20 +1004,20 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
{
const_iterator first = find(key);
const_iterator last = first;
const_iterator f = find(key);
const_iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
while ((last != end()) && (key == last->first))
while ((l != end()) && (key == l->first))
{
++last;
++l;
}
}
return std::pair<const_iterator, const_iterator>(first, last);
return std::pair<const_iterator, const_iterator>(f, l);
}
//*************************************************************************
@ -1107,10 +1107,10 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iunordered_multimap(pool_t& node_pool, bucket_t* pbuckets_, size_t number_of_buckets)
: pnodepool(&node_pool),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets)
iunordered_multimap(pool_t& node_pool_, bucket_t* pbuckets_, size_t number_of_buckets_)
: pnodepool(&node_pool_),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets_)
{
}
@ -1261,10 +1261,10 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
unordered_multimap(TIterator first, TIterator last)
unordered_multimap(TIterator first_, TIterator last_)
: base(node_pool, buckets, MAX_BUCKETS)
{
base::assign(first, last);
base::assign(first_, last_);
}
//*************************************************************************

View File

@ -70,8 +70,8 @@ namespace etl
{
public:
unordered_multiset_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
unordered_multiset_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -84,8 +84,8 @@ namespace etl
{
public:
unordered_multiset_full(string_type file_name, numeric_type line_number)
: etl::unordered_multiset_exception(ETL_ERROR_TEXT("unordered_multiset:full", ETL_FILE"A"), file_name, line_number)
unordered_multiset_full(string_type file_name_, numeric_type line_number_)
: etl::unordered_multiset_exception(ETL_ERROR_TEXT("unordered_multiset:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -98,8 +98,8 @@ namespace etl
{
public:
unordered_multiset_out_of_range(string_type file_name, numeric_type line_number)
: etl::unordered_multiset_exception(ETL_ERROR_TEXT("unordered_multiset:range", ETL_FILE"B"), file_name, line_number)
unordered_multiset_out_of_range(string_type file_name_, numeric_type line_number_)
: etl::unordered_multiset_exception(ETL_ERROR_TEXT("unordered_multiset:range", ETL_FILE"B"), file_name_, line_number_)
{}
};
@ -111,8 +111,8 @@ namespace etl
{
public:
unordered_multiset_iterator(string_type file_name, numeric_type line_number)
: etl::unordered_multiset_exception(ETL_ERROR_TEXT("unordered_multiset:iterator", ETL_FILE"C"), file_name, line_number)
unordered_multiset_iterator(string_type file_name_, numeric_type line_number_)
: etl::unordered_multiset_exception(ETL_ERROR_TEXT("unordered_multiset:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -144,8 +144,8 @@ namespace etl
// The nodes that store the elements.
struct node_t : public link_t
{
node_t(const value_type& key)
: key(key)
node_t(const value_type& key_)
: key(key_)
{
}
@ -286,10 +286,10 @@ namespace etl
private:
//*********************************
iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -437,10 +437,10 @@ namespace etl
private:
//*********************************
const_iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
const_iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -587,7 +587,7 @@ namespace etl
/// Returns the bucket index for the key.
///\return The bucket index for the key.
//*********************************************************************
size_type bucket(key_parameter_t key) const
size_type get_bucket_index(key_parameter_t key) const
{
return key_hash_function(key) % number_of_buckets;
}
@ -629,19 +629,19 @@ namespace etl
///\param last The iterator to the last element + 1.
//*********************************************************************
template <typename TIterator>
void assign(TIterator first, TIterator last)
void assign(TIterator first_, TIterator last_)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(unordered_multiset_iterator));
ETL_ASSERT(size_t(count) <= max_size(), ETL_ERROR(unordered_multiset_full));
difference_type d = std::distance(first_, last_);
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_multiset_iterator));
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_multiset_full));
#endif
clear();
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -657,7 +657,7 @@ namespace etl
ETL_ASSERT(!full(), ETL_ERROR(unordered_multiset_full));
// Get the hash index.
size_t index = bucket(key);
size_t index = get_bucket_index(key);
// Get the bucket & bucket iterator.
bucket_t* pbucket = pbuckets + index;
@ -732,11 +732,11 @@ namespace etl
///\param last The last + 1 element to add.
//*********************************************************************
template <class TIterator>
void insert(TIterator first, TIterator last)
void insert(TIterator first_, TIterator last_)
{
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -747,8 +747,8 @@ namespace etl
//*********************************************************************
size_t erase(key_parameter_t key)
{
size_t count = 0;
size_t bucket_id = bucket(key);
size_t n = 0;
size_t bucket_id = get_bucket_index(key);
bucket_t& bucket = pbuckets[bucket_id];
@ -762,7 +762,7 @@ namespace etl
bucket.erase_after(iprevious); // Unlink from the bucket.
icurrent->key.~value_type(); // Destroy the value.
pnodepool->release(&*icurrent); // Release it back to the pool.
++count;
++n;
icurrent = iprevious;
--construct_count;
}
@ -774,7 +774,7 @@ namespace etl
++icurrent;
}
return count;
return n;
}
//*********************************************************************
@ -812,16 +812,16 @@ namespace etl
///\param first Iterator to the first element.
///\param last Iterator to the last element.
//*********************************************************************
iterator erase(const_iterator first, const_iterator last)
iterator erase(const_iterator first_, const_iterator last_)
{
// Make a note of the last.
iterator result((pbuckets + number_of_buckets), last.get_bucket_list_iterator(), last.get_local_iterator());
iterator result((pbuckets + number_of_buckets), last_.get_bucket_list_iterator(), last_.get_local_iterator());
// Get the starting point.
bucket_t* pbucket = first.get_bucket_list_iterator();
bucket_t* pbucket = first_.get_bucket_list_iterator();
local_iterator iprevious = pbucket->before_begin();
local_iterator icurrent = first.get_local_iterator();
local_iterator iend = last.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
local_iterator icurrent = first_.get_local_iterator();
local_iterator iend = last_.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
// Find the node previous to the first one.
while (iprevious->etl_next != &*icurrent)
@ -876,17 +876,17 @@ namespace etl
size_t count(key_parameter_t key) const
{
size_t n = 0;
const_iterator first = find(key);
const_iterator last = first;
const_iterator f = find(key);
const_iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
++n;
while ((last != end()) && (key == *last))
while ((l != end()) && (key == *l))
{
++last;
++l;
++n;
}
}
@ -901,7 +901,7 @@ namespace etl
//*********************************************************************
iterator find(key_parameter_t key)
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -935,7 +935,7 @@ namespace etl
//*********************************************************************
const_iterator find(key_parameter_t key) const
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -972,20 +972,20 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_parameter_t key)
{
iterator first = find(key);
iterator last = first;
iterator f = find(key);
iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
while ((last != end()) && (key == *last))
while ((l != end()) && (key == *l))
{
++last;
++l;
}
}
return std::pair<iterator, iterator>(first, last);
return std::pair<iterator, iterator>(f, l);
}
//*********************************************************************
@ -998,20 +998,20 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
{
const_iterator first = find(key);
const_iterator last = first;
const_iterator f = find(key);
const_iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
while ((last != end()) && (key == *last))
while ((l != end()) && (key == *l))
{
++last;
++l;
}
}
return std::pair<const_iterator, const_iterator>(first, last);
return std::pair<const_iterator, const_iterator>(f, l);
}
//*************************************************************************
@ -1101,10 +1101,10 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iunordered_multiset(pool_t& node_pool, bucket_t* pbuckets_, size_t number_of_buckets)
: pnodepool(&node_pool),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets)
iunordered_multiset(pool_t& node_pool_, bucket_t* pbuckets_, size_t number_of_buckets_)
: pnodepool(&node_pool_),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets_)
{
}
@ -1256,10 +1256,10 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
unordered_multiset(TIterator first, TIterator last)
unordered_multiset(TIterator first_, TIterator last_)
: base(node_pool, buckets, MAX_BUCKETS)
{
base::assign(first, last);
base::assign(first_, last_);
}
//*************************************************************************

View File

@ -71,8 +71,8 @@ namespace etl
{
public:
unordered_set_exception(string_type what, string_type file_name, numeric_type line_number)
: etl::exception(what, file_name, line_number)
unordered_set_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: etl::exception(reason_, file_name_, line_number_)
{
}
};
@ -85,8 +85,8 @@ namespace etl
{
public:
unordered_set_full(string_type file_name, numeric_type line_number)
: etl::unordered_set_exception(ETL_ERROR_TEXT("unordered_set:full", ETL_FILE"A"), file_name, line_number)
unordered_set_full(string_type file_name_, numeric_type line_number_)
: etl::unordered_set_exception(ETL_ERROR_TEXT("unordered_set:full", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -99,8 +99,8 @@ namespace etl
{
public:
unordered_set_out_of_range(string_type file_name, numeric_type line_number)
: etl::unordered_set_exception(ETL_ERROR_TEXT("unordered_set:range", ETL_FILE"B"), file_name, line_number)
unordered_set_out_of_range(string_type file_name_, numeric_type line_number_)
: etl::unordered_set_exception(ETL_ERROR_TEXT("unordered_set:range", ETL_FILE"B"), file_name_, line_number_)
{}
};
@ -112,8 +112,8 @@ namespace etl
{
public:
unordered_set_iterator(string_type file_name, numeric_type line_number)
: etl::unordered_set_exception(ETL_ERROR_TEXT("unordered_set:iterator", ETL_FILE"C"), file_name, line_number)
unordered_set_iterator(string_type file_name_, numeric_type line_number_)
: etl::unordered_set_exception(ETL_ERROR_TEXT("unordered_set:iterator", ETL_FILE"C"), file_name_, line_number_)
{
}
};
@ -145,8 +145,8 @@ namespace etl
// The nodes that store the elements.
struct node_t : public link_t
{
node_t(const value_type& key)
: key(key)
node_t(const value_type& key_)
: key(key_)
{
}
@ -287,10 +287,10 @@ namespace etl
private:
//*********************************
iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -438,10 +438,10 @@ namespace etl
private:
//*********************************
const_iterator(bucket_t* pbuckets_end, bucket_t* pbucket, local_iterator inode)
: pbuckets_end(pbuckets_end),
pbucket(pbucket),
inode(inode)
const_iterator(bucket_t* pbuckets_end_, bucket_t* pbucket_, local_iterator inode_)
: pbuckets_end(pbuckets_end_),
pbucket(pbucket_),
inode(inode_)
{
}
@ -588,7 +588,7 @@ namespace etl
/// Returns the bucket index for the key.
///\return The bucket index for the key.
//*********************************************************************
size_type bucket(key_parameter_t key) const
size_type get_bucket_index(key_parameter_t key) const
{
return key_hash_function(key) % number_of_buckets;
}
@ -630,19 +630,19 @@ namespace etl
///\param last The iterator to the last element + 1.
//*********************************************************************
template <typename TIterator>
void assign(TIterator first, TIterator last)
void assign(TIterator first_, TIterator last_)
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count >= 0, ETL_ERROR(unordered_set_iterator));
ETL_ASSERT(size_t(count) <= max_size(), ETL_ERROR(unordered_set_full));
difference_type d = std::distance(first_, last_);
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_set_iterator));
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_set_full));
#endif
clear();
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -658,7 +658,7 @@ namespace etl
ETL_ASSERT(!full(), ETL_ERROR(unordered_set_full));
// Get the hash index.
size_t index = bucket(key);
size_t index = get_bucket_index(key);
// Get the bucket & bucket iterator.
bucket_t* pbucket = pbuckets + index;
@ -737,11 +737,11 @@ namespace etl
///\param last The last + 1 element to add.
//*********************************************************************
template <class TIterator>
void insert(TIterator first, TIterator last)
void insert(TIterator first_, TIterator last_)
{
while (first != last)
while (first_ != last_)
{
insert(*first++);
insert(*first_++);
}
}
@ -752,8 +752,8 @@ namespace etl
//*********************************************************************
size_t erase(key_parameter_t key)
{
size_t count = 0;
size_t index = bucket(key);
size_t n = 0;
size_t index = get_bucket_index(key);
bucket_t& bucket = pbuckets[index];
@ -773,11 +773,11 @@ namespace etl
bucket.erase_after(iprevious); // Unlink from the bucket.
icurrent->key.~value_type(); // Destroy the value.
pnodepool->release(&*icurrent); // Release it back to the pool.
count = 1;
n = 1;
--construct_count;
}
return count;
return n;
}
//*********************************************************************
@ -815,16 +815,16 @@ namespace etl
///\param first Iterator to the first element.
///\param last Iterator to the last element.
//*********************************************************************
iterator erase(const_iterator first, const_iterator last)
iterator erase(const_iterator first_, const_iterator last_)
{
// Make a note of the last.
iterator result((pbuckets + number_of_buckets), last.get_bucket_list_iterator(), last.get_local_iterator());
iterator result((pbuckets + number_of_buckets), last_.get_bucket_list_iterator(), last_.get_local_iterator());
// Get the starting point.
bucket_t* pbucket = first.get_bucket_list_iterator();
bucket_t* pbucket = first_.get_bucket_list_iterator();
local_iterator iprevious = pbucket->before_begin();
local_iterator icurrent = first.get_local_iterator();
local_iterator iend = last.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
local_iterator icurrent = first_.get_local_iterator();
local_iterator iend = last_.get_local_iterator(); // Note: May not be in the same bucket as icurrent.
// Find the node previous to the first one.
while (iprevious->etl_next != &*icurrent)
@ -888,7 +888,7 @@ namespace etl
//*********************************************************************
iterator find(key_parameter_t key)
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -922,7 +922,7 @@ namespace etl
//*********************************************************************
const_iterator find(key_parameter_t key) const
{
size_t index = bucket(key);
size_t index = get_bucket_index(key);
bucket_t* pbucket = pbuckets + index;
bucket_t& bucket = *pbucket;
@ -959,15 +959,15 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_parameter_t key)
{
iterator first = find(key);
iterator last = first;
iterator f = find(key);
iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
}
return std::pair<iterator, iterator>(first, last);
return std::pair<iterator, iterator>(f, l);
}
//*********************************************************************
@ -980,15 +980,15 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
{
const_iterator first = find(key);
const_iterator last = first;
const_iterator f = find(key);
const_iterator l = f;
if (last != end())
if (l != end())
{
++last;
++l;
}
return std::pair<const_iterator, const_iterator>(first, last);
return std::pair<const_iterator, const_iterator>(f, l);
}
//*************************************************************************
@ -1078,10 +1078,10 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iunordered_set(pool_t& node_pool, bucket_t* pbuckets_, size_t number_of_buckets)
: pnodepool(&node_pool),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets)
iunordered_set(pool_t& node_pool_, bucket_t* pbuckets_, size_t number_of_buckets_)
: pnodepool(&node_pool_),
pbuckets(pbuckets_),
number_of_buckets(number_of_buckets_)
{
}
@ -1222,7 +1222,7 @@ namespace etl
unordered_set(const unordered_set& other)
: base(node_pool, buckets, MAX_BUCKETS)
{
base::assign(other.cbegin(), other.cend());
base::assign(other.cbegin(), other.cend());
}
//*************************************************************************
@ -1232,10 +1232,10 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
unordered_set(TIterator first, TIterator last)
unordered_set(TIterator first_, TIterator last_)
: base(node_pool, buckets, MAX_BUCKETS)
{
base::assign(first, last);
base::assign(first_, last_);
}
//*************************************************************************

View File

@ -83,7 +83,7 @@ SOFTWARE.
TypeName() {} \
TypeName(const TypeName &other) : value(other.value) {} \
TypeName& operator=(const TypeName &other) { value = other.value; return *this; } \
explicit TypeName(ValueType value) : value(value) {} \
explicit TypeName(ValueType value_) : value(value_) {} \
operator ValueType() const { return value; } \
ValueType& get() { return value; } \
const ValueType& get() const { return value; } \
@ -118,7 +118,7 @@ SOFTWARE.
//*****************************************************************************
#define ETL_END_USER_TYPE(TypeName) \
}; \
TypeName(enum_type value) : value(static_cast<value_type>(value)) {} \
TypeName(enum_type value_) : value(static_cast<value_type>(value_)) {} \
};

View File

@ -78,8 +78,8 @@ namespace etl
class variant_exception : public exception
{
public:
variant_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
variant_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
@ -91,8 +91,8 @@ namespace etl
class variant_incorrect_type_exception : public variant_exception
{
public:
variant_incorrect_type_exception(string_type file_name, numeric_type line_number)
: variant_exception(ETL_ERROR_TEXT("variant: unsupported type", ETL_FILE"A"), file_name, line_number)
variant_incorrect_type_exception(string_type file_name_, numeric_type line_number_)
: variant_exception(ETL_ERROR_TEXT("variant: unsupported type", ETL_FILE"A"), file_name_, line_number_)
{
}
};
@ -764,22 +764,22 @@ namespace etl
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8>
bool is_same_type(const variant<U1, U2, U3, U4, U5, U6, U7, U8>& other) const
{
bool is_same_type = false;
bool is_same = false;
switch (other.type_id)
{
case 0: is_same_type = type_id == Type_Id_Lookup<U1>::type_id; break;
case 1: is_same_type = type_id == Type_Id_Lookup<U2>::type_id; break;
case 2: is_same_type = type_id == Type_Id_Lookup<U3>::type_id; break;
case 3: is_same_type = type_id == Type_Id_Lookup<U4>::type_id; break;
case 4: is_same_type = type_id == Type_Id_Lookup<U5>::type_id; break;
case 5: is_same_type = type_id == Type_Id_Lookup<U6>::type_id; break;
case 6: is_same_type = type_id == Type_Id_Lookup<U7>::type_id; break;
case 7: is_same_type = type_id == Type_Id_Lookup<U8>::type_id; break;
case 0: is_same = (type_id == Type_Id_Lookup<U1>::type_id); break;
case 1: is_same = (type_id == Type_Id_Lookup<U2>::type_id); break;
case 2: is_same = (type_id == Type_Id_Lookup<U3>::type_id); break;
case 3: is_same = (type_id == Type_Id_Lookup<U4>::type_id); break;
case 4: is_same = (type_id == Type_Id_Lookup<U5>::type_id); break;
case 5: is_same = (type_id == Type_Id_Lookup<U6>::type_id); break;
case 6: is_same = (type_id == Type_Id_Lookup<U7>::type_id); break;
case 7: is_same = (type_id == Type_Id_Lookup<U8>::type_id); break;
default: break;
}
return is_same_type;
return is_same;
}
//***************************************************************************

View File

@ -33,10 +33,6 @@ SOFTWARE.
#define __ETL_IN_VECTOR_H__
#if ETL_CPP11_SUPPORTED
#include <type_traits>
#endif
#include <stddef.h>
#include <stdint.h>
#include <iterator>
@ -366,8 +362,8 @@ namespace etl
STATIC_ASSERT((etl::is_same<typename etl::remove_cv<T>::type, typename etl::remove_cv<typename std::iterator_traits<TIterator>::value_type>::type>::value), "Iterator type does not match container type");
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(static_cast<size_t>(count) <= CAPACITY, ETL_ERROR(vector_full));
difference_type d = std::distance(first, last);
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
#endif
initialise();
@ -1134,7 +1130,7 @@ namespace etl
//*************************************************************************
void repair()
{
#if ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
ETL_ASSERT(std::is_trivially_copyable<T>::value, ETL_ERROR(etl::vector_incompatible_type));
#endif

View File

@ -84,16 +84,16 @@ namespace etl
///\param position The position of the first character.
///\param length The number of characters. Default = npos.
//*************************************************************************
wstring(const etl::wstring<MAX_SIZE_>& other, size_t position, size_t length = npos)
wstring(const etl::wstring<MAX_SIZE_>& other, size_t position, size_t length_ = npos)
: iwstring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
{
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
// Set the length to the exact amount.
length = (length > MAX_SIZE_) ? MAX_SIZE_ : length;
length_ = (length_ > MAX_SIZE_) ? MAX_SIZE_ : length_;
iwstring::initialise();
iwstring::assign(other.begin() + position, other.begin() + position + length);
iwstring::assign(other.begin() + position, other.begin() + position + length_);
}
//*************************************************************************
@ -149,7 +149,7 @@ namespace etl
///\param position The position of the first character. Default = 0.
///\param length The number of characters. Default = npos.
//*************************************************************************
etl::wstring<MAX_SIZE_> substr(size_t position = 0, size_t length = npos) const
etl::wstring<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
{
etl::wstring<MAX_SIZE_> new_string;
@ -157,9 +157,9 @@ namespace etl
{
ETL_ASSERT(position < size(), ETL_ERROR(string_out_of_bounds));
length = std::min(length, size() - position);
length_ = std::min(length_, size() - position);
new_string.assign(buffer + position, buffer + position + length);
new_string.assign(buffer + position, buffer + position + length_);
}
return new_string;

View File

@ -42,6 +42,10 @@
</Target>
</Build>
<Compiler>
<Add option="-Wunused-parameter" />
<Add option="-Wstrict-aliasing" />
<Add option="-Wshadow" />
<Add option="-Wundef" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-g" />
@ -159,6 +163,17 @@
<Unit filename="../../src/private/pvoidvector.cpp" />
<Unit filename="../../src/private/pvoidvector.h" />
<Unit filename="../../src/private/vector_base.h" />
<Unit filename="../../src/profiles/arduino_arm.h" />
<Unit filename="../../src/profiles/armv5.h" />
<Unit filename="../../src/profiles/armv6.h" />
<Unit filename="../../src/profiles/cpp03.h" />
<Unit filename="../../src/profiles/cpp11.h" />
<Unit filename="../../src/profiles/cpp14.h" />
<Unit filename="../../src/profiles/gcc_generic.h" />
<Unit filename="../../src/profiles/gcc_linux_x86.h" />
<Unit filename="../../src/profiles/gcc_windows_x86.h" />
<Unit filename="../../src/profiles/msvc_x86.h" />
<Unit filename="../../src/profiles/ticc.h" />
<Unit filename="../../src/queue.h" />
<Unit filename="../../src/radix.h" />
<Unit filename="../../src/random.cpp" />

View File

@ -1,169 +1,530 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Linux" />
<File name="../../src/platform.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<FileVersion major="1" minor="0" />
<ActiveTarget name="Windows" />
<File name="..\..\src\u32string.h" open="1" top="0" tabpos="54" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1621" topLine="0" />
<Cursor1 position="6674" topLine="103" />
</Cursor>
</File>
<File name="../test_pearson.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_fsm.cpp" open="1" top="0" tabpos="40" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1707" topLine="29" />
<Cursor1 position="7419" topLine="228" />
</Cursor>
</File>
<File name="../test_checksum.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\error_handler.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="218" topLine="0" />
<Cursor1 position="2935" topLine="56" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/CheckMacros.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\private\ivectorpointer.h" open="1" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="19863" topLine="122" />
<Cursor1 position="18646" topLine="415" />
</Cursor>
</File>
<File name="../test_endian.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_intrusive_stack.cpp" open="1" top="0" tabpos="58" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1392" topLine="0" />
<Cursor1 position="1641" topLine="0" />
</Cursor>
</File>
<File name="../main.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="141" topLine="0" />
</Cursor>
</File>
<File name="../../src/intrusive_flat_map.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\intrusive_flat_map.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4065" topLine="242" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/Checks.cpp" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\type_traits.h" open="1" top="0" tabpos="72" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
<Cursor1 position="0" topLine="12" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/Posix/SignalTranslator.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\array.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1062" topLine="0" />
<Cursor1 position="1970" topLine="47" />
</Cursor>
</File>
<File name="../../src/factory.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\private\vector_base.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6413" topLine="131" />
<Cursor1 position="5342" topLine="94" />
</Cursor>
</File>
<File name="../../src/message_timer.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\user_type.h" open="1" top="0" tabpos="70" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14673" topLine="484" />
<Cursor1 position="5459" topLine="68" />
</Cursor>
</File>
<File name="../../src/callback_timer.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\message_bus.h" open="1" top="0" tabpos="86" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16444" topLine="558" />
<Cursor1 position="9567" topLine="248" />
</Cursor>
</File>
<File name="../../src/error_handler.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\flat_set.h" open="1" top="0" tabpos="34" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4288" topLine="74" />
<Cursor1 position="18892" topLine="471" />
</Cursor>
</File>
<File name="../../src/static_assert.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\bitset.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1460" topLine="0" />
<Cursor1 position="19345" topLine="665" />
</Cursor>
</File>
<File name="../../src/deque.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_intrusive_queue.cpp" open="1" top="0" tabpos="63" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="67574" topLine="2022" />
<Cursor1 position="1641" topLine="0" />
</Cursor>
</File>
<File name="../test_factory.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\profiles\cpp03.h" open="1" top="0" tabpos="78" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3108" topLine="101" />
<Cursor1 position="1891" topLine="0" />
</Cursor>
</File>
<File name="../../src/flat_multimap.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\intrusive_list.h" open="1" top="0" tabpos="41" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="87" />
<Cursor1 position="33670" topLine="1023" />
</Cursor>
</File>
<File name="../../src/memory.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\reference_flat_map.h" open="1" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6877" topLine="207" />
</Cursor>
</File>
<File name="..\..\src\profiles\cpp11.h" open="1" top="0" tabpos="79" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1888" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\memory.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2221" topLine="0" />
</Cursor>
</File>
<File name="../../src/type_traits.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_endian.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12237" topLine="260" />
<Cursor1 position="1392" topLine="0" />
</Cursor>
</File>
<File name="../etl_profile.h" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\profiles\gcc_generic.h" open="1" top="0" tabpos="81" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1471" topLine="0" />
<Cursor1 position="1738" topLine="0" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/Win32/TimeHelpers.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\frame_check_sequence.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="775" topLine="0" />
<Cursor1 position="4943" topLine="79" />
</Cursor>
</File>
<File name="../test_flat_multimap.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3425" topLine="85" />
</Cursor>
</File>
<File name="../test_message_timer.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5425" topLine="125" />
</Cursor>
</File>
<File name="../../src/pearson.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1510" topLine="0" />
</Cursor>
</File>
<File name="../../src/flat_map.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2722" topLine="43" />
</Cursor>
</File>
<File name="../test_callback_timer.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_callback_timer.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5922" topLine="109" />
</Cursor>
</File>
<File name="../../src/message_bus.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\reference_flat_multimap.h" open="1" top="0" tabpos="29" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11907" topLine="330" />
<Cursor1 position="5897" topLine="182" />
</Cursor>
</File>
<File name="../../src/vector.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\message_router.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="41462" topLine="1108" />
<Cursor1 position="5518" topLine="138" />
</Cursor>
</File>
<File name="../../src/queue.h" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\forward_list.h" open="1" top="0" tabpos="37" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11193" topLine="229" />
<Cursor1 position="10238" topLine="270" />
</Cursor>
</File>
<File name="../test_type_traits.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\cstring.h" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="37662" topLine="472" />
<Cursor1 position="4190" topLine="72" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/HelperMacros.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\profiles\ticc.h" open="1" top="0" tabpos="84" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1902" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\profiles\armv6.h" open="1" top="0" tabpos="77" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1890" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\fsm.h" open="1" top="0" tabpos="85" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10751" topLine="298" />
</Cursor>
</File>
<File name="..\..\src\wstring.h" open="1" top="0" tabpos="55" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5149" topLine="104" />
</Cursor>
</File>
<File name="..\..\src\list.h" open="1" top="0" tabpos="43" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11472" topLine="312" />
</Cursor>
</File>
<File name="..\..\src\variant.h" open="1" top="0" tabpos="69" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="33022" topLine="747" />
</Cursor>
</File>
<File name="..\test_checksum.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="218" topLine="0" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\HelperMacros.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="35" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/MemoryOutStream.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\reference_flat_set.h" open="1" top="0" tabpos="35" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6404" topLine="199" />
</Cursor>
</File>
<File name="..\test_intrusive_links.cpp" open="1" top="0" tabpos="39" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="39889" topLine="1110" />
</Cursor>
</File>
<File name="..\..\src\function.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13069" topLine="364" />
</Cursor>
</File>
<File name="..\..\src\murmur3.h" open="1" top="0" tabpos="47" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2487" topLine="52" />
</Cursor>
</File>
<File name="..\..\src\enum_type.h" open="1" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3810" topLine="60" />
</Cursor>
</File>
<File name="..\test_string_u32.cpp" open="1" top="0" tabpos="56" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21412" topLine="691" />
</Cursor>
</File>
<File name="..\test_flat_multimap.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3425" topLine="85" />
</Cursor>
</File>
<File name="..\..\src\profiles\gcc_windows_x86.h" open="1" top="0" tabpos="74" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1761" topLine="0" />
</Cursor>
</File>
<File name="..\test_variant.cpp" open="1" top="0" tabpos="71" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7555" topLine="221" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\CheckMacros.h" open="1" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="19645" topLine="116" />
</Cursor>
</File>
<File name="..\..\src\type_def.h" open="1" top="0" tabpos="61" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2398" topLine="38" />
</Cursor>
</File>
<File name="..\test_array.cpp" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9271" topLine="318" />
</Cursor>
</File>
<File name="..\..\src\pool.h" open="1" top="0" tabpos="31" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="15707" topLine="382" />
</Cursor>
</File>
<File name="..\test_task_scheduler.cpp" open="1" top="0" tabpos="65" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2139" topLine="52" />
</Cursor>
</File>
<File name="..\..\src\static_assert.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1460" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\flat_map.h" open="1" top="0" tabpos="28" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10984" topLine="246" />
</Cursor>
</File>
<File name="..\..\src\optional.h" open="1" top="0" tabpos="60" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4686" topLine="111" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\Checks.cpp" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="..\etl_profile.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="853" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\multiset.h" open="1" top="0" tabpos="45" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7599" topLine="193" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\MemoryOutStream.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="178" topLine="0" />
</Cursor>
</File>
<File name="../../unittest-cpp/UnitTest++/Checks.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_string_u16.cpp" open="1" top="0" tabpos="52" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21098" topLine="685" />
</Cursor>
</File>
<File name="..\..\src\u16string.h" open="1" top="0" tabpos="51" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3035" topLine="57" />
</Cursor>
</File>
<File name="..\test_intrusive_forward_list.cpp" open="1" top="0" tabpos="36" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="37971" topLine="942" />
</Cursor>
</File>
<File name="..\..\src\message_timer.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14673" topLine="484" />
</Cursor>
</File>
<File name="..\..\src\unordered_multiset.h" open="1" top="0" tabpos="67" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="25789" topLine="730" />
</Cursor>
</File>
<File name="..\..\src\basic_string.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="66388" topLine="1848" />
</Cursor>
</File>
<File name="..\main.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="141" topLine="0" />
</Cursor>
</File>
<File name="..\test_message_timer.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3030" topLine="92" />
</Cursor>
</File>
<File name="..\..\src\unordered_set.h" open="1" top="0" tabpos="68" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24920" topLine="711" />
</Cursor>
</File>
<File name="..\..\src\profiles\arduino_arm.h" open="1" top="0" tabpos="75" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1881" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\map.h" open="1" top="0" tabpos="59" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7462" topLine="200" />
</Cursor>
</File>
<File name="..\..\src\reference_flat_multiset.h" open="1" top="0" tabpos="32" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6534" topLine="199" />
</Cursor>
</File>
<File name="..\..\src\flat_multiset.h" open="1" top="0" tabpos="33" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11498" topLine="256" />
</Cursor>
</File>
<File name="..\test_message_router.cpp" open="1" top="1" tabpos="88" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4948" topLine="140" />
</Cursor>
</File>
<File name="..\..\src\stack.h" open="1" top="0" tabpos="50" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5893" topLine="132" />
</Cursor>
</File>
<File name="..\..\src\callback_timer.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16444" topLine="558" />
</Cursor>
</File>
<File name="..\..\src\multimap.h" open="1" top="0" tabpos="46" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7557" topLine="193" />
</Cursor>
</File>
<File name="..\..\src\unordered_map.h" open="1" top="0" tabpos="62" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="19759" topLine="537" />
</Cursor>
</File>
<File name="..\..\src\profiles\cpp14.h" open="1" top="0" tabpos="80" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1888" topLine="0" />
</Cursor>
</File>
<File name="..\test_error_handler.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2281" topLine="4" />
</Cursor>
</File>
<File name="..\..\src\profiles\gcc_linux_x86.h" open="1" top="0" tabpos="82" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1735" topLine="0" />
</Cursor>
</File>
<File name="..\test_pearson.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1707" topLine="29" />
</Cursor>
</File>
<File name="..\test_algorithm.cpp" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2243" topLine="43" />
</Cursor>
</File>
<File name="..\..\src\set.h" open="1" top="0" tabpos="64" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18154" topLine="461" />
</Cursor>
</File>
<File name="..\test_exception.cpp" open="1" top="0" tabpos="38" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2177" topLine="8" />
</Cursor>
</File>
<File name="..\..\src\io_port.h" open="1" top="0" tabpos="42" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4011" topLine="132" />
</Cursor>
</File>
<File name="..\..\src\deque.h" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="67409" topLine="2026" />
</Cursor>
</File>
<File name="..\test_string_char.cpp" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21608" topLine="677" />
</Cursor>
</File>
<File name="..\test_type_traits.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="37662" topLine="472" />
</Cursor>
</File>
<File name="..\..\src\queue.h" open="1" top="0" tabpos="48" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5750" topLine="131" />
</Cursor>
</File>
<File name="..\test_packet.cpp" open="1" top="0" tabpos="53" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1942" topLine="39" />
</Cursor>
</File>
<File name="..\..\src\unordered_multimap.h" open="1" top="0" tabpos="66" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="33847" topLine="959" />
</Cursor>
</File>
<File name="..\data.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2648" topLine="75" />
</Cursor>
</File>
<File name="..\test_string_wchar_t.cpp" open="1" top="0" tabpos="57" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21101" topLine="685" />
</Cursor>
</File>
<File name="..\..\src\vector.h" open="1" top="0" tabpos="83" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="832" topLine="7" />
</Cursor>
</File>
<File name="..\..\src\profiles\armv5.h" open="1" top="0" tabpos="76" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1889" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\exception.h" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3744" topLine="51" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\Posix\SignalTranslator.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1062" topLine="0" />
</Cursor>
</File>
<File name="..\test_message_bus.cpp" open="1" top="0" tabpos="87" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5264" topLine="143" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\Checks.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="119" topLine="0" />
</Cursor>
</File>
<File name="..\test_factory.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3108" topLine="101" />
</Cursor>
</File>
<File name="..\..\src\platform.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1621" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\factory.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6413" topLine="131" />
</Cursor>
</File>
<File name="..\..\src\profiles\msvc_x86.h" open="1" top="0" tabpos="73" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1761" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\fixed_iterator.h" open="1" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2474" topLine="34" />
</Cursor>
</File>
<File name="..\test_list.cpp" open="1" top="0" tabpos="44" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2306" topLine="41" />
</Cursor>
</File>
<File name="..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="775" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\flat_multimap.h" open="1" top="0" tabpos="30" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24090" topLine="583" />
</Cursor>
</File>
<File name="..\..\src\pearson.h" open="1" top="0" tabpos="49" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4500" topLine="94" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -45,9 +45,9 @@ public:
{
}
explicit TestDataDC(const T& value, int index = 0)
: value(value),
index(index)
explicit TestDataDC(const T& value_, int index_ = 0)
: value(value_),
index(index_)
{
}
@ -92,9 +92,9 @@ class TestDataNDC
{
public:
explicit TestDataNDC(const T& value, int index = 0)
: value(value),
index(index)
explicit TestDataNDC(const T& value_, int index_ = 0)
: value(value_),
index(index_)
{}
bool operator < (const TestDataNDC& other) const
@ -130,4 +130,4 @@ std::ostream& operator << (std::ostream& s, const TestDataNDC<T>& rhs)
return s;
}
#endif
#endif

View File

@ -69,9 +69,9 @@ namespace
}
};
std::ostream& operator << (std::ostream& os, const StructData& data)
std::ostream& operator << (std::ostream& os, const StructData& data_)
{
os << data.a << "," << data.b;
os << data_.a << "," << data_.b;
return os;
}

View File

@ -211,7 +211,7 @@ namespace
CHECK_EQUAL(data.cend(), &data[SIZE]);
}
//*************************************************************************
TEST(test_rbegin)
{
@ -243,7 +243,7 @@ namespace
CHECK(data.crend() == Data::const_reverse_iterator(&data[0]));
}
//*************************************************************************
TEST(test_iterator)
{
@ -315,14 +315,14 @@ namespace
Data data;
data.fill(1);
Compare_Data compare_data;
compare_data.fill(1);
Compare_Data compare;
compare.fill(1);
bool isEqual = std::equal(data.begin(), data.end(), compare_data.begin());
bool isEqual = std::equal(data.begin(), data.end(), compare.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST(test_swap)
{
@ -352,7 +352,7 @@ namespace
TEST(test_assign)
{
int initial[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
int source[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
int source[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
int check1[] = { 0, 1, 2, 3, 4, -1, -1, -1, -1, -1 };
int check2[] = { 0, 1, 2, 3, 4, 99, 99, 99, 99, 99 };
int check3[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

View File

@ -45,8 +45,8 @@ class test_exception : public etl::exception
{
public:
test_exception(string_type file_name, numeric_type line_number)
: exception(ETL_ERROR_TEXT("test_exception", "123"), file_name, line_number)
test_exception(string_type file_name_, numeric_type line_number_)
: exception(ETL_ERROR_TEXT("test_exception", "123"), file_name_, line_number_)
{
error_received = false;
}

View File

@ -544,6 +544,8 @@ namespace
bool isEqual = Check_Equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************

View File

@ -82,7 +82,7 @@ namespace
{
public:
SetSpeed(int speed) : speed(speed) {}
SetSpeed(int speed_) : speed(speed_) {}
const int speed;
};
@ -170,7 +170,7 @@ namespace
bool isLampOn;
int speed;
};
//***********************************
// The idle state.
//***********************************
@ -179,14 +179,14 @@ namespace
public:
//***********************************
etl::fsm_state_id_t on_event(etl::imessage_router& sender, const Start& event)
etl::fsm_state_id_t on_event(etl::imessage_router&, const Start&)
{
++get_fsm_context().startCount;
return StateId::RUNNING;
}
//***********************************
etl::fsm_state_id_t on_event_unknown(etl::imessage_router& sender, const etl::imessage& event)
etl::fsm_state_id_t on_event_unknown(etl::imessage_router&, const etl::imessage&)
{
++get_fsm_context().unknownCount;
return STATE_ID;
@ -208,7 +208,7 @@ namespace
public:
//***********************************
etl::fsm_state_id_t on_event(etl::imessage_router& sender, const Stop& event)
etl::fsm_state_id_t on_event(etl::imessage_router&, const Stop& event)
{
++get_fsm_context().stopCount;
@ -223,7 +223,7 @@ namespace
}
//***********************************
etl::fsm_state_id_t on_event(etl::imessage_router& sender, const SetSpeed& event)
etl::fsm_state_id_t on_event(etl::imessage_router&, const SetSpeed& event)
{
++get_fsm_context().setSpeedCount;
get_fsm_context().SetSpeed(event.speed);
@ -231,7 +231,7 @@ namespace
}
//***********************************
etl::fsm_state_id_t on_event_unknown(etl::imessage_router& sender, const etl::imessage& event)
etl::fsm_state_id_t on_event_unknown(etl::imessage_router&, const etl::imessage&)
{
++get_fsm_context().unknownCount;
return STATE_ID;
@ -254,14 +254,14 @@ namespace
public:
//***********************************
etl::fsm_state_id_t on_event(etl::imessage_router& source, const Stopped& event)
etl::fsm_state_id_t on_event(etl::imessage_router&, const Stopped&)
{
++get_fsm_context().stoppedCount;
return StateId::IDLE;
}
//***********************************
etl::fsm_state_id_t on_event_unknown(etl::imessage_router& source, const etl::imessage& event)
etl::fsm_state_id_t on_event_unknown(etl::imessage_router&, const etl::imessage&)
{
++get_fsm_context().unknownCount;
return STATE_ID;
@ -276,7 +276,7 @@ namespace
public:
//***********************************
etl::fsm_state_id_t on_event_unknown(etl::imessage_router& source, const etl::imessage& event)
etl::fsm_state_id_t on_event_unknown(etl::imessage_router&, const etl::imessage&)
{
++get_fsm_context().unknownCount;
return STATE_ID;

View File

@ -784,8 +784,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_splice_list)
{
bool are_equal;
DataNDC0 data0(sorted_data.begin(), sorted_data.end());
DataNDC0 data1(sorted_data2.begin(), sorted_data2.end());
@ -811,8 +809,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_splice_list_self)
{
bool are_equal;
DataNDC0 data0(sorted_data.begin(), sorted_data.end());
DataNDC0::iterator idata_destination = data0.begin();
@ -831,8 +827,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_splice_range)
{
bool are_equal;
DataNDC0 data0(sorted_data.begin(), sorted_data.end());
DataNDC0 data1(sorted_data2.begin(), sorted_data2.end());
@ -870,8 +864,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_splice_range_self)
{
bool are_equal;
DataNDC0 data0(sorted_data.begin(), sorted_data.end());
DataNDC0::iterator idata_destination = data0.begin();
@ -906,8 +898,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_1)
{
bool are_equal;
DataNDC0 data0(merge_data0.begin(), merge_data0.end());
DataNDC0 data1(merge_data1.begin(), merge_data1.end());
@ -927,8 +917,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_2)
{
bool are_equal;
DataNDC0 data0(merge_data0.begin(), merge_data0.end());
DataNDC0 data2(merge_data2.begin(), merge_data2.end());
@ -948,8 +936,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_3)
{
bool are_equal;
DataNDC0 data0(merge_data0.begin(), merge_data0.end());
DataNDC0 data3(merge_data3.begin(), merge_data3.end());
@ -969,8 +955,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_4)
{
bool are_equal;
DataNDC0 data0(merge_data0.begin(), merge_data0.end());
DataNDC0 data4(merge_data4.begin(), merge_data4.end());
@ -990,8 +974,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_1_reverse_order)
{
bool are_equal;
DataNDC0 data0(merge_data0.begin(), merge_data0.end());
DataNDC0 data1(merge_data1.begin(), merge_data1.end());

View File

@ -43,8 +43,8 @@ namespace
struct FData : public FLink0, public FLink1
{
FData(int value)
: value(value)
FData(int value_)
: value(value_)
{
}
@ -59,8 +59,8 @@ namespace
struct BData : public BLink0, public BLink1
{
BData(int value)
: value(value)
BData(int value_)
: value(value_)
{
}
@ -76,8 +76,8 @@ namespace
struct TData : public TLink0, public TLink1
{
TData(int value)
: value(value)
TData(int value_)
: value(value_)
{
}
@ -89,8 +89,8 @@ namespace
//*******************************************************
struct MData : public FLink0, public BLink1, public TLink2
{
MData(int value)
: value(value)
MData(int value_)
: value(value_)
{
}

View File

@ -40,8 +40,8 @@ namespace
struct Data : public link0, public link1
{
Data(int i)
: i(i)
Data(int i_)
: i(i_)
{
}
@ -245,7 +245,7 @@ namespace
queue1.pop_into(queue2);
CHECK_EQUAL(0U, queue1.size());
CHECK_EQUAL(3U, queue2.size());
CHECK_EQUAL(data1, queue2.front());
CHECK_EQUAL(data3, queue2.back());

View File

@ -40,8 +40,8 @@ namespace
struct Data : public link0, public link1
{
Data(int i)
: i(i)
Data(int i_)
: i(i_)
{
}

View File

@ -1510,8 +1510,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_1)
{
bool are_equal;
DataNDC2 data0(merge_data0.begin(), merge_data0.end());
DataNDC2 data1(merge_data1.begin(), merge_data1.end());
@ -1531,8 +1529,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_2)
{
bool are_equal;
DataNDC2 data0(merge_data0.begin(), merge_data0.end());
DataNDC2 data2(merge_data2.begin(), merge_data2.end());
@ -1552,8 +1548,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_3)
{
bool are_equal;
DataNDC2 data0(merge_data0.begin(), merge_data0.end());
DataNDC2 data3(merge_data3.begin(), merge_data3.end());
@ -1573,8 +1567,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_4)
{
bool are_equal;
DataNDC2 data0(merge_data0.begin(), merge_data0.end());
DataNDC2 data4(merge_data4.begin(), merge_data4.end());
@ -1594,8 +1586,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_merge_0_1_reverse_order)
{
bool are_equal;
DataNDC2 data0(merge_data0.begin(), merge_data0.end());
DataNDC2 data1(merge_data1.begin(), merge_data1.end());

View File

@ -106,7 +106,7 @@ namespace
}
void on_receive(etl::imessage_router& sender, const Message1& msg)
void on_receive(etl::imessage_router& sender, const Message1&)
{
++message1_count;
etl::send_message(sender, message5);
@ -114,30 +114,30 @@ namespace
order = call_order++;
}
void on_receive(etl::imessage_router& sender, const Message2& msg)
void on_receive(etl::imessage_router& sender, const Message2&)
{
++message2_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message3& msg)
void on_receive(etl::imessage_router& sender, const Message3&)
{
++message3_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message4& msg)
void on_receive(etl::imessage_router& sender, const Message4&)
{
++message4_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message5& msg)
void on_receive(etl::imessage_router&, const Message5&)
{
++message5_count;
}
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage& msg)
void on_receive_unknown(etl::imessage_router&, const etl::imessage&)
{
++message_unknown_count;
}
@ -169,30 +169,30 @@ namespace
}
void on_receive(etl::imessage_router& sender, const Message1& msg)
void on_receive(etl::imessage_router& sender, const Message1&)
{
++message1_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message2& msg)
void on_receive(etl::imessage_router& sender, const Message2&)
{
++message2_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message4& msg)
void on_receive(etl::imessage_router& sender, const Message4&)
{
++message4_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message5& msg)
void on_receive(etl::imessage_router&, const Message5&)
{
++message5_count;
}
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage& msg)
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage&)
{
++message_unknown_count;
etl::send_message(sender, message5);

View File

@ -100,36 +100,36 @@ namespace
}
void on_receive(etl::imessage_router& sender, const Message1& msg)
void on_receive(etl::imessage_router& sender, const Message1&)
{
++message1_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message2& msg)
void on_receive(etl::imessage_router& sender, const Message2&)
{
++message2_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message3& msg)
void on_receive(etl::imessage_router& sender, const Message3&)
{
++message3_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message4& msg)
void on_receive(etl::imessage_router& sender, const Message4&)
{
++message4_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message5& msg)
void on_receive(etl::imessage_router&, const Message5&)
{
++callback_count;
}
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage& msg)
void on_receive_unknown(etl::imessage_router&, const etl::imessage&)
{
++message_unknown_count;
}
@ -160,30 +160,30 @@ namespace
}
void on_receive(etl::imessage_router& sender, const Message1& msg)
void on_receive(etl::imessage_router& sender, const Message1&)
{
++message1_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message2& msg)
void on_receive(etl::imessage_router& sender, const Message2&)
{
++message2_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message4& msg)
void on_receive(etl::imessage_router& sender, const Message4&)
{
++message4_count;
etl::send_message(sender, message5);
}
void on_receive(etl::imessage_router& sender, const Message5& msg)
void on_receive(etl::imessage_router&, const Message5&)
{
++callback_count;
}
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage& msg)
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage&)
{
++message_unknown_count;
etl::send_message(sender, message5);

View File

@ -92,22 +92,22 @@ namespace
}
void on_receive(etl::imessage_router& sender, const Message1& msg)
void on_receive(etl::imessage_router&, const Message1&)
{
message1.push_back(ticks);
}
void on_receive(etl::imessage_router& sender, const Message2& msg)
void on_receive(etl::imessage_router&, const Message2&)
{
message2.push_back(ticks);
}
void on_receive(etl::imessage_router& sender, const Message3& msg)
void on_receive(etl::imessage_router&, const Message3&)
{
message3.push_back(ticks);
}
void on_receive_unknown(etl::imessage_router& sender, const etl::imessage& msg)
void on_receive_unknown(etl::imessage_router&, const etl::imessage&)
{
}
@ -516,7 +516,7 @@ namespace
etl::message_timer<3> timer_controller;
etl::timer::id::type id1 = timer_controller.register_timer(message1, router1, 5, etl::timer::mode::SINGLE_SHOT);
router1.clear();
timer_controller.start(id1);

View File

@ -64,8 +64,8 @@ namespace
struct derived_1 : public base
{
derived_1(int value)
: base(value)
derived_1(int value_)
: base(value_)
{
}
@ -79,8 +79,8 @@ namespace
struct derived_2 : public base
{
derived_2(int value)
: base(value)
derived_2(int value_)
: base(value_)
{
}
@ -143,14 +143,14 @@ namespace
derived_2 db(2);
derived_1 dc(3);
derived_2 dd(4);
etl::queue<packet1_t, 4> queue;
queue.emplace(da);
queue.emplace(db);
queue.emplace(dc);
queue.emplace(dd);
CHECK_EQUAL(da.value(), queue.front().get().value());
queue.pop();

View File

@ -41,7 +41,7 @@ SOFTWARE.
#define STR(x) x
namespace
{
{
SUITE(test_string_char)
{
static const size_t SIZE = 11;
@ -142,7 +142,7 @@ namespace
CHECK(!text.empty());
bool is_equal = Equal(compare_text, text);
bool is_equal = Equal(compare_text, text);
CHECK(is_equal);
}
@ -167,7 +167,7 @@ namespace
Text text(initial_text.c_str(), initial_text.size() / 2);
CHECK(!text.empty());
bool is_equal = Equal(compare_text, text);
CHECK(is_equal);
}
@ -448,7 +448,7 @@ namespace
{
Compare_Text compare_text(initial_text.c_str());
Text text(initial_text.c_str());
CHECK(text.back() == compare_text.back());
}
@ -559,7 +559,7 @@ namespace
CHECK(is_equal);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_assign_size_value_excess)
{
@ -673,9 +673,9 @@ namespace
text.insert(text.begin() + offset, INITIAL_VALUE);
compare_text.insert(compare_text.begin() + offset, INITIAL_VALUE);
compare_text.erase(compare_text.end() - 1);
CHECK(text.truncated());
bool is_equal = Equal(compare_text, text);
CHECK(is_equal);
@ -709,12 +709,9 @@ namespace
const size_t INITIAL_SIZE = 5;
const size_t INSERT_SIZE = 3;
const value_t INITIAL_VALUE = STR('A');
for (size_t offset = 0; offset <= INITIAL_SIZE; ++offset)
{
Compare_Text compare_text;
Text text;
text.assign(initial_text.begin(), initial_text.begin() + INITIAL_SIZE);
compare_text.assign(initial_text.begin(), initial_text.begin() + INITIAL_SIZE);
text.insert(text.begin() + offset, INSERT_SIZE, INITIAL_VALUE);
@ -874,7 +871,7 @@ namespace
text.insert(offset, insert);
compare_text.insert(offset, insert_text);
compare_text.resize(std::min(compare_text.size(), SIZE));
bool is_equal = Equal(compare_text, text);
CHECK(is_equal);
}
@ -1672,7 +1669,7 @@ namespace
is_equal = Equal(compare_text, text);
CHECK(is_equal);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_replace_first_last_n_c)
{
@ -1798,7 +1795,7 @@ namespace
bool is_equal = Equal(compare_text, text);
CHECK(is_equal);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_clear)
{
@ -1903,7 +1900,7 @@ namespace
CHECK((initial < initial) == (initial_text < initial_text));
CHECK((initial < initial) == (initial_text < initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less < pinitial_text) == (less_text < pinitial_text));
CHECK((pinitial_text < less) == (pinitial_text < less_text));
@ -1938,7 +1935,7 @@ namespace
CHECK((initial <= initial) == (initial_text <= initial_text));
CHECK((initial <= initial) == (initial_text <= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less <= pinitial_text) == (less_text <= pinitial_text));
CHECK((pinitial_text <= less) == (pinitial_text <= less_text));
@ -1973,7 +1970,7 @@ namespace
CHECK((initial > initial) == (initial_text > initial_text));
CHECK((initial > initial) == (initial_text > initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less > pinitial_text) == (less_text > pinitial_text));
CHECK((pinitial_text > less) == (pinitial_text > less_text));
@ -2008,7 +2005,7 @@ namespace
CHECK((initial >= initial) == (initial_text >= initial_text));
CHECK((initial >= initial) == (initial_text >= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less >= pinitial_text) == (less_text >= pinitial_text));
CHECK((pinitial_text >= less) == (pinitial_text >= less_text));
@ -2049,7 +2046,7 @@ namespace
TEST_FIXTURE(SetupFixture, test_find_string)
{
const value_t* the_haystack = STR("A haystack with a needle and another needle");
std::string compare_needle(STR("needle"));
etl::string<50> needle(STR("needle"));
@ -2062,7 +2059,7 @@ namespace
position1 = compare_haystack.find(compare_needle, position1);
position2 = haystack.find(needle, position2);
CHECK_EQUAL(position1, position2);
position1 = compare_haystack.find(compare_needle, position1 + 1);
position2 = haystack.find(needle, position2 + 1);
CHECK_EQUAL(position1, position2);

View File

@ -702,9 +702,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_position_n_value)
{
Compare_Text compare_text;
Text text;
const size_t INITIAL_SIZE = 5;
const size_t INSERT_SIZE = 3;
const value_t INITIAL_VALUE = STR('A');
@ -1902,7 +1899,7 @@ namespace
CHECK((initial < initial) == (initial_text < initial_text));
CHECK((initial < initial) == (initial_text < initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less < pinitial_text) == (less_text < pinitial_text));
CHECK((pinitial_text < less) == (pinitial_text < less_text));
@ -1937,7 +1934,7 @@ namespace
CHECK((initial <= initial) == (initial_text <= initial_text));
CHECK((initial <= initial) == (initial_text <= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less <= pinitial_text) == (less_text <= pinitial_text));
CHECK((pinitial_text <= less) == (pinitial_text <= less_text));
@ -1972,7 +1969,7 @@ namespace
CHECK((initial > initial) == (initial_text > initial_text));
CHECK((initial > initial) == (initial_text > initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less > pinitial_text) == (less_text > pinitial_text));
CHECK((pinitial_text > less) == (pinitial_text > less_text));
@ -2007,7 +2004,7 @@ namespace
CHECK((initial >= initial) == (initial_text >= initial_text));
CHECK((initial >= initial) == (initial_text >= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less >= pinitial_text) == (less_text >= pinitial_text));
CHECK((pinitial_text >= less) == (pinitial_text >= less_text));

View File

@ -702,9 +702,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_position_n_value)
{
Compare_Text compare_text;
Text text;
const size_t INITIAL_SIZE = 5;
const size_t INSERT_SIZE = 3;
const value_t INITIAL_VALUE = STR('A');
@ -1902,7 +1899,7 @@ namespace
CHECK((initial < initial) == (initial_text < initial_text));
CHECK((initial < initial) == (initial_text < initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less < pinitial_text) == (less_text < pinitial_text));
CHECK((pinitial_text < less) == (pinitial_text < less_text));
@ -1937,7 +1934,7 @@ namespace
CHECK((initial <= initial) == (initial_text <= initial_text));
CHECK((initial <= initial) == (initial_text <= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less <= pinitial_text) == (less_text <= pinitial_text));
CHECK((pinitial_text <= less) == (pinitial_text <= less_text));
@ -1972,7 +1969,7 @@ namespace
CHECK((initial > initial) == (initial_text > initial_text));
CHECK((initial > initial) == (initial_text > initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less > pinitial_text) == (less_text > pinitial_text));
CHECK((pinitial_text > less) == (pinitial_text > less_text));
@ -2007,7 +2004,7 @@ namespace
CHECK((initial >= initial) == (initial_text >= initial_text));
CHECK((initial >= initial) == (initial_text >= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less >= pinitial_text) == (less_text >= pinitial_text));
CHECK((pinitial_text >= less) == (pinitial_text >= less_text));
@ -3032,7 +3029,7 @@ namespace
hash = etl::hash<IText>()(itext);
CHECK_EQUAL(compare_hash, hash);
}
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
{
Text text;

View File

@ -40,7 +40,7 @@ SOFTWARE.
#define STR(x) L##x
namespace
{
{
SUITE(test_string_wchar_t)
{
static const size_t SIZE = 11;
@ -702,9 +702,6 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_position_n_value)
{
Compare_Text compare_text;
Text text;
const size_t INITIAL_SIZE = 5;
const size_t INSERT_SIZE = 3;
const value_t INITIAL_VALUE = STR('A');
@ -1902,7 +1899,7 @@ namespace
CHECK((initial < initial) == (initial_text < initial_text));
CHECK((initial < initial) == (initial_text < initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less < pinitial_text) == (less_text < pinitial_text));
CHECK((pinitial_text < less) == (pinitial_text < less_text));
@ -1937,7 +1934,7 @@ namespace
CHECK((initial <= initial) == (initial_text <= initial_text));
CHECK((initial <= initial) == (initial_text <= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less <= pinitial_text) == (less_text <= pinitial_text));
CHECK((pinitial_text <= less) == (pinitial_text <= less_text));
@ -1972,7 +1969,7 @@ namespace
CHECK((initial > initial) == (initial_text > initial_text));
CHECK((initial > initial) == (initial_text > initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less > pinitial_text) == (less_text > pinitial_text));
CHECK((pinitial_text > less) == (pinitial_text > less_text));
@ -2007,7 +2004,7 @@ namespace
CHECK((initial >= initial) == (initial_text >= initial_text));
CHECK((initial >= initial) == (initial_text >= initial_text));
// String-Pointer Pointer-String
// String-Pointer Pointer-String
CHECK((less >= pinitial_text) == (less_text >= pinitial_text));
CHECK((pinitial_text >= less) == (pinitial_text >= less_text));

View File

@ -80,10 +80,10 @@ class Task : public etl::task
public:
//*********************************************
Task(etl::task_priority_t priority, WorkList_t& work, Common& common)
: task(priority),
work(work),
common(common),
Task(etl::task_priority_t priority_, WorkList_t& work_, Common& common_)
: task(priority_),
work(work_),
common(common_),
workIndex(0),
addAtIndex(0),
workToAdd(""),