From bb3dc8795334c2a7670c674d1319b7b4900b3494 Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 12 May 2019 00:32:57 +0300 Subject: [PATCH] Fixed include order and example --- example/example.cpp | 17 ++++++----------- include/spdlog/common.h | 3 ++- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index 532bbb5c..c76640a7 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -7,15 +7,10 @@ // // -//#include "spdlog/spdlog.h" -#include "spdlog/logger.h" -//#include "spdlog/sinks/stdout_color_sinks.h" -int main(int, char *[]) -{ - spdlog::logger *l = nullptr; - const int i = 123; - l->info("HELLO STATIC! {}", i); - l->info("HELLO STATIC! {}", "GABI"); - l->info("HELLO STATIC! {} {}", "GABI", i); - l->warn("HELLO STATIC! {} {}", "GABI", i); + +#include "spdlog/spdlog.h" + +int main(int, char *[]) { + int i = 123; + spdlog::info("HELLO STATIC! {}", i); } \ No newline at end of file diff --git a/include/spdlog/common.h b/include/spdlog/common.h index f37f08fe..d885ac61 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -19,7 +19,6 @@ #include #endif -#include "spdlog/fmt/fmt.h" #ifdef SPDLOG_STATIC_LIB #undef SPDLOG_HEADER_ONLY @@ -29,6 +28,8 @@ #define SPDLOG_INLINE inline #endif +#include "spdlog/fmt/fmt.h" + // visual studio upto 2013 does not support noexcept nor constexpr #if defined(_MSC_VER) && (_MSC_VER < 1900) #define SPDLOG_NOEXCEPT throw()