Skip to content

Commit 96eacbe

Browse files
use count() method instead of find() to see if a wire_type exist in wire_type_sizes
1 parent cf69e63 commit 96eacbe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/libvtrutil/src/vtr_flat_map.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class flat_map {
343343
return end();
344344
}
345345

346-
///@brief Return the count of occurances of a key
346+
///@brief Return the count of occurrences of a key
347347
size_type count(const key_type& key) const {
348348
return (find(key) == end()) ? 0 : 1;
349349
}
@@ -404,9 +404,9 @@ class flat_map {
404404

405405
iterator convert_to_iterator(const_iterator const_iter) {
406406
/*
407-
* A work around as there is no conversion betweena const_iterator and iterator.
407+
* A work around as there is no conversion between const_iterator and iterator.
408408
*
409-
* We intiailize i to the start of the container and then advance it by
409+
* We initialize i to the start of the container and then advance it by
410410
* the distance to const_iter. The resulting i points to the same element
411411
* as const_iter
412412
*

vpr/src/route/rr_graph_generation/build_scatter_gathers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static std::vector<t_sg_candidate> find_candidate_wires(const std::vector<t_chan
9191
for (const t_wire_switchpoints& wire_switchpoints : wire_switchpoints_vec) {
9292
auto wire_type = vtr::string_view(wire_switchpoints.segment_name);
9393

94-
if (wire_type_sizes.find(wire_type) == wire_type_sizes.end()) {
94+
if (wire_type_sizes.count(wire_type) == 0) {
9595
// wire_type_sizes may not contain wire_type if its seg freq is 0
9696
continue;
9797
}

0 commit comments

Comments
 (0)