Skip to content

Commit

Permalink
Use reference in range-for with non trivial type (#294)
Browse files Browse the repository at this point in the history
Found by Clazy (range-loop-reference)
  • Loading branch information
gruenich authored Jul 8, 2024
1 parent 64d1206 commit 151b37b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/time_zone_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ std::unique_ptr<ZoneInfoSource> FuchsiaZoneInfoSource::Open(
const auto prefixes = name_absolute ? kEmptyPrefix : kTzdataPrefixes;

// Fuchsia builds place zoneinfo files at "<prefix><format><name>".
for (const std::string prefix : prefixes) {
for (const std::string& prefix : prefixes) {
std::string path = prefix;
if (!prefix.empty()) path += "zoneinfo/tzif2/"; // format
path.append(name, pos, std::string::npos);
Expand Down

0 comments on commit 151b37b

Please sign in to comment.