From 0b138c048cb66a2d0ecac04cf63d9fb959c7217e Mon Sep 17 00:00:00 2001 From: minhqdao Date: Sun, 10 Mar 2024 15:57:42 +0545 Subject: [PATCH] Simplify method --- src/version_f.f90 | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/version_f.f90 b/src/version_f.f90 index 00c5250..aff9ac6 100644 --- a/src/version_f.f90 +++ b/src/version_f.f90 @@ -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]