diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-25 16:32:39 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-06-01 12:08:38 +0300 |
commit | 95c1ff8eb61e6289c124008e7518b82821322eb6 (patch) | |
tree | 6f2e45e7c51f3f6d5bafa250b228054c9e1313bb | |
parent | 5517ffbff68709c54aea17b938aa3415b1f63b0b (diff) |
libcamera: base: log: Remove unnecessary local variable
The output local variable in Logger::logSetTarget() isn't necessary.
Remove it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
-rw-r--r-- | src/libcamera/base/log.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 64813b66..df84ba4e 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -477,15 +477,11 @@ int Logger::logSetStream(std::ostream *stream) */ int Logger::logSetTarget(enum LoggingTarget target) { - std::shared_ptr<LogOutput> output; - switch (target) { case LoggingTargetSyslog: - output = std::make_shared<LogOutput>(); - std::atomic_store(&output_, output); + std::atomic_store(&output_, std::make_shared<LogOutput>()); break; case LoggingTargetNone: - output = nullptr; std::atomic_store(&output_, std::shared_ptr<LogOutput>()); break; default: |