aboutsummaryrefslogtreecommitdiff
path: root/src/common/Logging/LogOperation.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-10 14:51:29 +0200
committerOvahlord <dreadkiller@gmx.de>2024-07-11 19:06:51 +0200
commit4c4f5f0ae4c7ad01d846b62051959b2cab16f306 (patch)
tree6d08f61c95fe3d480dcb785e8bbd6495ffb9fc51 /src/common/Logging/LogOperation.h
parenta638c3690547e17c129abf2737c8ed6b0732a55f (diff)
Core/Logging: Removed one layer of allocations from log message writes (async doesn't wrap in shared_ptr anymore and sync creates LogMessage on the stack)
(cherry picked from commit 1cd7898c01b6cfcdcd0314a3d79bf8a86aa1e619)
Diffstat (limited to 'src/common/Logging/LogOperation.h')
-rw-r--r--src/common/Logging/LogOperation.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/Logging/LogOperation.h b/src/common/Logging/LogOperation.h
index 25dc075bd2f..0a642d56e12 100644
--- a/src/common/Logging/LogOperation.h
+++ b/src/common/Logging/LogOperation.h
@@ -24,14 +24,17 @@
class Logger;
struct LogMessage;
-class TC_COMMON_API LogOperation
+class LogOperation
{
public:
- LogOperation(Logger const* _logger, std::unique_ptr<LogMessage>&& _msg);
-
+ LogOperation(Logger const* _logger, LogMessage* _msg);
+ LogOperation(LogOperation const&) = delete;
+ LogOperation(LogOperation&&) noexcept = default;
+ LogOperation& operator=(LogOperation const&) = delete;
+ LogOperation& operator=(LogOperation&&) noexcept = default;
~LogOperation();
- int call();
+ void operator()() const;
protected:
Logger const* logger;