@@ -464,7 +464,7 @@ pure function shift( idx, shift_by )
464
464
type (stringlist_index_type), intent (in ) :: idx
465
465
integer , intent (in ) :: shift_by
466
466
467
- type (stringlist_index_type), intent ( in ) :: shift
467
+ type (stringlist_index_type) :: shift
468
468
469
469
shift = merge ( fidx( idx% offset + shift_by ), bidx( idx% offset + shift_by ), idx% forward )
470
470
@@ -607,7 +607,7 @@ end subroutine insert_at_stringarray_idx_wrap
607
607
! > Modifies the input stringlist 'list'
608
608
subroutine insert_before_engine ( list , idxn , positions )
609
609
! > Not a part of public API
610
- class (stringlist_type), intent (inout ) :: list
610
+ type (stringlist_type), intent (inout ) :: list
611
611
integer , intent (inout ) :: idxn
612
612
integer , intent (in ) :: positions
613
613
@@ -740,8 +740,8 @@ end subroutine insert_before_stringarray_int_impl
740
740
! > Returns strings present at stringlist_indexes in interval ['first', 'last']
741
741
! > Stores requested strings in array 'capture_strings'
742
742
! > No return
743
- subroutine get_engine ( list , first , last , capture_strings )
744
- class (stringlist_type) :: list
743
+ pure subroutine get_engine ( list , first , last , capture_strings )
744
+ type (stringlist_type), intent ( in ) :: list
745
745
type (stringlist_index_type), intent (in ) :: first, last
746
746
type (string_type), allocatable , intent (out ) :: capture_strings(:)
747
747
@@ -753,8 +753,7 @@ subroutine get_engine( list, first, last, capture_strings )
753
753
754
754
! out of bounds indexes won't be captured in capture_strings
755
755
if ( from <= to ) then
756
- pos = to - from + 1
757
- allocate ( capture_strings(pos) )
756
+ allocate ( capture_strings( to - from + 1 ) )
758
757
759
758
inew = 1
760
759
do i = from, to
@@ -775,8 +774,8 @@ end subroutine get_engine
775
774
pure function get_idx_impl ( list , idx )
776
775
class(stringlist_type), intent (in ) :: list
777
776
type (stringlist_index_type), intent (in ) :: idx
778
- type (string_type) :: get_idx_impl
779
777
778
+ type (string_type) :: get_idx_impl
780
779
type (string_type), allocatable :: capture_strings(:)
781
780
782
781
call get_engine( list, idx, idx, capture_strings )
0 commit comments