We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae4a38f commit 8f088b3Copy full SHA for 8f088b3
src/stdlib_string_type.fypp
@@ -681,11 +681,10 @@ contains
681
elemental subroutine move_string_string(from, to)
682
type(string_type), intent(inout) :: from
683
type(string_type), intent(inout) :: to
684
+ character(:), allocatable :: tmp
685
- if(.not.allocated(from%raw))then
686
- if(allocated(to%raw))deallocate(to%raw)
687
- return
688
- endif
+ call move_alloc(from%raw, tmp)
+ call move_alloc(tmp, to%raw)
689
690
if(from%raw .eq. to%raw)then
691
deallocate(from%raw)
0 commit comments