File tree Expand file tree Collapse file tree 3 files changed +6
-18
lines changed
Modules/Core/Common/include Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change 19
19
#define itkFixedArray_h
20
20
21
21
#include " itkMacro.h"
22
+ #include " itkMakeFilled.h"
22
23
#include < algorithm>
23
24
#include < array>
24
25
@@ -423,12 +424,7 @@ class ITK_TEMPLATE_EXPORT FixedArray
423
424
static constexpr FixedArray
424
425
Filled (const ValueType & value)
425
426
{
426
- FixedArray result{};
427
- for (ValueType & element : result.m_InternalArray )
428
- {
429
- element = value;
430
- }
431
- return result;
427
+ return MakeFilled<FixedArray>(value);
432
428
}
433
429
};
434
430
Original file line number Diff line number Diff line change 18
18
#ifndef itkIndex_h
19
19
#define itkIndex_h
20
20
21
+ #include " itkMakeFilled.h"
21
22
#include " itkOffset.h"
22
23
#include < type_traits> // For is_integral.
23
24
@@ -484,12 +485,7 @@ struct ITK_TEMPLATE_EXPORT Index final
484
485
static constexpr Self
485
486
Filled (const IndexValueType value)
486
487
{
487
- Self result{};
488
- for (IndexValueType & indexValue : result.m_InternalArray )
489
- {
490
- indexValue = value;
491
- }
492
- return result;
488
+ return MakeFilled<Self>(value);
493
489
}
494
490
495
491
Original file line number Diff line number Diff line change 20
20
21
21
#include " itkIntTypes.h"
22
22
#include " itkMacro.h"
23
+ #include " itkMakeFilled.h"
23
24
#include < algorithm> // For copy_n.
24
25
#include < type_traits> // For is_integral.
25
26
#include < memory>
@@ -406,12 +407,7 @@ struct ITK_TEMPLATE_EXPORT Size final
406
407
static constexpr Self
407
408
Filled (const SizeValueType value)
408
409
{
409
- Self result{};
410
- for (SizeValueType & sizeValue : result.m_InternalArray )
411
- {
412
- sizeValue = value;
413
- }
414
- return result;
410
+ return MakeFilled<Self>(value);
415
411
}
416
412
417
413
}; // ------------ End struct Size
You can’t perform that action at this time.
0 commit comments