mem: Fix some reference use in range loops
This change fixes two cases of range loops, one where we can't use lvalue reference, and one more where we have to use an lvalue reference as we can't create a copy. In both cases clang would warn. Change-Id: I760aa094af66be32a150bad37acc21d6fd512a65 Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34776 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -41,8 +41,8 @@
|
||||
#include <vector>
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const BoolVec& myvector) {
|
||||
for (const auto& it: myvector) {
|
||||
os << " " << it;
|
||||
for (const bool e: myvector) {
|
||||
os << " " << e;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -256,8 +256,8 @@ inline int
|
||||
countBoolVec(BoolVec bVec)
|
||||
{
|
||||
int count = 0;
|
||||
for (const auto &it: bVec) {
|
||||
if (it) {
|
||||
for (const bool e: bVec) {
|
||||
if (e) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ Sequencer::wakeup()
|
||||
int total_outstanding = 0;
|
||||
|
||||
for (const auto &table_entry : m_RequestTable) {
|
||||
for (const auto seq_req : table_entry.second) {
|
||||
for (const auto &seq_req : table_entry.second) {
|
||||
if (current_time - seq_req.issue_time < m_deadlock_threshold)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user