From: Remi Gacogne Date: Mon, 8 Jul 2019 09:56:20 +0000 (+0200) Subject: Mark the static vector of opcode names as const X-Git-Tag: dnsdist-1.4.0-rc1~64^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abaf72c958d784c1b8dceecadc411285072f2165;p=pdns Mark the static vector of opcode names as const --- diff --git a/pdns/dns.cc b/pdns/dns.cc index 420db9247..b560e59fb 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);