From dd721463e6ce91c365eed144ead56e05934ce500 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nicolas.pope@utu.fi> Date: Mon, 8 Aug 2022 05:52:55 +0000 Subject: [PATCH] #60 Improve channel names when unknown --- CMakeLists.txt | 2 +- src/channelUtils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4fd764..2ca399b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,7 @@ if (WIN32) # TODO(nick) Should do based upon compiler (VS) #set(CMAKE_GENERATOR_TOOLSET "host=x64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2 /MP /std:c++17 /wd4996 /Zc:__cplusplus") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DFTL_DEBUG /Wall") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Wall") set(OS_LIBS "") else() add_definitions(-DUNIX) diff --git a/src/channelUtils.cpp b/src/channelUtils.cpp index d0e343c..0021907 100644 --- a/src/channelUtils.cpp +++ b/src/channelUtils.cpp @@ -255,7 +255,7 @@ std::string ftl::protocol::name(Channel c) { if (i != info.end()) { return i->second.name; } else { - return "Unknown"; + return "Unknown(" + std::to_string(static_cast<int>(c)) + ")"; } } -- GitLab