Skip to content

Commit

Permalink
GRIDEDIT-1546 Removed some commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
BillSenior committed Nov 26, 2024
1 parent 544f088 commit 0bbf445
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions libs/MeshKernelApi/src/MeshKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ namespace meshkernelapi
return propertyMap;
}

/// @brief Map of property calculators, from an property identifier to the calculator.
static std::map<int, std::unique_ptr<PropertyCalculator>> propertyCalculators = allocatePropertyCalculators();

static meshkernel::ExitCode HandleException(std::exception_ptr exception_ptr = std::current_exception())
Expand Down Expand Up @@ -1534,10 +1535,6 @@ namespace meshkernelapi
{
propertyCalculators[propertyValue]->Calculate(meshKernelState.at(meshKernelId), geometryList);
}
// if (propertyCalculators.contains(propertyValue) && propertyCalculators[propertyValue] != nullptr)
// {
// propertyCalculators[propertyValue]->Calculate(meshKernelId, geometryList);
// }
else
{
throw meshkernel::MeshKernelError("Property not supported");
Expand All @@ -1553,6 +1550,8 @@ namespace meshkernelapi
MKERNEL_API int mkernel_mesh2d_get_property_dimension(int meshKernelId, int propertyValue, int& dimension)
{
lastExitCode = meshkernel::ExitCode::Success;
dimension = -1;

try
{
if (!meshKernelState.contains(meshKernelId))
Expand All @@ -1567,8 +1566,6 @@ namespace meshkernelapi
return lastExitCode;
}

dimension = -1;

if (propertyCalculators.contains(propertyValue) && propertyCalculators[propertyValue] != nullptr)
{
dimension = propertyCalculators[propertyValue]->Size(meshKernelState.at(meshKernelId));
Expand Down Expand Up @@ -1602,10 +1599,12 @@ namespace meshkernelapi

const auto result = meshKernelState[meshKernelId].m_mesh2d->GetSmoothness();

for (auto i = 0; i < geometryList.num_coordinates; ++i)
{
geometryList.values[i] = result[i];
}
std::copy (result.begin (), result.end (), geometryList.values);

// for (auto i = 0; i < geometryList.num_coordinates; ++i)
// {
// geometryList.values[i] = result[i];
// }
}
catch (...)
{
Expand Down

0 comments on commit 0bbf445

Please sign in to comment.