diff --git a/YUViewLib/src/statistics/StatisticsFileCSV.cpp b/YUViewLib/src/statistics/StatisticsFileCSV.cpp index 845c85b43..29b0ec349 100644 --- a/YUViewLib/src/statistics/StatisticsFileCSV.cpp +++ b/YUViewLib/src/statistics/StatisticsFileCSV.cpp @@ -315,9 +315,9 @@ void StatisticsFileCSV::loadStatisticData(StatisticsData &statisticsData, int po this->blockOutsideOfFramePOC = poc; auto &statTypes = statisticsData.getStatisticsTypes(); - auto statIt = std::find_if(statTypes.begin(), - statTypes.end(), - [type](StatisticsType &t) { return t.typeID == type; }); + auto statIt = std::find_if(statTypes.begin(), statTypes.end(), [type](StatisticsType &t) { + return t.typeID == type; + }); Q_ASSERT_X(statIt != statTypes.end(), Q_FUNC_INFO, "Stat type not found."); if (vectorData && statIt->vectorDataOptions) @@ -398,11 +398,11 @@ void StatisticsFileCSV::readHeaderFromFile(StatisticsData &statisticsData) { if (rowItemList[4] == "map" || rowItemList[4] == "range") { - aType.valueDataOptions.emplace(); + aType.valueDataOptions = StatisticsType::ValueDataOptions(); } else if (rowItemList[4] == "vector" || rowItemList[4] == "line") { - aType.vectorDataOptions.emplace(); + aType.vectorDataOptions = StatisticsType::VectorDataOptions(); if (rowItemList[4] == "line") aType.vectorDataOptions->arrowHead = StatisticsType::ArrowHead::none; } diff --git a/YUViewLib/src/statistics/StatisticsType.h b/YUViewLib/src/statistics/StatisticsType.h index 78183a406..e18a59393 100644 --- a/YUViewLib/src/statistics/StatisticsType.h +++ b/YUViewLib/src/statistics/StatisticsType.h @@ -101,7 +101,7 @@ class StatisticsType { bool render{true}; bool scaleToBlockSize{}; - color::ColorMapper colorMapper; + color::ColorMapper colorMapper{}; }; std::optional valueDataOptions;