Skip to content

Commit 7cbee89

Browse files
author
Remi Delmas
committed
Simplify use the size method instead of distance
1 parent 487c28c commit 7cbee89

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/util/irep_hash_container.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ void irep_hash_container_baset::pack(
5555
{
5656
// we pack: the irep id, the sub size, the subs, the named-sub size, and
5757
// each of the named subs with their ids
58-
#if NAMED_SUB_IS_FORWARD_LIST
59-
const std::size_t named_sub_size =
60-
std::distance(named_sub.begin(), named_sub.end());
61-
#else
6258
const std::size_t named_sub_size = named_sub.size();
63-
#endif
6459
packed.reserve(1 + 1 + sub.size() + 1 + named_sub_size * 2);
6560

6661
packed.push_back(irep_id_hash()(irep.id()));

src/util/lispirep.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@ void irep2lisp(const irept &src, lispexprt &dest)
4646
dest.value.clear();
4747
dest.type=lispexprt::List;
4848

49-
#if NAMED_SUB_IS_FORWARD_LIST
50-
const std::size_t named_sub_size =
51-
std::distance(src.get_named_sub().begin(), src.get_named_sub().end());
52-
#else
5349
const std::size_t named_sub_size = src.get_named_sub().size();
54-
#endif
5550
dest.reserve(2 + 2 * src.get_sub().size() + 2 * named_sub_size);
5651

5752
lispexprt id;

0 commit comments

Comments
 (0)