]> granicus.if.org Git - pdns/commitdiff
Mark the static vector of opcode names as const
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 8 Jul 2019 09:56:20 +0000 (11:56 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 8 Jul 2019 09:56:20 +0000 (11:56 +0200)
pdns/dns.cc

index 420db9247b57556bf1936df4a0a14517b98f51a1..b560e59fb86195d721d0cf42ac4a0c27b4660cb0 100644 (file)
@@ -70,7 +70,7 @@ std::string ERCode::to_s(uint8_t rcode) {
 }
 
 std::string Opcode::to_s(uint8_t opcode) {
-  static std::vector<std::string> s_opcodes = { "Query", "IQuery", "Status", "3", "Notify", "Update" };
+  static const std::vector<std::string> s_opcodes = { "Query", "IQuery", "Status", "3", "Notify", "Update" };
 
   if (opcode >= s_opcodes.size()) {
     return std::to_string(opcode);