From abaf72c958d784c1b8dceecadc411285072f2165 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 8 Jul 2019 11:56:20 +0200 Subject: [PATCH] Mark the static vector of opcode names as const --- pdns/dns.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dns.cc b/pdns/dns.cc index 420db9247b..b560e59fb8 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -70,7 +70,7 @@ std::string ERCode::to_s(uint8_t rcode) { } std::string Opcode::to_s(uint8_t opcode) { - static std::vector s_opcodes = { "Query", "IQuery", "Status", "3", "Notify", "Update" }; + static const std::vector s_opcodes = { "Query", "IQuery", "Status", "3", "Notify", "Update" }; if (opcode >= s_opcodes.size()) { return std::to_string(opcode); -- 2.47.2