fix GCC 13 issues
The latest version of GCC raises two issues:
- cstdint is not included automatically as often so we need to
explicitly include it whenever using `uint*` class types.
- Certain move operations are detected as unnecessary and subverting
RVO.
Fix both of these issues.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4124c91c8e5cce3b85a6284d3cc8dfc2a8494a76
diff --git a/names_values.hpp b/names_values.hpp
index c33c507..147c603 100644
--- a/names_values.hpp
+++ b/names_values.hpp
@@ -1,4 +1,5 @@
#pragma once
+#include <cstdint>
#include <sstream>
#include <string>
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index bf9bfa8..d7dee85 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -811,8 +811,8 @@
auto changed = recordManager->add(data);
if (changed)
{
- average->values(std::move(recordManager->getAverageRecords()));
- maximum->values(std::move(recordManager->getMaximumRecords()));
+ average->values(recordManager->getAverageRecords());
+ maximum->values(recordManager->getMaximumRecords());
}
}