opengl.tasks: Only check tasks are the same during debug build mode.

This commit is contained in:
Rod Kay
2024-04-24 19:48:30 +10:00
parent 55099f4991
commit 55cac1b347

View File

@@ -1,8 +1,18 @@
with
openGL.Errors;
package body openGL.Tasks package body openGL.Tasks
is is
use openGL.Errors;
procedure check procedure check
is is
begin
if Debugging
then
declare
use Ada, use Ada,
ada.Task_Identification; ada.Task_Identification;
@@ -18,6 +28,8 @@ is
raise Error with "Calling task '" & Task_Identification.Image (current_Task) & "'" raise Error with "Calling task '" & Task_Identification.Image (current_Task) & "'"
& " /= Renderer task '" & Task_Identification.Image (Renderer_Task) & "'"; & " /= Renderer task '" & Task_Identification.Image (Renderer_Task) & "'";
end if; end if;
end;
end if;
end check; end check;
@@ -25,7 +37,11 @@ is
function check return Boolean function check return Boolean
is is
begin begin
if Debugging
then
check; check;
end if;
return True; return True;
end check; end check;