Skip to content

Commit 7c368a6

Browse files
authored
Merge pull request #6430 from hjmjohnson/remove-wno-deprecated
COMP: Remove default -Wno-deprecated from the ITK warning flags
2 parents 4928823 + cda73c4 commit 7c368a6

8 files changed

Lines changed: 29 additions & 9 deletions

File tree

CMake/ITKSetStandardCompilerFlags.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ function(check_compiler_warning_flags c_warning_flags_var cxx_warning_flags_var)
133133
# Check this list on C++ compiler only
134134
set(
135135
cxx_flags
136-
-Wno-deprecated
137136
-Wno-invalid-offsetof
138137
-Wno-undefined-var-template # suppress invalid warning when explicitly instantiated in another translation unit
139138
-Woverloaded-virtual

Modules/Core/Common/test/itkAggregateTypesGTest.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class CommonTests
133133
const AggregateType knownAll7s{ { 7, 7, 7, 7 } };
134134
const AggregateType knownAll6s{ { 6, 6, 6, 6 } };
135135

136-
EXPECT_EQ(std::is_pod_v<AggregateType>, true);
136+
EXPECT_EQ((std::is_standard_layout_v<AggregateType> && std::is_trivial_v<AggregateType>), true);
137137
EXPECT_EQ(AggregateType::Dimension, 4);
138138

139139
AggregateType index1 = { { 10, 20, 30, 40 } };
@@ -324,7 +324,7 @@ TEST(Specialized, IndexOffset)
324324

325325
TEST(Specialized, Index)
326326
{
327-
EXPECT_EQ(std::is_pod_v<itk::Index<13>>, true);
327+
EXPECT_EQ((std::is_standard_layout_v<itk::Index<13>> && std::is_trivial_v<itk::Index<13>>), true);
328328
EXPECT_EQ(itk::Index<2>::GetIndexDimension(), 2);
329329

330330
using IndexType = itk::Index<4>;
@@ -348,7 +348,7 @@ TEST(Specialized, Index)
348348
TEST(Specialized, Offset)
349349
{
350350

351-
EXPECT_EQ(std::is_pod_v<itk::Offset<13>>, true);
351+
EXPECT_EQ((std::is_standard_layout_v<itk::Offset<13>> && std::is_trivial_v<itk::Offset<13>>), true);
352352
EXPECT_EQ(itk::Offset<13>::GetOffsetDimension(), 13);
353353

354354
using OffsetType = itk::Offset<4>;
@@ -371,7 +371,7 @@ TEST(Specialized, Offset)
371371

372372
TEST(Specialized, Size)
373373
{
374-
EXPECT_EQ(std::is_pod_v<itk::Size<13>>, true);
374+
EXPECT_EQ((std::is_standard_layout_v<itk::Size<13>> && std::is_trivial_v<itk::Size<13>>), true);
375375
EXPECT_EQ(itk::Size<7>::GetSizeDimension(), 7);
376376

377377
using SizeType = itk::Size<4>;

Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class Point1D
4444

4545
Point1D(const Point1D & point) = default;
4646

47+
Point1D &
48+
operator=(const Point1D &) = default;
49+
4750
[[nodiscard]] double
4851
getX() const
4952
{

Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshIterator : public QuadEdgeMeshBaseIterator
243243

244244
QuadEdgeMeshIterator(const QuadEdgeMeshIterator &) = default;
245245

246+
Self &
247+
operator=(const Self &) = default;
248+
246249
~QuadEdgeMeshIterator() override = default;
247250

248251
QuadEdgeType *
@@ -281,6 +284,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshIteratorGeom : public QuadEdgeMeshIterator
281284

282285
QuadEdgeMeshIteratorGeom(const QuadEdgeMeshIteratorGeom &) = default;
283286

287+
QuadEdgeMeshIteratorGeom &
288+
operator=(const QuadEdgeMeshIteratorGeom &) = default;
289+
284290
OriginRefType
285291
operator*()
286292
{
@@ -314,6 +320,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstIterator : public QuadEdgeMeshBaseIte
314320

315321
QuadEdgeMeshConstIterator(const QuadEdgeMeshConstIterator &) = default;
316322

323+
Self &
324+
operator=(const Self &) = default;
325+
317326
~QuadEdgeMeshConstIterator() override = default;
318327

319328
Self &
@@ -361,6 +370,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstIteratorGeom : public QuadEdgeMeshCon
361370

362371
QuadEdgeMeshConstIteratorGeom(const QuadEdgeMeshConstIteratorGeom &) = default;
363372

373+
Self &
374+
operator=(const Self &) = default;
375+
364376
~QuadEdgeMeshConstIteratorGeom() override = default;
365377

366378
Self &

Modules/IO/GE/src/Ge5xHdr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,9 @@ enum GE_5X_SCAN_TYPE_ENUM
875875
enum GE_RELATIVE_STARTS
876876
{
877877
GENESIS_SU_HDR_START = 0,
878-
GENESIS_EX_HDR_START = GENESIS_SU_HDR_LEN,
879-
GENESIS_SE_HDR_START = GENESIS_EX_HDR_START + GENESIS_EX_HDR_LEN,
880-
GENESIS_IM_HDR_START = GENESIS_SE_HDR_START + GENESIS_SE_HDR_LEN,
878+
GENESIS_EX_HDR_START = static_cast<int>(GENESIS_SU_HDR_LEN),
879+
GENESIS_SE_HDR_START = GENESIS_EX_HDR_START + static_cast<int>(GENESIS_EX_HDR_LEN),
880+
GENESIS_IM_HDR_START = GENESIS_SE_HDR_START + static_cast<int>(GENESIS_SE_HDR_LEN),
881881
GENESIS_IMG_HDR_START = 0
882882
};
883883

Modules/IO/NIFTI/src/itkNiftiImageIO.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing
16651665
// Commonly the 4x4 double precision dicom information is stored in
16661666
// the 4x4 single precision sform fields, and that original representation
16671667
// is converted (with lossy conversion) into the qform representation.
1668-
const bool qform_sform_are_similar = [=]() -> bool {
1668+
const bool qform_sform_are_similar = [this]() -> bool {
16691669
const vnl_matrix_fixed<float, 4, 4> sto_xyz{ &(m_Holder->ptr->sto_xyz.m[0][0]) };
16701670
const vnl_matrix_fixed<float, 4, 4> qto_xyz{ &(m_Holder->ptr->qto_xyz.m[0][0]) };
16711671

Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmDataSet.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ class GDCM_EXPORT DataSet
227227
/// Returns if the dataset is empty
228228
bool IsEmpty() const { return DES.empty(); }
229229

230+
DataSet() = default;
231+
232+
DataSet(DataSet const &) = default;
233+
230234
DataSet& operator=(DataSet const &)
231235
= default;
232236

Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmItem.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ class GDCM_EXPORT Item : public DataElement
9393
NestedDataSet = val.NestedDataSet;
9494
}
9595

96+
Item& operator=(Item const &) = default;
97+
9698
template <typename TDE, typename TSwap>
9799
std::istream &Read(std::istream &is) {
98100
// Superclass

0 commit comments

Comments
 (0)