From 2bbff5395555b3aadda9460f1bcd9f0daf2a43b4 Mon Sep 17 00:00:00 2001 From: shueja-personal Date: Tue, 14 Nov 2023 14:04:47 -0800 Subject: [PATCH] refactor --- src/optimization/Cancellation.cpp | 5 +++++ src/optimization/Cancellation.h | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 src/optimization/Cancellation.cpp diff --git a/src/optimization/Cancellation.cpp b/src/optimization/Cancellation.cpp new file mode 100644 index 00000000..3b6512ba --- /dev/null +++ b/src/optimization/Cancellation.cpp @@ -0,0 +1,5 @@ + #include + std::atomic& GetCancellationFlag() { + static std::atomic flag; + return flag; + } \ No newline at end of file diff --git a/src/optimization/Cancellation.h b/src/optimization/Cancellation.h index b3c73d78..51adca8e 100644 --- a/src/optimization/Cancellation.h +++ b/src/optimization/Cancellation.h @@ -2,8 +2,5 @@ #include namespace trajopt { - std::atomic& GetCancellationFlag() { - static std::atomic flag; - return flag; - } + std::atomic& GetCancellationFlag(); } \ No newline at end of file