From 36f0aca69327960424a90e08a1908a7f89ffe454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sat, 3 Dec 2016 14:22:49 +0100 Subject: [PATCH] made byte(message) helper method constexpr so it is compile time --- chat_messages.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat_messages.hpp b/chat_messages.hpp index c11f8ba..cb2b03e 100644 --- a/chat_messages.hpp +++ b/chat_messages.hpp @@ -14,7 +14,7 @@ namespace chat PING = 6, PONG = 7, BYE = 8, LOGIN = 9, LOGOUT = 10, TERM = 0x7f }; - char byte(message msg) { return static_cast(msg); } + constexpr char byte(message msg) { return static_cast(msg); } class chat_message