Skip to content
Snippets Groups Projects
Commit 86ac27f4 authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov
Browse files

Fix warnings.

warning C4244: conversion from 'const double' to 'const size_t'
warning C4800: 'MeshLib::PropertyVector<int> *' : forcing value to bool
parent b58b5315
No related branches found
No related tags found
No related merge requests found
......@@ -102,10 +102,11 @@ TEST_F(TestVtkMeshConverter, Conversion)
auto meshProperties = mesh->getProperties();
// MaterialIDs are converted to an int property
auto materialIds = meshProperties.getPropertyVector<int>("MaterialIDs");
ASSERT_TRUE(static_cast<bool>(materialIds));
auto const* const materialIds =
meshProperties.getPropertyVector<int>("MaterialIDs");
ASSERT_NE(nullptr, materialIds);
auto vtkMaterialIds = vtu->GetCellData()->GetArray("MaterialIDs");
ASSERT_EQ((*materialIds).size(), vtkMaterialIds->GetNumberOfTuples());
for(std::size_t i = 0; i < (*materialIds).size(); i++)
ASSERT_EQ(materialIds->size(), vtkMaterialIds->GetNumberOfTuples());
for(std::size_t i = 0; i < materialIds->size(); i++)
ASSERT_EQ((*materialIds)[i], vtkMaterialIds->GetTuple1(i));
}
......@@ -48,11 +48,11 @@ struct DOFTableData
NumLib::LocalToGlobalIndexMap const dof_table;
private:
static const double mesh_length;
static const double mesh_elements_in_each_direction;
static const std::size_t mesh_length;
static const std::size_t mesh_elements_in_each_direction;
};
const double DOFTableData::mesh_length = 1.0;
const double DOFTableData::mesh_elements_in_each_direction = 5.0;
const std::size_t DOFTableData::mesh_length = 1;
const std::size_t DOFTableData::mesh_elements_in_each_direction = 5;
template <typename AccumulateCallback, typename AccumulateFinishCallback>
void do_test(unsigned const num_components,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment