mirror of
https://github.com/ETLCPP/etl.git
synced 2026-07-01 06:48:44 +08:00
Corrected const top()
This commit is contained in:
parent
daaf3fe013
commit
59cc02588c
@ -117,6 +117,15 @@ namespace etl
|
||||
return *static_cast<TValue*>(p_top);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const reference to the value at the top of the stack.<br>
|
||||
/// \return A const reference to the value at the top of the stack.
|
||||
//*************************************************************************
|
||||
const_reference top() const
|
||||
{
|
||||
return *static_cast<const TValue*>(p_top);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Adds a value to the stack.
|
||||
///\param value The value to push to the stack.
|
||||
@ -148,15 +157,6 @@ namespace etl
|
||||
--current_size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const reference to the value at the top of the stack.<br>
|
||||
/// \return A const reference to the value at the top of the stack.
|
||||
//*************************************************************************
|
||||
const_reference top() const
|
||||
{
|
||||
return *p_top;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Clears the stack to the empty state.
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user