walker::peek() is now const

This commit is contained in:
Zeno Rogue 2021-08-22 23:34:19 +02:00
parent 536c1c21ea
commit 5e87f08f54
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ template<class T> struct walker {
template<class U> walker operator + (U t) const { walker<T> w = *this; w += t; return w; }
template<class U> walker operator - (U t) const { walker<T> w = *this; w += (-t); return w; }
/** \brief what T are we facing, without creating it */
T*& peek() { return at->move(spin); }
T*& peek() const { return at->move(spin); }
/** \brief what T are we facing, with creating it */
T* cpeek() { return at->cmove(spin); }
/** \brief would we create a new T if we stepped forwards? */