From bee140c0dc59b3139434cb8521764a8a98842a93 Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Wed, 3 Jul 2024 15:07:51 -0400 Subject: [PATCH] Fix warnings from eicshell --- src/libraries/JANA/JLogger.h | 5 +++-- src/programs/unit_tests/Components/PodioTests.cc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libraries/JANA/JLogger.h b/src/libraries/JANA/JLogger.h index e53642863..189f5941e 100644 --- a/src/libraries/JANA/JLogger.h +++ b/src/libraries/JANA/JLogger.h @@ -58,6 +58,7 @@ struct JLogMessage { JLogger::Level level; std::ostringstream builder; + JLogMessage(const JLogger& logger = default_cout_logger, JLogger::Level level = JLogger::Level::INFO) : logger(logger), level(level) { @@ -84,10 +85,10 @@ struct JLogMessage { /// Stream operators template -inline JLogMessage&& operator<<(JLogger& l, const T& t) { +inline JLogMessage operator<<(JLogger& l, const T& t) { JLogMessage m(l); m.builder << t; - return std::move(m); + return m; } template diff --git a/src/programs/unit_tests/Components/PodioTests.cc b/src/programs/unit_tests/Components/PodioTests.cc index f1948b570..8e18f381c 100644 --- a/src/programs/unit_tests/Components/PodioTests.cc +++ b/src/programs/unit_tests/Components/PodioTests.cc @@ -11,8 +11,8 @@ namespace podiotests { TEST_CASE("PodioTestsInsertAndRetrieve") { ExampleClusterCollection clusters_to_insert; - clusters_to_insert.push_back(MutableExampleCluster({16.0})); - clusters_to_insert.push_back(MutableExampleCluster({128.0})); + clusters_to_insert.push_back(MutableExampleCluster(16.0)); + clusters_to_insert.push_back(MutableExampleCluster(128.0)); auto event = std::make_shared(); event->InsertCollection(std::move(clusters_to_insert), "clusters");