Skip to content

Commit

Permalink
Don't use auto for function return types
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Sep 16, 2020
1 parent 83db9f5 commit a506ea4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fizzy/stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ class OperandStack

/// Returns the reference to the top item.
/// Requires non-empty stack.
auto& top() noexcept
Value& top() noexcept
{
assert(size() != 0);
return *m_top;
}

/// Returns the reference to the stack item on given position from the stack top.
/// Requires index < size().
auto& operator[](size_t index) noexcept
Value& operator[](size_t index) noexcept
{
assert(index < size());
return *(m_top - index);
Expand All @@ -150,7 +150,7 @@ class OperandStack

/// Returns an item popped from the top of the stack.
/// Requires non-empty stack.
auto pop() noexcept
Value pop() noexcept
{
assert(size() != 0);
return *m_top--;
Expand Down

0 comments on commit a506ea4

Please sign in to comment.