Fix ICC warnings.

ICC can be pretty thorough about finding unused elements. In this case
it was picking up an unused method in instances of a templated class
in an anonymous namespace. It was a method that should be there due to
the nature of the class, but it happened to not be used (which was OK,
too). To get around the problem, I just added some use of that method
in another method.
This commit is contained in:
Kenneth Moreland 2014-10-23 10:59:18 -06:00
parent 51e3b2bb1d
commit 343c12b500
2 changed files with 7 additions and 1 deletions

@ -38,7 +38,11 @@ struct TestPortal
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
VTKM_EXEC_CONT_EXPORT
ValueType Get(vtkm::Id index) const { return TestValue(index, ValueType()); }
ValueType Get(vtkm::Id index) const {
VTKM_TEST_ASSERT(index >= 0, "Bad portal index.");
VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index.");
return TestValue(index, ValueType());
}
};
struct NullParam { };

@ -41,6 +41,8 @@ struct TestPortal
VTKM_EXEC_CONT_EXPORT
void Set(vtkm::Id index, const ValueType &value) const {
VTKM_TEST_ASSERT(index >= 0, "Bad portal index.");
VTKM_TEST_ASSERT(index < this->GetNumberOfValues(), "Bad portal index.");
VTKM_TEST_ASSERT(test_equal(value, TestValue(index, ValueType())),
"Tried to set invalid value.");
g_NumSets++;