diff options
author | Richard Carlsson <[email protected]> | 2019-03-11 15:54:47 +0100 |
---|---|---|
committer | Richard Carlsson <[email protected]> | 2019-03-11 15:54:47 +0100 |
commit | b4f73263b11efd7298ca320a6025952b2be99066 (patch) | |
tree | fdd97ce96fe23200c2d48a1dc9134e05fa18b112 /lib/stdlib | |
parent | 0ffc8346553a5fc9322a75d4d8be5417dad67f29 (diff) | |
download | otp-b4f73263b11efd7298ca320a6025952b2be99066.tar.gz otp-b4f73263b11efd7298ca320a6025952b2be99066.tar.bz2 otp-b4f73263b11efd7298ca320a6025952b2be99066.zip |
Get rid of useless setelement in array module
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/array.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/stdlib/src/array.erl b/lib/stdlib/src/array.erl index 939b1fb488..904d977faf 100644 --- a/lib/stdlib/src/array.erl +++ b/lib/stdlib/src/array.erl @@ -129,8 +129,9 @@ -define(LEAFSIZE, 10). % the "base" -define(NODESIZE, ?LEAFSIZE). % (no reason to have a different size) -define(NODEPATTERN(S), {_,_,_,_,_,_,_,_,_,_,S}). % NODESIZE+1 elements! --define(NEW_NODE(S), % beware of argument duplication! - setelement((?NODESIZE+1),erlang:make_tuple((?NODESIZE+1),(S)),(S))). +-define(NEW_NODE(E,S), % general case (currently unused) + setelement((?NODESIZE+1),erlang:make_tuple((?NODESIZE+1),(E)),(S))). +-define(NEW_NODE(S), erlang:make_tuple((?NODESIZE+1),(S))). % when E = S -define(NEW_LEAF(D), erlang:make_tuple(?LEAFSIZE,(D))). -define(NODELEAFS, ?NODESIZE*?LEAFSIZE). |