Browse Source

[2726] Use reference to avoid copy

Not that it would make any difference with such small class, but
cppcheck insists.
Michal 'vorner' Vaner 12 years ago
parent
commit
f57c476f33
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/bin/resolver/resolver.cc

+ 2 - 1
src/bin/resolver/resolver.cc

@@ -524,7 +524,8 @@ ResolverImpl::processNormalQuery(const IOMessage& io_message,
 {
     const ConstQuestionPtr question = *query_message->beginQuestion();
     const RRType qtype = question->getType();
-    const RRClass qclass = question->getClass();
+    // Make cppcheck happy with the reference.
+    const RRClass& qclass = question->getClass();
 
     // Apply query ACL
     const Client client(io_message);