Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/readoperator.jl @ 801:04e549669b10 operator_storage_array_of_table
Consider feedback
;)
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 25 Jul 2021 16:12:24 +0200 |
parents | 26bf5b2b3e32 |
children | b874c26ea7d1 |
line wrap: on
line diff
--- a/src/SbpOperators/readoperator.jl Sun Jul 25 15:39:29 2021 +0200 +++ b/src/SbpOperators/readoperator.jl Sun Jul 25 16:12:24 2021 +0200 @@ -78,29 +78,6 @@ return Stencil(weights..., center = toml["c"]) end -# TBD Vidar: -# I suggest the following restructure, for a clearer control flow. -# function check_stencil_toml(toml) -# if toml isa Vector{String} -# return -# end -# -# if toml isa Dict -# if !(haskey(toml, "s") && haskey(toml, "c")) -# throw(ArgumentError("the table form of a stencil must have fields `s` and `c`.")) -# end -# -# if !(toml["s"] isa Vector{String}) -# throw(ArgumentError("a stencil must be specified as a vector of strings.")) -# end -# -# if !(toml["c"] isa Int) -# throw(ArgumentError("the center of a stencil must be specified as an integer.")) -# end -# return -# end -# throw(ArgumentError("the TOML for a stencil must be a vector of strings or a table.")) -# end function check_stencil_toml(toml) if !(toml isa Dict || toml isa Vector{String}) throw(ArgumentError("the TOML for a stencil must be a vector of strings or a table."))