mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-08 22:02:49 -04:00
libobs-d3d11: Clean up device_projection_pop
Simplify STL usage as requested by function comment.
This commit is contained in:
1 parent
8cfe219abf
commit
bbef13166b
1 file changed
+3
-6
@@ -1886,14 +1886,11 @@ void device_projection_push(gs_device_t *device)
|
||||
|
||||
void device_projection_pop(gs_device_t *device)
|
||||
{
|
||||
if (!device->projStack.size())
|
||||
if (device->projStack.empty())
|
||||
return;
|
||||
|
||||
mat4float *mat = device->projStack.data();
|
||||
size_t end = device->projStack.size()-1;
|
||||
|
||||
/* XXX - does anyone know a better way of doing this? */
|
||||
memcpy(&device->curProjMatrix, mat+end, sizeof(matrix4));
|
||||
const mat4float &mat = device->projStack.back();
|
||||
memcpy(&device->curProjMatrix, &mat, sizeof(matrix4));
|
||||
device->projStack.pop_back();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user