Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for clang-tidy update #955

Merged
merged 3 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions core/base/continuousScatterPlot/ContinuousScatterPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#pragma once

#include <array>
#include <limits>

// base code includes
Expand Down Expand Up @@ -61,12 +62,12 @@ namespace ttk {
return 0;
}

inline int setScalarMin(double *scalarMin) {
inline int setScalarMin(const std::array<double, 2> &scalarMin) {
scalarMin_ = scalarMin;
return 0;
}

inline int setScalarMax(double *scalarMax) {
inline int setScalarMax(const std::array<double, 2> &scalarMax) {
scalarMax_ = scalarMax;
return 0;
}
Expand All @@ -86,8 +87,8 @@ namespace ttk {
bool withDummyValue_;
double dummyValue_;
SimplexId resolutions_[2];
double *scalarMin_;
double *scalarMax_;
std::array<double, 2> scalarMin_{0, 0};
std::array<double, 2> scalarMax_{0, 0};
std::vector<std::vector<double>> *density_;
std::vector<std::vector<char>> *validPointMask_;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ int ttkContinuousScatterPlot::RequestData(vtkInformation *ttkNotUsed(request),
}
#endif

double scalarMin[2];
double scalarMax[2];
std::array<double, 2> scalarMin{0, 0};
std::array<double, 2> scalarMax{0, 0};
for(SimplexId k = 0; k < numberOfPoints; ++k) {
double d1 = inputScalars1->GetTuple1(k);
double d2 = inputScalars2->GetTuple1(k);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ int ttkImportEmbeddingFromTable::RequestData(
: vtkDataArray::SafeDownCast(
inputTable->GetColumnByName(ZColumn.data()));

#ifndef TTK_ENABLE_KAMIKAZE
if(xarr == nullptr or yarr == nullptr or zarr == nullptr) {
printErr("invalid input columns.");
return -1;
Expand All @@ -99,7 +98,6 @@ int ttkImportEmbeddingFromTable::RequestData(
printErr("input columns has different data types.");
return -1;
}
#endif

vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
points->SetNumberOfPoints(numberOfPoints);
Expand Down
Loading