Skip to content

Commit 5be787b

Browse files
Make model control functions explicitly return nothing (#9)
1 parent b5d963e commit 5be787b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/bmi.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ const varname = "plate_surface__temperature"
55
BMI.initialize(::Type{Model}) = Model()
66
BMI.initialize(::Type{Model}, x) = Model(x)
77

8-
BMI.update(m::Model) = advance_in_time!(m)
8+
function BMI.update(m::Model)
9+
advance_in_time!(m)
10+
return nothing
11+
end
912

1013
function BMI.update_until(m::Model, t)
1114
time_step = BMI.get_time_step(m)
@@ -21,12 +24,16 @@ function BMI.update_until(m::Model, t)
2124
if fractional_step > 0
2225
advance_in_time!(m, fractional_step)
2326
end
27+
28+
return nothing
2429
end
2530

2631
hasvar(name) = name == varname || throw(KeyError(name))
2732
hasgrid(grid) = grid == 0 || throw(KeyError(grid))
2833

29-
BMI.finalize(m::Model) = m
34+
function BMI.finalize(m::Model)
35+
return nothing
36+
end
3037

3138
BMI.get_var_type(m::Model, name) = hasvar(name) && repr(eltype(m.temperature))
3239
BMI.get_var_units(m::Model, name) = hasvar(name) && "K"

0 commit comments

Comments
 (0)