deleted copy op and a little format

This commit is contained in:
Daniel Chabrowski
2018-02-25 02:43:26 +01:00
parent af50d5ef1f
commit 0c94ce0039
14 changed files with 35 additions and 33 deletions

View File

@@ -25,7 +25,7 @@ template<class Mutex>
class base_sink : public sink
{
public:
base_sink():_mutex() {}
base_sink() = default;
base_sink(const base_sink&) = delete;
base_sink& operator=(const base_sink&) = delete;

View File

@@ -15,6 +15,7 @@ class sink
{
public:
virtual ~sink() = default;
virtual void log(const details::log_msg& msg) = 0;
virtual void flush() = 0;

View File

@@ -22,7 +22,7 @@ namespace sinks
* Windows color console sink. Uses WriteConsoleA to write to the console with colors
*/
template <class Mutex>
class wincolor_sink : public base_sink<Mutex>
class wincolor_sink : public base_sink<Mutex>
{
public:
const WORD BOLD = FOREGROUND_INTENSITY;
@@ -50,7 +50,7 @@ public:
wincolor_sink(const wincolor_sink& other) = delete;
wincolor_sink& operator=(const wincolor_sink& other) = delete;
// change the color for the given level
// change the color for the given level
void set_color(level::level_enum level, WORD color)
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);