Skip to content

Commit

Permalink
Simplify method
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Mar 10, 2024
1 parent fbfcd7b commit 0b138c0
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/version_f.f90
Original file line number Diff line number Diff line change
Expand Up @@ -723,26 +723,11 @@ subroutine parse_version_range(this, string, error)
!> Error handling.
type(error_t), allocatable, intent(out) :: error

integer :: i_sep
character(:), allocatable :: str
type(comparator_set_t) :: comp_set

str = string
allocate (this%comp_sets(0))

i_sep = index(str, '||')

do while (i_sep /= 0)
call comp_set%parse_comp_set(str(1:i_sep - 1), error)
if (allocated(error)) return

this%comp_sets = [this%comp_sets, comp_set]

str = str(i_sep + 2:)
i_sep = index(str, '||')
end do

call comp_set%parse_comp_set(str, error)
call comp_set%parse_comp_set(string, error)
if (allocated(error)) return

this%comp_sets = [this%comp_sets, comp_set]
Expand Down

0 comments on commit 0b138c0

Please sign in to comment.