r600/sfn: use modern c++ in printing LDS read instruction
authorGert Wollny <gert.wollny@collabora.com>
Sat, 23 May 2020 16:04:35 +0000 (18:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 26 May 2020 06:17:42 +0000 (06:17 +0000)
Closes #3021

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>

src/gallium/drivers/r600/sfn/sfn_instruction_lds.cpp

index b58b6156725fdae1f019e6001486b8babd8d45f5..570f8f2a93eb4b5bbc0c43cc72e953c3d0000f9f 100644 (file)
@@ -5,11 +5,11 @@ namespace r600 {
 void LDSReadInstruction::do_print(std::ostream& os) const
 {
    os << "LDS Read  [";
-   for (unsigned i = 0; i < m_address.size(); ++i)
-      os << *m_dest_value[i] << " ";
+   for (auto& v : m_dest_value)
+      os << *v << " ";
    os << "], ";
-   for (unsigned i = 0; i < m_address.size(); ++i)
-      os << *m_address[i] << " ";
+   for (auto& a : m_address)
+      os << *a << " ";
 }
 
 LDSReadInstruction::LDSReadInstruction(std::vector<PValue>& address, std::vector<PValue>& value):