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