--- nono/lib/fixedqueue.h 2026/04/29 17:04:28 1.1.1.2 +++ nono/lib/fixedqueue.h 2026/04/29 17:04:34 1.1.1.4 @@ -1,8 +1,11 @@ // // nono -// Copyright (C) 2018 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // +#pragma once + #include "header.h" #include @@ -83,7 +86,7 @@ class FixedQueue // 要素を覗き見る。 // idx は 0 .. length-1 までで、0 がキューの先頭。 - T Peek(int idx) { + T Peek(int idx) const { // XXX 範囲チェックすべきだがとりあえず return buf[(start + idx) % capacity]; }