diff --git a/CMakeLists.txt b/CMakeLists.txt index b85dcdc..5dc20aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10) option(TINY_UI_SAMPLES "The build will create the samples." ON) PROJECT(tiny_ui) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 23 ) SET( TUI_VERSION_MAJOR 0 ) SET( TUI_VERSION_MINOR 0 ) SET( TUI_VERSION_PATCH 2 ) diff --git a/src/tinyui.cpp b/src/tinyui.cpp index d1e3cd2..eb33308 100644 --- a/src/tinyui.cpp +++ b/src/tinyui.cpp @@ -27,6 +27,7 @@ SOFTWARE. #include "backends/sdl2_iodevice.h" #include +#include namespace tinyui { @@ -56,7 +57,11 @@ static void logVersion(const Context &ctx) { void log_message(LogSeverity severity, const char *message) { assert(message != nullptr); - std::cout << SeverityToken[static_cast(severity)] << " " << message <<"\n."; + if (severity == LogSeverity::Message) { + std::cout << message << "\n"; + } else { + std::cout << SeverityToken[std::to_underlying(severity)] << " " << message << "\n"; + } } Context *gCtx = nullptr; @@ -67,7 +72,6 @@ Context *Context::create(const char *title, const Style &style) { ctx->mAppTitle = title; ctx->mWindowsTitle = title; ctx->mStyle = style; - ctx->mVersion = Version{0, 0, 2}; logVersion(*ctx);