diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-05-09 09:32:20 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-05-09 09:32:20 +1200 |
commit | b506d60f37c7bb5a870ca838072afe816fc7aa61 (patch) | |
tree | 482411cee5929bd730368716207b13dfbd91e9fb /example | |
parent | 8acdbfe2299ec7a96db69ee0b2ec298401c92ae8 (diff) |
Constants marked constant, redundant with clauses no longer redundant
Diffstat (limited to 'example')
-rw-r--r-- | example/device_list.adb | 4 | ||||
-rw-r--r-- | example/sine_block.adb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/example/device_list.adb b/example/device_list.adb index d92d2c4..329b29f 100644 --- a/example/device_list.adb +++ b/example/device_list.adb @@ -29,7 +29,7 @@ procedure Device_List is (Num : in Integer) return String is - Test_Out : String := Integer'Image (Num); + Test_Out : constant String := Integer'Image (Num); begin if Test_Out (Test_Out'First) = ' ' then return Test_Out (Test_Out'First + 1 .. Test_Out'Last); @@ -63,7 +63,7 @@ procedure Device_List is (In_Params : access Paud.Streams.Parameters; Out_Params : access Paud.Streams.Parameters) is - Standard_Sample_Rates : array (Positive range <>) of Paud.Hertz := + Standard_Sample_Rates : constant array (Positive range <>) of Paud.Hertz := (8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0, 44100.0, 48000.0, 88200.0, 96000.0, 192000.0); Put_Counter : Natural := 0; diff --git a/example/sine_block.adb b/example/sine_block.adb index 538d1d9..e6d3d21 100644 --- a/example/sine_block.adb +++ b/example/sine_block.adb @@ -30,7 +30,7 @@ procedure Sine_Block is -- Note how this array specifies the bounds in the initial value rather than the type. -- This is important because otherwise the aliasing would cause subtype mismatch errors. Sample_Array : aliased Pstm.Float_32_Array := (1 .. Natural (Per_Buffer) * Channels => 0.0); - Sample_Buffer : Pstm.Buffer := Pstm.Wrap (Sample_Array, Per_Buffer, Channels); + Sample_Buffer : constant Pstm.Buffer := Pstm.Wrap (Sample_Array, Per_Buffer, Channels); type Table_Index is mod 200; Sine_Table : array (Table_Index) of Interfaces.IEEE_Float_32; |