Skip to content

Commit c00284f

Browse files
authored
Merge pull request #34 from ellert/loop-variable-error-gcc11
Fix compilation error with gcc 11
2 parents 6b0cc40 + 01b39dd commit c00284f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scitokens_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ class Validator {
390390
}
391391
}
392392
// std::cout << "Running claim " << claim_pair.first << " through validation." << std::endl;
393-
if (iter != m_validators.end()) for (const auto verification_func : iter->second) {
393+
if (iter != m_validators.end()) for (const auto &verification_func : iter->second) {
394394
const jwt::claim &claim = jwt.get_payload_claim(claim_pair.first);
395395
if (claim.get_type() != jwt::claim::type::string) {
396396
std::stringstream ss;
@@ -409,7 +409,7 @@ class Validator {
409409
}
410410
}
411411
}
412-
if (iter_claim != m_claim_validators.end()) for (const auto verification_pair : iter_claim->second) {
412+
if (iter_claim != m_claim_validators.end()) for (const auto &verification_pair : iter_claim->second) {
413413
const jwt::claim &claim = jwt.get_payload_claim(claim_pair.first);
414414
if (verification_pair.first(claim, verification_pair.second) == false) {
415415
std::stringstream ss;

0 commit comments

Comments
 (0)