Skip to content

Commit

Permalink
[#204] fixed a bug in local multimap print method
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoCastellana committed Jun 9, 2023
1 parent bc04022 commit 3712de5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions include/shad/data_structures/local_multimap.h
Original file line number Diff line number Diff line change
Expand Up @@ -918,19 +918,16 @@ template <typename KTYPE, typename VTYPE, typename KEY_COMPARE>
void LocalMultimap<KTYPE, VTYPE, KEY_COMPARE>::PrintAllEntries() {
for (auto itr = begin(); itr != end(); ++itr) {
auto key = (*itr).first;
std::cout << std::get<0>(key) << " " << std::get<1>(key);
std::cout << "\n";
auto value = (*itr).second;
std::cout << "[" << key << "]: " << value << std::endl;
}
}

template <typename KTYPE, typename VTYPE, typename KEY_COMPARE>
void LocalMultimap<KTYPE, VTYPE, KEY_COMPARE>::PrintAllKeys() {
for (auto itr = key_begin(); itr != key_end(); ++itr) {
auto key = (*itr).first;
auto value = (*itr).second;
std::cout << value.size() << " " << std::get<0>(key) << " "
<< std::get<1>(key);
std::cout << "\n";
std::cout << key << std::endl;
}
}

Expand Down

0 comments on commit 3712de5

Please sign in to comment.