diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-13 07:29:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-13 07:29:19 -0700 |
commit | a4c6dc9cc55169ff85231c055e653210e4e8b9eb (patch) | |
tree | d945347f1b3cf8fdfb0174f74354a04b3126a5c6 | |
parent | 38113f9277a27b48bf7a39b53415a1a57e70b086 (diff) | |
download | txr-a4c6dc9cc55169ff85231c055e653210e4e8b9eb.tar.gz txr-a4c6dc9cc55169ff85231c055e653210e4e8b9eb.tar.bz2 txr-a4c6dc9cc55169ff85231c055e653210e4e8b9eb.zip |
replace-str, replace-vec: remove call to len.
* lib.c (replace_str, replace_vec): Remove redundant
calculation of input sequence length; there is a len variable
bound on entry into the function.
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3764,7 +3764,7 @@ val replace_str(val str_in, val items, val from, val to) } else if (from == t) { from = len; } else if (!integerp(from)) { - val len = length_str(str_in), wh, item; + val wh, item; seq_iter_t wh_iter, item_iter; seq_iter_init(self, &item_iter, items); seq_iter_init(self, &wh_iter, from); @@ -7174,7 +7174,7 @@ val replace_vec(val vec_in, val items, val from, val to) from = len; } else if (!integerp(from)) { seq_iter_t wh_iter, item_iter; - val len = length_vec(vec_in), wh, item; + val wh, item; seq_iter_init(self, &wh_iter, from); seq_iter_init(self, &item_iter, items); |