Skip to content

Commit 27a5e58

Browse files
authored
Prevent compiler warning about unnecessary copy (#3129)
This compiler warning comes up a lot, and is due to the unnecessary copy introduced by accidentally using const value instead of const ref here.
1 parent b9162a7 commit 27a5e58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ast_values.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ namespace Sass {
481481
{
482482
if (hash_ == 0) {
483483
hash_ = std::hash<double>()(value_);
484-
for (const auto numerator : numerators)
484+
for (const auto& numerator : numerators)
485485
hash_combine(hash_, std::hash<sass::string>()(numerator));
486-
for (const auto denominator : denominators)
486+
for (const auto& denominator : denominators)
487487
hash_combine(hash_, std::hash<sass::string>()(denominator));
488488
}
489489
return hash_;

0 commit comments

Comments
 (0)