all: Fix unconstrained_Conversion's whose types have different sizes.

This commit is contained in:
Rod Kay
2025-09-21 13:16:24 +10:00
parent b02c1a92f7
commit 9469acaf91
7 changed files with 22 additions and 64 deletions

View File

@@ -3,14 +3,13 @@ with
gel. any_Joint,
gel.World,
ada.Tags,
ada.unchecked_Deallocation,
ada.unchecked_Conversion;
ada.unchecked_Deallocation;
package body gel.Sprite
is
use ada.Tags,
linear_Algebra_3D;
use linear_Algebra_3D;
procedure log (Message : in String)
@@ -1149,43 +1148,4 @@ is
end program_Parameters;
-----------
--- Utility
--
function to_Hash (Self : in ada.Tags.Tag) return ada.Containers.Hash_type
is
function Converted is new ada.unchecked_Conversion (ada.Tags.Tag, ada.Containers.Hash_type);
begin
return Converted (Self);
end to_Hash;
pragma Unreferenced (to_Hash);
-- protected
-- body safe_Matrix_4x4
-- is
-- function Value return Matrix_4x4
-- is
-- begin
-- return the_Value;
-- end Value;
--
-- procedure Value_is (Now : in Matrix_4x4)
-- is
-- begin
-- the_Value := Now;
-- end Value_is;
--
-- procedure Site_is (Now : in Vector_3)
-- is
-- begin
-- the_Value (4, 1) := Now (1);
-- the_Value (4, 2) := Now (2);
-- the_Value (4, 3) := Now (3);
-- end Site_is;
-- end safe_Matrix_4x4;
end gel.Sprite;

View File

@@ -1082,8 +1082,8 @@ is
function to_Hash is new ada.unchecked_Conversion (impact_Filter, ada.Containers.Hash_type);
function to_Hash is new ada.unchecked_Conversion (impact_Response, ada.Containers.Hash_type);
begin
return to_Hash (Self.Filter)
+ to_Hash (Self.Response);
return to_Hash (Self.Filter) / 2
+ to_Hash (Self.Response) / 2;
end Hash;