mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
some cleanup
This commit is contained in:
parent
7ab6fd9db6
commit
97f9cc4bc0
@ -16,7 +16,8 @@ int main(int, char *[])
|
|||||||
{
|
{
|
||||||
int x = 4;
|
int x = 4;
|
||||||
spdlog::info("HELLO {}", "st at ic");
|
spdlog::info("HELLO {}", "st at ic");
|
||||||
spdlog::warn("HELLO {}*{} = {}", x, x, x*x);
|
spdlog::warn("HELLO {} *{} = {}", x, x, x*x);
|
||||||
|
|
||||||
/*auto *l = get_logger();
|
/*auto *l = get_logger();
|
||||||
l->info("HEllo {}", "HG FS");*/
|
l->info("HEllo {}", "HG FS");*/
|
||||||
}
|
}
|
@ -13,6 +13,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
|
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
@ -27,7 +28,6 @@
|
|||||||
#define SPDLOG_INLINE
|
#define SPDLOG_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// visual studio upto 2013 does not support noexcept nor constexpr
|
// visual studio upto 2013 does not support noexcept nor constexpr
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||||
#define SPDLOG_NOEXCEPT throw()
|
#define SPDLOG_NOEXCEPT throw()
|
||||||
@ -214,15 +214,10 @@ private:
|
|||||||
|
|
||||||
struct source_loc
|
struct source_loc
|
||||||
{
|
{
|
||||||
SPDLOG_CONSTEXPR source_loc()
|
SPDLOG_CONSTEXPR source_loc() = default;
|
||||||
: filename{""}
|
|
||||||
, line{0}
|
|
||||||
, funcname{""}
|
|
||||||
{
|
|
||||||
}
|
|
||||||
SPDLOG_CONSTEXPR source_loc(const char *filename_in, int line_in, const char *funcname_in)
|
SPDLOG_CONSTEXPR source_loc(const char *filename_in, int line_in, const char *funcname_in)
|
||||||
: filename{filename_in}
|
: filename{filename_in}
|
||||||
, line{static_cast<uint32_t>(line_in)}
|
, line{line_in}
|
||||||
, funcname{funcname_in}
|
, funcname{funcname_in}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -231,9 +226,9 @@ struct source_loc
|
|||||||
{
|
{
|
||||||
return line == 0;
|
return line == 0;
|
||||||
}
|
}
|
||||||
const char *filename;
|
const char *filename{nullptr};
|
||||||
uint32_t line;
|
int line{0};
|
||||||
const char *funcname;
|
const char *funcname{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace details {
|
namespace details {
|
||||||
|
Loading…
Reference in New Issue
Block a user