mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Fix warnings about uninitalized value
In some functors within Algorithm.h, the functor did not have a default constructor that initialized its fields. This could in turn lead to a warning about using it unitialized.
This commit is contained in:
parent
bddad9b386
commit
bcbad61002
@ -88,6 +88,11 @@ struct CopySubRangeFunctor
|
||||
{
|
||||
bool valid;
|
||||
|
||||
CopySubRangeFunctor()
|
||||
: valid(false)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Device, typename... Args>
|
||||
VTKM_CONT bool operator()(Device, Args&&... args)
|
||||
{
|
||||
@ -203,6 +208,11 @@ struct ScanExclusiveFunctor
|
||||
{
|
||||
T result;
|
||||
|
||||
ScanExclusiveFunctor()
|
||||
: result(T())
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Device, typename... Args>
|
||||
VTKM_CONT bool operator()(Device, Args&&... args)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user