From d8ddfe5c2494309e31d52ac51f1a626bb761b4f8 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 17 Mar 2014 02:01:40 +0200 Subject: [PATCH] fixes --- example/example.cpp | 2 +- include/c11log/details/fast_oss.h | 2 +- include/c11log/details/os.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index ce4bab88..203392dc 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -37,7 +37,7 @@ int main(int argc, char* argv[]) auto start = system_clock::now(); - const unsigned int howmany = 500000; + const unsigned int howmany = 3000000; for(unsigned int i = 0; i < howmany ; i++) my_logger.info() << "Hello logger " << i; diff --git a/include/c11log/details/fast_oss.h b/include/c11log/details/fast_oss.h index b02ff4ac..39d586a4 100644 --- a/include/c11log/details/fast_oss.h +++ b/include/c11log/details/fast_oss.h @@ -36,11 +36,11 @@ protected: virtual int sync() override { return 0; + } virtual std::streamsize xsputn(const char_type* s, std::streamsize count) override { - auto ssize = _str.size(); auto cap_left = _str.capacity() - ssize; if(cap_left < static_cast(count)) diff --git a/include/c11log/details/os.h b/include/c11log/details/os.h index 509e6ed8..2161e15f 100644 --- a/include/c11log/details/os.h +++ b/include/c11log/details/os.h @@ -47,7 +47,7 @@ inline bool operator!=(const std::tm& tm1, const std::tm& tm2) return !(tm1==tm2); } -inline const char* eol() +constexpr inline const char* eol() { #ifdef _WIN32 return "\r\n";