mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Use magic statics instead of ATOMIC_STATIC. (#109)
This commit is contained in:
@@ -9,14 +9,13 @@
|
||||
#define CSCORE_LOG_H_
|
||||
|
||||
#include <support/Logger.h>
|
||||
#include <support/atomic_static.h>
|
||||
|
||||
namespace cs {
|
||||
|
||||
class Logger : public wpi::Logger {
|
||||
public:
|
||||
static Logger& GetInstance() {
|
||||
ATOMIC_STATIC(Logger, instance);
|
||||
static Logger instance;
|
||||
return instance;
|
||||
}
|
||||
~Logger();
|
||||
@@ -25,8 +24,6 @@ class Logger : public wpi::Logger {
|
||||
|
||||
private:
|
||||
Logger();
|
||||
|
||||
ATOMIC_STATIC_DECL(Logger)
|
||||
};
|
||||
|
||||
#define LOG(level, x) WPI_LOG(cs::Logger::GetInstance(), level, x)
|
||||
|
||||
Reference in New Issue
Block a user