Removed dict_delete_*.

This commit is contained in:
Adam Nelson 2013-04-06 12:39:21 -04:00
parent 5111b02e06
commit b6b2023526

View file

@ -64,7 +64,6 @@ module dict_header
type(HashListCI), pointer :: table(:) => null()
contains
procedure :: add_key => dict_add_key_ci
procedure :: delete => dict_delete_ci
procedure :: get_key => dict_get_key_ci
procedure :: has_key => dict_has_key_ci
procedure :: keys => dict_keys_ci
@ -77,7 +76,6 @@ module dict_header
type(HashListII), pointer :: table(:) => null()
contains
procedure :: add_key => dict_add_key_ii
procedure :: delete => dict_delete_ii
procedure :: get_key => dict_get_key_ii
procedure :: has_key => dict_has_key_ii
procedure :: keys => dict_keys_ii
@ -152,54 +150,6 @@ contains
end subroutine dict_add_key_ii
!===============================================================================
! DICT_DELETE deletes all (key,value) pairs from the dictionary
!===============================================================================
subroutine dict_delete_ci(this)
class(DictCharInt) :: this
integer :: i
type(ElemKeyValueCI), pointer :: current
type(ElemKeyValueCI), pointer :: next
if (associated(this % table)) then
do i = 1, size(this % table)
current => this % table(i) % list
do while (associated(current))
next => current % next
deallocate(current)
current => next
end do
nullify(this % table(i) % list)
end do
end if
end subroutine dict_delete_ci
subroutine dict_delete_ii(this)
class(DictIntInt) :: this
integer :: i
type(ElemKeyValueII), pointer :: current
type(ElemKeyValueII), pointer :: next
if (associated(this % table)) then
do i = 1, size(this % table)
current => this % table(i) % list
do while (associated(current))
next => current % next
deallocate(current)
current => next
end do
nullify(this % table(i) % list)
end do
end if
end subroutine dict_delete_ii
!===============================================================================
! DICT_GET_ELEM returns a pointer to the (key,value) pair for a given key. This
! method is private.