Corrected const top()

This commit is contained in:
John Wellbelove 2016-11-13 16:47:04 +00:00
parent daaf3fe013
commit 59cc02588c

View File

@ -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.
//*************************************************************************