Skip to content

Commit c7aaebd

Browse files
committed
remove ierr, select type polymorphism
1 parent 68023e6 commit c7aaebd

18 files changed

+195
-698
lines changed

CITATION.cff

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
cff-version: 1.2.0
2-
message: "If you use this software, please cite it as below."
32
authors:
43
- family-names: Hirsch
54
given-names: Michael
65
orcid: https://orcid.org/0000-0002-1637-6526
76
title: nc4fortran
8-
version: 1.4.7
97
doi: 10.5281/zenodo.3598941
108
date-released: 2021-11-21

src/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
file(READ reader_template.in.f90 reader_template)
1+
file(READ reader_template.f90 reader_template)
22
configure_file(reader.in.f90 reader.f90 @ONLY)
33

4-
file(READ writer_template_r32.in.f90 writer_template_r32)
5-
file(READ writer_template_r64.in.f90 writer_template_r64)
6-
file(READ writer_template_i32.in.f90 writer_template_i32)
7-
file(READ writer_template_i64.in.f90 writer_template_i64)
4+
file(READ writer_template.f90 writer_template)
85
configure_file(writer.in.f90 writer.f90 @ONLY)
96

10-
set_directory_properties(PROPERTIES CMAKE_CONFIGURE_DEPENDS
11-
"reader_template.in.f90;writer_template_r32.in.f90;writer_template_r64.in.f90;writer_template_i32.in.f90;writer_template_i64.in.f90")
7+
set_directory_properties(PROPERTIES CMAKE_CONFIGURE_DEPENDS "reader_template.f90;writer_template.f90")
128

139
target_sources(nc4fortran PRIVATE
1410
interface.f90

src/attributes.f90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
end select
2929
endif
3030

31-
if (present(ierr)) ierr = ier
32-
if (check_error(ier, dname) .and. .not. present(ierr)) error stop 'nc4fortran:attributes: failed to write' // attrname
31+
if (check_error(ier, dname)) error stop 'nc4fortran:attributes: failed to write' // attrname
3332

3433
end procedure write_attribute
3534

@@ -56,8 +55,7 @@
5655
end select
5756
endif
5857

59-
if (present(ierr)) ierr = ier
60-
if (check_error(ier, dname) .and. .not. present(ierr)) error stop 'nc4fortran:attributes: failed to read' // attrname
58+
if (check_error(ier, dname)) error stop 'nc4fortran:attributes: failed to read' // attrname
6159

6260
end procedure read_attribute
6361

0 commit comments

Comments
 (0)