mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Changed 'Does nothing' comment to 'Undefined behavior'
This commit is contained in:
parent
b468c8b3a4
commit
e75f4bd248
@ -460,14 +460,15 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes an element from the end of the string.
|
||||
/// Does nothing if the string is empty.
|
||||
/// Undefined behaviour if the string is empty.
|
||||
//*************************************************************************
|
||||
void pop_back()
|
||||
{
|
||||
if (current_size > 0)
|
||||
{
|
||||
p_buffer[--current_size] = 0;
|
||||
}
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(!empty(), ETL_ERROR(string_empty));
|
||||
#endif
|
||||
|
||||
p_buffer[--current_size] = 0;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
|
||||
@ -180,17 +180,14 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes the oldest value from the back of the priority queue.
|
||||
/// Does nothing if the priority queue is already empty.
|
||||
/// Undefined behaviour if the priority queue is already empty.
|
||||
//*************************************************************************
|
||||
void pop()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
// Move largest element to end
|
||||
std::pop_heap(container.begin(), container.end(), TCompare());
|
||||
// Actually remove largest element at end
|
||||
container.pop_back();
|
||||
}
|
||||
// Move largest element to end
|
||||
std::pop_heap(container.begin(), container.end(), TCompare());
|
||||
// Actually remove largest element at end
|
||||
container.pop_back();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -162,7 +162,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes the oldest value from the back of the queue.
|
||||
/// Does nothing if the queue is already empty.
|
||||
/// Undefined behaviour if the queue is already empty.
|
||||
//*************************************************************************
|
||||
void pop()
|
||||
{
|
||||
|
||||
@ -135,7 +135,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes the oldest item from the top of the stack.
|
||||
/// Does nothing if the stack is already empty.
|
||||
/// Undefined behaviour if the stack is already empty.
|
||||
//*************************************************************************
|
||||
void pop()
|
||||
{
|
||||
|
||||
@ -475,7 +475,7 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes an element from the end of the vector.
|
||||
/// Does nothing if the vector is empty.
|
||||
/// Undefined behaviour if the vector is empty.
|
||||
//*************************************************************************
|
||||
void pop_back()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user