Add SurfaceCache::operator[]
This commit is contained in:
@@ -51,7 +51,6 @@ public:
|
||||
if (!e.valid) {
|
||||
e = surface;
|
||||
e.allocate();
|
||||
Sleep(2000);
|
||||
return e;
|
||||
}
|
||||
}
|
||||
@@ -59,4 +58,8 @@ public:
|
||||
// This should be unreachable but helps to panic anyways
|
||||
Helpers::panic("Couldn't add surface to cache\n");
|
||||
}
|
||||
|
||||
SurfaceType& operator[](size_t i) {
|
||||
return buffer[i];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user