From 2c4128d7434c8f4e0d11d394d020b4e72df9d131 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Thu, 17 Oct 2024 17:29:58 -0400 Subject: [PATCH] COMP: Fix msvc compiler warnings Signed-off-by: Michael Jackson --- .../src/SimplnxCore/Filters/Algorithms/CreateAMScanPaths.cpp | 2 +- .../src/SimplnxCore/Filters/CreateDataArrayAdvancedFilter.cpp | 2 +- .../SimplnxCore/src/SimplnxCore/Filters/DBSCANFilter.cpp | 2 +- src/Plugins/SimplnxCore/test/DBSCANTest.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/CreateAMScanPaths.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/CreateAMScanPaths.cpp index ee4795e840..53178a7c09 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/CreateAMScanPaths.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/CreateAMScanPaths.cpp @@ -347,7 +347,7 @@ Result<> CreateAMScanPaths::operator()() char good = determineIntersectCoord(p1, p2, vert1, vert2, coord); if(good == 'i') { - intersectionCoords.insert(std::pair(coord, 0)); + intersectionCoords.insert(std::pair(coord, 0ULL)); } else if(good == 'c' || good == 'd') { diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CreateDataArrayAdvancedFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CreateDataArrayAdvancedFilter.cpp index 6fac32e9e0..ddd1c860b7 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CreateDataArrayAdvancedFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CreateDataArrayAdvancedFilter.cpp @@ -192,7 +192,7 @@ IFilter::PreflightResult CreateDataArrayAdvancedFilter::preflightImpl(const Data usize numComponents = std::accumulate(compDims.begin(), compDims.end(), static_cast(1), std::multiplies<>()); if(numComponents <= 0) { - std::string compDimsStr = std::accumulate(compDims.begin() + 1, compDims.end(), std::to_string(compDims[0]), [](const std::string& a, int b) { return a + " x " + std::to_string(b); }); + std::string compDimsStr = std::accumulate(compDims.begin() + 1ULL, compDims.end(), std::to_string(compDims[0]), [](const std::string& a, int b) { return a + " x " + std::to_string(b); }); return MakePreflightErrorResult( -78601, fmt::format("The chosen component dimensions ({}) results in 0 total components. Please choose component dimensions that result in a positive number of total components.", compDimsStr)); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/DBSCANFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/DBSCANFilter.cpp index 31bac09811..976a4503a5 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/DBSCANFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/DBSCANFilter.cpp @@ -76,7 +76,7 @@ Parameters DBSCANFilter::parameters() const params.insertSeparator(Parameters::Separator{"Input Parameter(s)"}); params.insert(std::make_unique(k_UsePrecaching_Key, "Use Precaching", "If true the algorithm will be significantly faster, but it requires more memory", true)); - params.insert(std::make_unique(k_Epsilon_Key, "Epsilon", "The epsilon-neighborhood around each point is queried", 0.0001)); + params.insert(std::make_unique(k_Epsilon_Key, "Epsilon", "The epsilon-neighborhood around each point is queried", 0.0001f)); params.insert(std::make_unique(k_MinPoints_Key, "Minimum Points", "The minimum number of points needed to form a 'dense region' (i.e., the minimum number of points needed to be called a cluster)", 2)); params.insert( diff --git a/src/Plugins/SimplnxCore/test/DBSCANTest.cpp b/src/Plugins/SimplnxCore/test/DBSCANTest.cpp index 154586a75a..fc85d31410 100644 --- a/src/Plugins/SimplnxCore/test/DBSCANTest.cpp +++ b/src/Plugins/SimplnxCore/test/DBSCANTest.cpp @@ -46,7 +46,7 @@ TEST_CASE("SimplnxCore::DBSCAN: Valid Filter Execution (Precached, Iterative)", // Create default Parameters for the filter. args.insertOrAssign(DBSCANFilter::k_InitTypeIndex_Key, std::make_any(to_underlying(AlgType::Iterative))); args.insertOrAssign(DBSCANFilter::k_UsePrecaching_Key, std::make_any(true)); - args.insertOrAssign(DBSCANFilter::k_Epsilon_Key, std::make_any(0.01)); + args.insertOrAssign(DBSCANFilter::k_Epsilon_Key, std::make_any(0.01f)); args.insertOrAssign(DBSCANFilter::k_MinPoints_Key, std::make_any(50)); args.insertOrAssign(DBSCANFilter::k_UseMask_Key, std::make_any(false)); args.insertOrAssign(DBSCANFilter::k_SelectedArrayPath_Key, std::make_any(k_TargetArrayPath));