Skip to content

Commit

Permalink
Merge pull request #65 from neonWhiteout/sname_fix
Browse files Browse the repository at this point in the history
Fixed a typo in set_sname! definition preventing it from working corr…
  • Loading branch information
Xiaoyan-Li authored Aug 24, 2023
2 parents ab048d4 + 86d2128 commit 7191c2c
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 7191c2c

Please sign in to comment.