Skip to content

Commit 75c0078

Browse files
committed
Merge branch 'topic/perf-2' into 'master'
Redefine array type for compatibility with newer Virtual_Character. See merge request eng/ide/ada_language_server!1194
2 parents 37bb74d + fc6627d commit 75c0078

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

source/ada/lsp-search-approximate.adb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Language Server Protocol --
33
-- --
4-
-- Copyright (C) 2021-2022, AdaCore --
4+
-- Copyright (C) 2021-2023, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -38,8 +38,8 @@ package body LSP.Search.Approximate is
3838
-- errors.
3939

4040
Mask : Character_Masks;
41-
Min : Virtual_Character := Virtual_Character'Last;
42-
Max : Virtual_Character := Virtual_Character'First;
41+
Min : Virtual_Character := Virtual_Character'Last_Valid;
42+
Max : Virtual_Character := Virtual_Character'First_Valid;
4343
C : Virtual_Character;
4444
begin
4545
declare

source/ada/lsp-search-approximate.ads

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Language Server Protocol --
33
-- --
4-
-- Copyright (C) 2021, AdaCore --
4+
-- Copyright (C) 2021-2023, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -32,7 +32,8 @@ private
3232
subtype Mask is Interfaces.Unsigned_64;
3333
-- We only consider the 1..Pattern'Length
3434

35-
type Character_Mask_Array is array (Virtual_Character range <>) of Mask;
35+
type Character_Mask_Array is
36+
array (Virtual_Character'Base range <>) of Mask;
3637
type Character_Masks is access all Character_Mask_Array;
3738

3839
Approximate_Max_Errors : constant := 2;

0 commit comments

Comments
 (0)