Skip to content

Commit

Permalink
COMP: Fix VS compiler warnings (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
imikejackson authored Feb 12, 2024
1 parent c16c9d5 commit a55bf29
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Result<> ExtractVertexGeometry::operator()()
VertexGeom& vertexGeometry = m_DataStructure.getDataRefAs<VertexGeom>(m_InputValues->VertexGeometryPath);

SizeVec3 dims = inputGeometry.getDimensions();
const usize cellCount = std::accumulate(dims.begin(), dims.end(), static_cast<usize>(1ULL), std::multiplies<>());
const usize cellCount = std::accumulate(dims.begin(), dims.end(), static_cast<usize>(1), std::multiplies<>());
usize totalCells = cellCount; // We save this here because it may change based on the use_mask flag.
usize vertexCount = cellCount;
DataPath vertexAttributeMatrixDataPath = vertexGeometry.getVertexAttributeMatrixDataPath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,13 @@ IFilter::PreflightResult ReadCSVFileFilter::preflightImpl(const DataStructure& d

// Create the arrays
std::vector<usize> tupleDims(readCSVData.tupleDims.size());
std::transform(readCSVData.tupleDims.begin(), readCSVData.tupleDims.end(), tupleDims.begin(), [](float64 d) { return static_cast<usize>(d); });
std::transform(readCSVData.tupleDims.begin(), readCSVData.tupleDims.end(), tupleDims.begin(), [](usize d) { return d; });
if(useExistingAM)
{
const AttributeMatrix& am = dataStructure.getDataRefAs<AttributeMatrix>(groupPath);
tupleDims = am.getShape();

auto totalLinesRead = std::accumulate(tupleDims.begin(), tupleDims.end(), 1UL, std::multiplies<>());
auto totalLinesRead = std::accumulate(tupleDims.begin(), tupleDims.end(), static_cast<usize>(1), std::multiplies<>());

std::string msg = fmt::format("The Array Tuple Dimensions ({}) will be ignored and the Existing Attribute Matrix tuple dimensions ({}) will be used. The total number of lines read will be {}.",
fmt::join(readCSVData.tupleDims, "x"), fmt::join(tupleDims, "x"), totalLinesRead);
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/SimplnxCore/test/ReadHDF5DatasetTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void writePointerArrayDataset(nx::core::HDF5::GroupWriter& ptrGroupWriter)
dims = {10, 8, 6, (COMPDIMPROD * TUPLEDIMPROD) / 10 / 8 / 6};
}

hsize_t tSize = std::accumulate(dims.cbegin(), dims.cend(), 1UL, std::multiplies<hsize_t>());
hsize_t tSize = std::accumulate(dims.cbegin(), dims.cend(), static_cast<usize>(1), std::multiplies<hsize_t>());
std::vector<T> data(tSize);
for(hsize_t i = 0; i < tSize; ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Plugins/SimplnxCore/test/SurfaceNetsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ TEST_CASE("SimplnxCore::SurfaceNetsFilter: With Smoothing", "[SimplnxCore][Surfa
// Create default Parameters for the filter.

args.insertOrAssign(SurfaceNetsFilter::k_ApplySmoothing_Key, std::make_any<bool>(true));
args.insertOrAssign(SurfaceNetsFilter::k_MaxDistanceFromVoxelCenter_Key, std::make_any<float32>(1.0));
args.insertOrAssign(SurfaceNetsFilter::k_RelaxationFactor_Key, std::make_any<float32>(0.5));
args.insertOrAssign(SurfaceNetsFilter::k_MaxDistanceFromVoxelCenter_Key, std::make_any<float32>(1.0f));
args.insertOrAssign(SurfaceNetsFilter::k_RelaxationFactor_Key, std::make_any<float32>(0.5f));

const DataPath gridGeomDataPath({k_DataContainer});
args.insertOrAssign(SurfaceNetsFilter::k_GridGeometryDataPath_Key, std::make_any<DataPath>(gridGeomDataPath));
Expand Down

0 comments on commit a55bf29

Please sign in to comment.