Skip to content

Commit 17ebed2

Browse files
committed
reorganize if(present(x))
1 parent e6aa0f5 commit 17ebed2

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/stdlib_linalg_eigenvalues.fypp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ submodule (stdlib_linalg) stdlib_linalg_eigenvalues
2121
!> Request for symmetry side (default: lower)
2222
elemental character function symmetric_triangle_task(upper)
2323
logical(lk), optional, intent(in) :: upper
24-
if (present(upper)) then
25-
symmetric_triangle_task = merge('U','L',upper)
26-
else
27-
symmetric_triangle_task = 'L'
28-
endif
24+
symmetric_triangle_task = 'L'
25+
if (present(upper)) symmetric_triangle_task = merge('U','L',upper)
2926
end function symmetric_triangle_task
3027

3128
!> Process GEEV output flags
@@ -194,11 +191,8 @@ submodule (stdlib_linalg) stdlib_linalg_eigenvalues
194191
endif
195192

196193
! Can A be overwritten? By default, do not overwrite
197-
if (present(overwrite_a)) then
198-
copy_a = .not.overwrite_a
199-
else
200-
copy_a = .true._lk
201-
endif
194+
copy_a = .true._lk
195+
if (present(overwrite_a)) copy_a = .not.overwrite_a
202196

203197
! Initialize a matrix temporary
204198
if (copy_a) then

0 commit comments

Comments
 (0)