diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-28 00:50:47 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-28 00:50:47 +1000 |
commit | efa38723961fb8003577c6589fc2b7032195235c (patch) | |
tree | ad7f8318872b91f23a47fe3e34124a5a0525ab7c /source/core/StarLogging.cpp | |
parent | 152af876550ec63bac9d7aa27b1994268c80f878 (diff) |
Don't do spatial logging on the server
Diffstat (limited to 'source/core/StarLogging.cpp')
-rw-r--r-- | source/core/StarLogging.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/core/StarLogging.cpp b/source/core/StarLogging.cpp index 55cd27d..b80ae6a 100644 --- a/source/core/StarLogging.cpp +++ b/source/core/StarLogging.cpp @@ -179,10 +179,15 @@ Deque<SpatialLogger::LogText> SpatialLogger::getText(char const* space, bool and } void SpatialLogger::clear() { - MutexLocker locker(s_mutex); - s_lines.clear(); - s_points.clear(); - s_logText.clear(); + decltype(s_lines) lines; + decltype(s_points) points; + decltype(s_logText) logText; + { + MutexLocker locker(s_mutex); + lines = move(s_lines); + points = move(s_points); + logText = move(s_logText); + } // Move while locked to deallocate contents while unlocked. } Mutex SpatialLogger::s_mutex; |