History: make backing array readonly

GitOrigin-RevId: 33c1bfb915b4f2fb80c3bb1f4b88ef924a45363d
This commit is contained in:
Colin McMillen 2020-01-14 19:45:22 -05:00
parent cc37561076
commit fb074dc318

View File

@ -17,7 +17,7 @@ namespace SemiColinGames {
class History<T> { class History<T> {
// Backing store for the History's items. // Backing store for the History's items.
private T[] items; private readonly T[] items;
// Points at the most-recently-inserted item. // Points at the most-recently-inserted item.
private int idx = 0; private int idx = 0;