##// END OF EJS Templates
Removes compilation warnings (with Meson)
Alexandre Leroux -
r1004:15899f42a907
parent child
Show More
@@ -74,7 +74,7 struct SortUtils {
74 auto sortedData = Container{};
74 auto sortedData = Container{};
75 sortedData.reserve(containerSize);
75 sortedData.reserve(containerSize);
76
76
77 for (auto i = 0, componentIndex = 0, permutationIndex = 0; i < containerSize;
77 for (auto i = 0u, componentIndex = 0u, permutationIndex = 0u; i < containerSize;
78 ++i, componentIndex = i % nbValues, permutationIndex = i / nbValues) {
78 ++i, componentIndex = i % nbValues, permutationIndex = i / nbValues) {
79 auto insertIndex = sortPermutation.at(permutationIndex) * nbValues + componentIndex;
79 auto insertIndex = sortPermutation.at(permutationIndex) * nbValues + componentIndex;
80 sortedData.push_back(container.at(insertIndex));
80 sortedData.push_back(container.at(insertIndex));
@@ -22,6 +22,7 class Variable;
22 class SCIQLOP_CORE_EXPORT VariableCacheStrategy {
22 class SCIQLOP_CORE_EXPORT VariableCacheStrategy {
23
23
24 public:
24 public:
25 virtual ~VariableCacheStrategy() noexcept = default;
25 virtual std::pair<SqpRange, SqpRange> computeRange(const SqpRange &vRange,
26 virtual std::pair<SqpRange, SqpRange> computeRange(const SqpRange &vRange,
26 const SqpRange &rangeRequested)
27 const SqpRange &rangeRequested)
27 = 0;
28 = 0;
@@ -37,6 +37,8 public:
37 qCCritical(LOG_VariableCacheStrategyFactory())
37 qCCritical(LOG_VariableCacheStrategyFactory())
38 << QObject::tr("Unknown cache strategy");
38 << QObject::tr("Unknown cache strategy");
39 }
39 }
40
41 return nullptr;
40 }
42 }
41 };
43 };
42
44
@@ -9,7 +9,6 core_moc_headers = [
9 'include/Variable/VariableCacheController.h',
9 'include/Variable/VariableCacheController.h',
10 'include/Variable/VariableController.h',
10 'include/Variable/VariableController.h',
11 'include/Variable/VariableAcquisitionWorker.h',
11 'include/Variable/VariableAcquisitionWorker.h',
12 'include/Variable/VariableCacheStrategy.h',
13 'include/Variable/VariableSynchronizationGroup.h',
12 'include/Variable/VariableSynchronizationGroup.h',
14 'include/Variable/VariableModel.h',
13 'include/Variable/VariableModel.h',
15 'include/Visualization/VisualizationController.h'
14 'include/Visualization/VisualizationController.h'
@@ -65,8 +65,6 std::pair<double, double> OptionalAxis::bounds() const
65 return SortUtils::maxCompareWithNaN(it1.first(), it2.first());
65 return SortUtils::maxCompareWithNaN(it1.first(), it2.first());
66 });
66 });
67
67
68 auto pair = std::make_pair(minIt->first(), maxIt->first());
69
70 return std::make_pair(minIt->first(), maxIt->first());
68 return std::make_pair(minIt->first(), maxIt->first());
71 }
69 }
72 }
70 }
@@ -29,7 +29,7 std::vector<double> flatten(std::vector<double> xValues, std::vector<double> yVa
29
29
30 auto result = std::vector<double>();
30 auto result = std::vector<double>();
31 result.reserve(xValues.size() * 3);
31 result.reserve(xValues.size() * 3);
32 for (int i = 0; i < xValues.size(); i++) {
32 for (auto i = 0u; i < xValues.size(); ++i) {
33 result.push_back(xValues[i]);
33 result.push_back(xValues[i]);
34 result.push_back(yValues[i]);
34 result.push_back(yValues[i]);
35 result.push_back(zValues[i]);
35 result.push_back(zValues[i]);
@@ -358,6 +358,9 VariableController::createVariable(const QString &name, const QVariantHash &meta
358
358
359 return newVariable;
359 return newVariable;
360 }
360 }
361
362 qCCritical(LOG_VariableController()) << tr("Impossible to create variable");
363 return nullptr;
361 }
364 }
362
365
363 void VariableController::onDateTimeOnSelection(const SqpRange &dateTime)
366 void VariableController::onDateTimeOnSelection(const SqpRange &dateTime)
@@ -146,7 +146,9 void VariableModel::deleteVariable(std::shared_ptr<Variable> variable) noexcept
146
146
147 std::shared_ptr<Variable> VariableModel::variable(int index) const
147 std::shared_ptr<Variable> VariableModel::variable(int index) const
148 {
148 {
149 return (index >= 0 && index < impl->m_Variables.size()) ? impl->m_Variables[index] : nullptr;
149 return (index >= 0u && static_cast<size_t>(index) < impl->m_Variables.size())
150 ? impl->m_Variables[index]
151 : nullptr;
150 }
152 }
151
153
152 std::vector<std::shared_ptr<Variable> > VariableModel::variables() const
154 std::vector<std::shared_ptr<Variable> > VariableModel::variables() const
@@ -14,7 +14,7 void validateRange(DataSeriesIterator first, DataSeriesIterator last, const Data
14 {
14 {
15 QVERIFY(std::equal(first, last, xData.cbegin(), xData.cend(),
15 QVERIFY(std::equal(first, last, xData.cbegin(), xData.cend(),
16 [](const auto &it, const auto &expectedX) { return it.x() == expectedX; }));
16 [](const auto &it, const auto &expectedX) { return it.x() == expectedX; }));
17 for (auto i = 0; i < valuesData.size(); ++i) {
17 for (auto i = 0u; i < valuesData.size(); ++i) {
18 auto componentData = valuesData.at(i);
18 auto componentData = valuesData.at(i);
19
19
20 QVERIFY(std::equal(
20 QVERIFY(std::equal(
@@ -21,8 +21,8 InputData flatten(const Container &container)
21 auto result = DataContainer{};
21 auto result = DataContainer{};
22 result.reserve(componentSize * containerSize);
22 result.reserve(componentSize * containerSize);
23
23
24 for (auto i = 0; i < componentSize; ++i) {
24 for (auto i = 0u; i < componentSize; ++i) {
25 for (auto j = 0; j < containerSize; ++j) {
25 for (auto j = 0u; j < containerSize; ++j) {
26 result.push_back(container.at(j).at(i));
26 result.push_back(container.at(j).at(i));
27 }
27 }
28 }
28 }
@@ -40,7 +40,7 void verifyArrayData(const ArrayData<2> &arrayData, const Container &expectedDat
40 }));
40 }));
41 };
41 };
42
42
43 for (auto i = 0; i < expectedData.size(); ++i) {
43 for (auto i = 0u; i < expectedData.size(); ++i) {
44 verifyComponent(expectedData.at(i), [i](const auto &seriesIt, const auto &value) {
44 verifyComponent(expectedData.at(i), [i](const auto &seriesIt, const auto &value) {
45 return seriesIt.at(i) == value;
45 return seriesIt.at(i) == value;
46 });
46 });
@@ -1,17 +1,14
1
1
2 gui_moc_headers = [
2 gui_moc_headers = [
3 'include/DataSource/DataSourceWidget.h',
3 'include/DataSource/DataSourceWidget.h',
4 'include/DataSource/DataSourceTreeWidget.h',
5 'include/Settings/SqpSettingsDialog.h',
4 'include/Settings/SqpSettingsDialog.h',
6 'include/Settings/SqpSettingsGeneralWidget.h',
5 'include/Settings/SqpSettingsGeneralWidget.h',
7 'include/SidePane/SqpSidePane.h',
6 'include/SidePane/SqpSidePane.h',
8 'include/SqpApplication.h',
7 'include/SqpApplication.h',
9 'include/DragAndDrop/DragDropHelper.h',
10 'include/DragAndDrop/DragDropScroller.h',
8 'include/DragAndDrop/DragDropScroller.h',
11 'include/DragAndDrop/DragDropTabSwitcher.h',
9 'include/DragAndDrop/DragDropTabSwitcher.h',
12 'include/TimeWidget/TimeWidget.h',
10 'include/TimeWidget/TimeWidget.h',
13 'include/Variable/VariableInspectorWidget.h',
11 'include/Variable/VariableInspectorWidget.h',
14 'include/Variable/VariableInspectorTableView.h',
15 'include/Variable/RenameVariableDialog.h',
12 'include/Variable/RenameVariableDialog.h',
16 'include/Visualization/qcustomplot.h',
13 'include/Visualization/qcustomplot.h',
17 'include/Visualization/VisualizationGraphWidget.h',
14 'include/Visualization/VisualizationGraphWidget.h',
@@ -17,9 +17,9 class SqpApplication::SqpApplicationPrivate {
17 public:
17 public:
18 SqpApplicationPrivate()
18 SqpApplicationPrivate()
19 : m_DataSourceController{std::make_unique<DataSourceController>()},
19 : m_DataSourceController{std::make_unique<DataSourceController>()},
20 m_NetworkController{std::make_unique<NetworkController>()},
21 m_TimeController{std::make_unique<TimeController>()},
22 m_VariableController{std::make_unique<VariableController>()},
20 m_VariableController{std::make_unique<VariableController>()},
21 m_TimeController{std::make_unique<TimeController>()},
22 m_NetworkController{std::make_unique<NetworkController>()},
23 m_VisualizationController{std::make_unique<VisualizationController>()},
23 m_VisualizationController{std::make_unique<VisualizationController>()},
24 m_DragDropHelper{std::make_unique<DragDropHelper>()}
24 m_DragDropHelper{std::make_unique<DragDropHelper>()}
25 {
25 {
@@ -17,9 +17,9 struct GenerateVariableMenuOperation::GenerateVariableMenuOperationPrivate {
17 QMenu *menu, std::shared_ptr<Variable> variable,
17 QMenu *menu, std::shared_ptr<Variable> variable,
18 std::set<IVisualizationWidget *> variableContainers)
18 std::set<IVisualizationWidget *> variableContainers)
19 : m_Variable{variable},
19 : m_Variable{variable},
20 m_VariableContainers{std::move(variableContainers)},
20 m_PlotMenuBuilder{menu},
21 m_PlotMenuBuilder{menu},
21 m_UnplotMenuBuilder{menu},
22 m_UnplotMenuBuilder{menu}
22 m_VariableContainers{std::move(variableContainers)}
23 {
23 {
24 }
24 }
25
25
@@ -88,7 +88,7 void tryReadResult(std::vector<double> &xAxisData, std::vector<double> &valuesDa
88 auto lineData = line.split(RESULT_LINE_SEPARATOR, QString::SkipEmptyParts);
88 auto lineData = line.split(RESULT_LINE_SEPARATOR, QString::SkipEmptyParts);
89
89
90 // Checks that the line contains expected number of values + x-axis value
90 // Checks that the line contains expected number of values + x-axis value
91 if (lineData.size() == valuesIndexes.size() + 1) {
91 if (static_cast<size_t>(lineData.size()) == valuesIndexes.size() + 1) {
92 // X : the data is converted from date to double (in secs)
92 // X : the data is converted from date to double (in secs)
93 auto x = doubleDate(lineData.at(0));
93 auto x = doubleDate(lineData.at(0));
94
94
General Comments 0
You need to be logged in to leave comments. Login now