Skip to content
Snippets Groups Projects
Commit 3fea9d2a authored by Mark de Wever's avatar Mark de Wever
Browse files

Avoid tempories in a range-based for loop

parent 3c11a04b
No related branches found
No related tags found
1 merge request!814Avoid tempories in a range-based for loop
Pipeline #38846 passed
...@@ -13,7 +13,7 @@ namespace common { ...@@ -13,7 +13,7 @@ namespace common {
std::ostream& operator<<(std::ostream& os, const ParameterRecord& record) { std::ostream& operator<<(std::ostream& os, const ParameterRecord& record) {
bool first = true; bool first = true;
os << '{'; os << '{';
for (const std::pair<std::string, ParameterValue>& entry : record) { for (const std::pair<const std::string, ParameterValue>& entry : record) {
if (first) { if (first) {
first = false; first = false;
} else { } else {
......
...@@ -71,7 +71,7 @@ blob::BlobOStream& operator<<(blob::BlobOStream& stream, ...@@ -71,7 +71,7 @@ blob::BlobOStream& operator<<(blob::BlobOStream& stream,
const ParameterSet& set) { const ParameterSet& set) {
stream.putStart("ParameterSet", 1); stream.putStart("ParameterSet", 1);
stream << static_cast<std::uint32_t>(set.size()); stream << static_cast<std::uint32_t>(set.size());
for (const std::pair<std::string, ParameterValue>& entry : set) { for (const std::pair<const std::string, ParameterValue>& entry : set) {
stream << entry.first << entry.second.get(); stream << entry.first << entry.second.get();
} }
stream.putEnd(); stream.putEnd();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment