@@ -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
@@ -744,8 +744,8 @@ end subroutine insert_before_stringarray_int_impl
744
744
! > Returns strings present at stringlist_indexes in interval ['first', 'last']
745
745
! > Stores requested strings in array 'capture_strings'
746
746
! > No return
747
- subroutine get_engine ( list , first , last , capture_strings )
748
- class (stringlist_type) :: list
747
+ pure subroutine get_engine ( list , first , last , capture_strings )
748
+ type (stringlist_type), intent ( in ) :: list
749
749
type (stringlist_index_type), intent (in ) :: first, last
750
750
type (string_type), allocatable , intent (out ) :: capture_strings(:)
751
751
@@ -757,8 +757,7 @@ subroutine get_engine( list, first, last, capture_strings )
757
757
758
758
! out of bounds indexes won't be captured in capture_strings
759
759
if ( from <= to ) then
760
- pos = to - from + 1
761
- allocate ( capture_strings(pos) )
760
+ allocate ( capture_strings( to - from + 1 ) )
762
761
763
762
inew = 1
764
763
do i = from, to
@@ -779,8 +778,8 @@ end subroutine get_engine
779
778
pure function get_idx_impl ( list , idx )
780
779
class(stringlist_type), intent (in ) :: list
781
780
type (stringlist_index_type), intent (in ) :: idx
782
- type (string_type) :: get_idx_impl
783
781
782
+ type (string_type) :: get_idx_impl
784
783
type (string_type), allocatable :: capture_strings(:)
785
784
786
785
call get_engine( list, idx, idx, capture_strings )
0 commit comments