Skip to content

Commit ce8703e

Browse files
committed
Removed redundant initialization update
1 parent 2e8e686 commit ce8703e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/stdlib_hashmap_chaining.f90

+1-4
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,7 @@ module subroutine map_chain_entry(map, key, other, conflict)
551551
character(*), parameter :: procedure = 'MAP_ENTRY'
552552

553553
! Check that map is initialized.
554-
if (.not. map % initialized) then
555-
call init_chaining_map( map )
556-
map % initialized = .true.
557-
endif
554+
if (.not. map % initialized) init_chaining_map( map )
558555

559556
hash_val = map % hasher( key )
560557

src/stdlib_hashmap_open.f90

+1-4
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,7 @@ module subroutine map_open_entry(map, key, other, conflict)
540540
character(*), parameter :: procedure = 'MAP_ENTRY'
541541

542542
! Check that map is initialized.
543-
if (.not. map % initialized) then
544-
call init_open_map( map )
545-
map % initialized = .true.
546-
endif
543+
if (.not. map % initialized) call init_open_map( map )
547544

548545
hash_val = map % hasher( key )
549546

0 commit comments

Comments
 (0)