diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-06-02 00:39:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 00:39:09 +0200 |
commit | d6332f96f162849ad0dde2738cacd3fae6e76e5d (patch) | |
tree | 649c101a956cb3640140a95c1f380e5a2f89d51d /src/FIFO.h | |
parent | 993048dd241b59747a7b30edfc861eedd4c005c9 (diff) | |
parent | 6c0ec5ebd8f991b6f8778afd98dc7a22f2b77d4d (diff) |
Merge pull request #638 from Arisotura/melonDSi
merge melonDSi
Diffstat (limited to 'src/FIFO.h')
-rw-r--r-- | src/FIFO.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -89,6 +89,15 @@ public: return Entries[ReadPos]; } + T Peek(u32 offset) + { + u32 pos = ReadPos + offset; + if (pos >= NumEntries) + pos -= NumEntries; + + return Entries[pos]; + } + u32 Level() { return NumOccupied; } bool IsEmpty() { return NumOccupied == 0; } bool IsFull() { return NumOccupied >= NumEntries; } |