From 4da5fa256ce6ce330436e3d9850cf35be889f3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Fri, 28 Apr 2017 19:25:31 +0200 Subject: [PATCH] add SPDLOG_FINAL information in tweakme.h --- include/spdlog/common.h | 3 +-- include/spdlog/tweakme.h | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index dfecb082..e9fa372e 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -29,8 +29,7 @@ #define SPDLOG_CONSTEXPR constexpr #endif -// If an user of the library is not inheriting from the types provided by it, -// he can #define SPDLOG_FINAL final to get additional optimizations +// See tweakme.h #if !defined(SPDLOG_FINAL) #define SPDLOG_FINAL #endif diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index 86f66b9e..bde27967 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -106,3 +106,11 @@ // // #define SPDLOG_PREVENT_CHILD_FD /////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to mark some types as final, allowing more optimizations in release +// mode with recent compilers. See GCC's documentation for -Wsuggest-final-types +// for instance. +// +// #define SPDLOG_FINAL final +///////////////////////////////////////////////////////////////////////////////