Skip to content

Commit

Permalink
Fixed a typo in set_sname! definition preventing it from working corr…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
neonWhiteout committed Aug 17, 2023
1 parent ba64696 commit 86d2128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StockFlow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ set_pnames!(p::AbstractStockAndFlowStructure, names) = set_subpart!(p, :pname, n


# Could pull out the right side into another function
set_sname!(p::AbstractStockAndFlow0, index, newname) = set_subpart!(p, :sname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(vnames(p))])
set_sname!(p::AbstractStockAndFlow0, index, newname) = set_subpart!(p, :sname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(snames(p))])
set_fname!(p::AbstractStockAndFlowStructure, index, newname) = set_subpart!(p, :fname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(fnames(p))])
set_svname!(p::AbstractStockAndFlow0, index, newname) = set_subpart!(p, :svname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(svnames(p))])
set_vname!(p::AbstractStockAndFlowStructure, index, newname) = set_subpart!(p, :vname, [i == index ? newname : prevnames for (i, prevnames) in enumerate(vnames(p))])
Expand Down

0 comments on commit 86d2128

Please sign in to comment.