added Enabled to AddReportFutureVersion API

- New parameter added to API
- Changed API to be more flexible in the future

Tested:
- Unit tests are passing
- Tested together with:
  https://gerrit.openbmc.org/c/openbmc/bmcweb/+/49796/23
  POST, PATCH, PUT for MetricReportDefinitions are working correctly

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: Ic988446d283a581dc6866418b1b27a989c3bc9a0
diff --git a/src/report.cpp b/src/report.cpp
index 9ee60a4..c2a0371 100644
--- a/src/report.cpp
+++ b/src/report.cpp
@@ -204,12 +204,11 @@
 
 void Report::setReadingBuffer(const ReportUpdates newReportUpdates)
 {
-    if (reportingType != ReportingType::onRequest &&
-        (reportUpdates == ReportUpdates::overwrite ||
-         newReportUpdates == ReportUpdates::overwrite))
+    const auto newBufferSize =
+        deduceBufferSize(newReportUpdates, reportingType);
+    if (readingsBuffer.size() != newBufferSize)
     {
-        readingsBuffer.clearAndResize(
-            deduceBufferSize(newReportUpdates, reportingType));
+        readingsBuffer.clearAndResize(newBufferSize);
     }
 }