diff --git a/src/main/native/cpp/Handle.cpp b/src/main/native/cpp/Handle.cpp deleted file mode 100644 index f47ef53277..0000000000 --- a/src/main/native/cpp/Handle.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) 2016-2017 FIRST. All Rights Reserved. */ -/* Open Source Software - may be modified and shared by FRC teams. The code */ -/* must be accompanied by the FIRST BSD license file in the root directory of */ -/* the project. */ -/*----------------------------------------------------------------------------*/ - -#include "Handle.h" - -using namespace cs; - -ATOMIC_STATIC_INIT(Sources) -ATOMIC_STATIC_INIT(Sinks) diff --git a/src/main/native/cpp/Handle.h b/src/main/native/cpp/Handle.h index 0b7d5ff62c..09ecc47add 100644 --- a/src/main/native/cpp/Handle.h +++ b/src/main/native/cpp/Handle.h @@ -79,7 +79,7 @@ class Sources : public UnlimitedHandleResource { public: static Sources& GetInstance() { - ATOMIC_STATIC(Sources, instance); + static Sources instance; return instance; } @@ -91,8 +91,6 @@ class Sources private: Sources() = default; - - ATOMIC_STATIC_DECL(Sources) }; struct SinkData { @@ -108,7 +106,7 @@ struct SinkData { class Sinks : public UnlimitedHandleResource { public: static Sinks& GetInstance() { - ATOMIC_STATIC(Sinks, instance); + static Sinks instance; return instance; } @@ -119,8 +117,6 @@ class Sinks : public UnlimitedHandleResource { private: Sinks() = default; - - ATOMIC_STATIC_DECL(Sinks) }; } // namespace cs diff --git a/src/main/native/cpp/Log.cpp b/src/main/native/cpp/Log.cpp index ee3106215d..56419ed219 100644 --- a/src/main/native/cpp/Log.cpp +++ b/src/main/native/cpp/Log.cpp @@ -14,8 +14,6 @@ using namespace cs; -ATOMIC_STATIC_INIT(Logger) - static void def_log_func(unsigned int level, const char* file, unsigned int line, const char* msg) { llvm::SmallString<128> buf; diff --git a/src/main/native/cpp/Log.h b/src/main/native/cpp/Log.h index 070d9d61d5..74c618f27e 100644 --- a/src/main/native/cpp/Log.h +++ b/src/main/native/cpp/Log.h @@ -9,14 +9,13 @@ #define CSCORE_LOG_H_ #include -#include 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) diff --git a/src/main/native/cpp/NetworkListener.cpp b/src/main/native/cpp/NetworkListener.cpp index b5021a6288..3baca97bda 100644 --- a/src/main/native/cpp/NetworkListener.cpp +++ b/src/main/native/cpp/NetworkListener.cpp @@ -25,8 +25,6 @@ using namespace cs; -ATOMIC_STATIC_INIT(NetworkListener) - class NetworkListener::Thread : public wpi::SafeThread { public: void Main(); diff --git a/src/main/native/cpp/NetworkListener.h b/src/main/native/cpp/NetworkListener.h index d703e9d3d6..343e700da0 100644 --- a/src/main/native/cpp/NetworkListener.h +++ b/src/main/native/cpp/NetworkListener.h @@ -9,14 +9,13 @@ #define CSCORE_NETWORKLISTENER_H_ #include -#include namespace cs { class NetworkListener { public: static NetworkListener& GetInstance() { - ATOMIC_STATIC(NetworkListener, instance); + static NetworkListener instance; return instance; } ~NetworkListener(); @@ -29,8 +28,6 @@ class NetworkListener { class Thread; wpi::SafeThreadOwner m_owner; - - ATOMIC_STATIC_DECL(NetworkListener) }; } // namespace cs diff --git a/src/main/native/cpp/Notifier.cpp b/src/main/native/cpp/Notifier.cpp index c48c92b558..890bbeb791 100644 --- a/src/main/native/cpp/Notifier.cpp +++ b/src/main/native/cpp/Notifier.cpp @@ -16,7 +16,6 @@ using namespace cs; -ATOMIC_STATIC_INIT(Notifier) bool Notifier::s_destroyed = false; namespace { diff --git a/src/main/native/cpp/Notifier.h b/src/main/native/cpp/Notifier.h index 289b98cf99..89a579e445 100644 --- a/src/main/native/cpp/Notifier.h +++ b/src/main/native/cpp/Notifier.h @@ -11,7 +11,6 @@ #include #include -#include #include "cscore_cpp.h" @@ -25,7 +24,7 @@ class Notifier { public: static Notifier& GetInstance() { - ATOMIC_STATIC(Notifier, instance); + static Notifier instance; return instance; } ~Notifier(); @@ -64,8 +63,6 @@ class Notifier { std::function m_on_start; std::function m_on_exit; - - ATOMIC_STATIC_DECL(Notifier) static bool s_destroyed; }; diff --git a/src/main/native/cpp/UnlimitedHandleResource.h b/src/main/native/cpp/UnlimitedHandleResource.h index 807dfcdc0a..285afd766f 100644 --- a/src/main/native/cpp/UnlimitedHandleResource.h +++ b/src/main/native/cpp/UnlimitedHandleResource.h @@ -14,7 +14,6 @@ #include #include -#include #include namespace cs { @@ -169,14 +168,12 @@ class StaticUnlimitedHandleResource : public UnlimitedHandleResource { public: static StaticUnlimitedHandleResource& GetInstance() { - ATOMIC_STATIC(StaticUnlimitedHandleResource, instance); + static StaticUnlimitedHandleResource instance; return instance; } private: StaticUnlimitedHandleResource() = default; - - ATOMIC_STATIC_DECL(StaticUnlimitedHandleResource) }; } // namespace cs diff --git a/src/main/native/cpp/jni/CameraServerJNI.cpp b/src/main/native/cpp/jni/CameraServerJNI.cpp index 6d519f9d49..148a124eab 100644 --- a/src/main/native/cpp/jni/CameraServerJNI.cpp +++ b/src/main/native/cpp/jni/CameraServerJNI.cpp @@ -1482,8 +1482,6 @@ typedef JSingletonCallbackManager LoggerJNI; } // anonymous namespace -ATOMIC_STATIC_INIT(LoggerJNI) - extern "C" { /*