From e306d762bb471d8bf35267817934a7adbda77fbd Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 10 Jul 2023 16:38:52 -0400 Subject: [PATCH 1/4] merge develop/sync_externals --- externals/coda-oss/modules/c++/coda-oss.vcxproj | 1 - externals/coda-oss/modules/c++/pch.h | 1 - externals/nitro/Test++/Test++.vcxproj | 6 ------ externals/nitro/Test/Test.vcxproj | 6 ------ externals/nitro/modules/c++/nitf-c++.vcxproj | 6 ------ .../modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj | 6 ------ externals/nitro/modules/c/j2k/J2KCompress.vcxproj | 6 ------ externals/nitro/modules/c/j2k/J2KDecompress.vcxproj | 6 ------ externals/nitro/modules/c/nitf-c.vcxproj | 6 ------ externals/nitro/modules/c/nitf/ACCHZB.vcxproj | 6 ------ externals/nitro/modules/c/nitf/ACCPOB.vcxproj | 6 ------ externals/nitro/modules/c/nitf/ACFTA.vcxproj | 6 ------ externals/nitro/modules/c/nitf/AIMIDB.vcxproj | 6 ------ externals/nitro/modules/c/nitf/CSCRNA.vcxproj | 6 ------ externals/nitro/modules/c/nitf/CSEXRB.vcxproj | 6 ------ externals/nitro/modules/c/nitf/ENGRDA.vcxproj | 6 ------ externals/nitro/modules/c/nitf/HISTOA.vcxproj | 6 ------ externals/nitro/modules/c/nitf/JITCID.vcxproj | 6 ------ externals/nitro/modules/c/nitf/PTPRAA.vcxproj | 6 ------ externals/nitro/modules/c/nitf/RPFHDR.vcxproj | 6 ------ externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj | 6 ------ .../c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h | 4 +++- 22 files changed, 3 insertions(+), 117 deletions(-) diff --git a/externals/coda-oss/modules/c++/coda-oss.vcxproj b/externals/coda-oss/modules/c++/coda-oss.vcxproj index e35e63f9b3..92ae5f065f 100644 --- a/externals/coda-oss/modules/c++/coda-oss.vcxproj +++ b/externals/coda-oss/modules/c++/coda-oss.vcxproj @@ -587,7 +587,6 @@ true AdvancedVectorExtensions2 true - stdcpp17 diff --git a/externals/coda-oss/modules/c++/pch.h b/externals/coda-oss/modules/c++/pch.h index 5cca8aa101..f39484bc24 100644 --- a/externals/coda-oss/modules/c++/pch.h +++ b/externals/coda-oss/modules/c++/pch.h @@ -46,7 +46,6 @@ CODA_OSS_disable_warning_pop #pragma warning(disable: 6011) // Dereferencing NULL pointer '...'. #pragma warning(disable: 6313) // Incorrect operator. Use an equality test to check for zero-valued flags. #pragma warning(disable: 6389) // Move '...' to anonymous namespace or put a forward declaration in a common header included in this file. -#pragma warning(disable: 4866) // compiler may not enforce left-to-right evaluation order for call to '...' #pragma warning(disable: 26432) // If you define or delete any default operation in the type '...', define or delete them all (c.21). #pragma warning(disable: 26429) // Symbol '...' is never tested for nullness, it can be marked as not_null (f.23). diff --git a/externals/nitro/Test++/Test++.vcxproj b/externals/nitro/Test++/Test++.vcxproj index 956d9b5995..19fff43f6b 100644 --- a/externals/nitro/Test++/Test++.vcxproj +++ b/externals/nitro/Test++/Test++.vcxproj @@ -69,9 +69,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true Windows @@ -94,9 +91,6 @@ true true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true Windows diff --git a/externals/nitro/Test/Test.vcxproj b/externals/nitro/Test/Test.vcxproj index 0d826bcb26..3f37235948 100644 --- a/externals/nitro/Test/Test.vcxproj +++ b/externals/nitro/Test/Test.vcxproj @@ -69,9 +69,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true Windows @@ -94,9 +91,6 @@ true true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true Windows diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj b/externals/nitro/modules/c++/nitf-c++.vcxproj index d7d9d60a7d..7a96691719 100644 --- a/externals/nitro/modules/c++/nitf-c++.vcxproj +++ b/externals/nitro/modules/c++/nitf-c++.vcxproj @@ -234,9 +234,6 @@ MultiThreadedDebugDLL true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -265,9 +262,6 @@ true Level3 AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj index 0c6038085d..1ab273b982 100644 --- a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj +++ b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj @@ -65,9 +65,6 @@ MultiThreadedDebugDLL true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true Console @@ -92,9 +89,6 @@ true Level3 AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true Console diff --git a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj index 48c8b1cc42..80e6ea5317 100644 --- a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -103,9 +100,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj index 44a16714c8..2010203c4d 100644 --- a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -103,9 +100,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf-c.vcxproj b/externals/nitro/modules/c/nitf-c.vcxproj index cbb0f86899..45fa8fa678 100644 --- a/externals/nitro/modules/c/nitf-c.vcxproj +++ b/externals/nitro/modules/c/nitf-c.vcxproj @@ -66,9 +66,6 @@ true true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -93,9 +90,6 @@ true Level3 AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj index ce2b47ab34..cf18d23902 100644 --- a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj index 40ab797e7e..20212f3d20 100644 --- a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/ACFTA.vcxproj b/externals/nitro/modules/c/nitf/ACFTA.vcxproj index 0739a7efc0..05e79a2de1 100644 --- a/externals/nitro/modules/c/nitf/ACFTA.vcxproj +++ b/externals/nitro/modules/c/nitf/ACFTA.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj index 6d1f065e0d..0f70aa7c9b 100644 --- a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj +++ b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj index 94dda178a5..c737b6b4b3 100644 --- a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj +++ b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj index b926fcec29..9712bafcda 100644 --- a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj +++ b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj index 485b3d1e70..aaa8673444 100644 --- a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj +++ b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/HISTOA.vcxproj b/externals/nitro/modules/c/nitf/HISTOA.vcxproj index 9875bc74cc..f186bc6c9a 100644 --- a/externals/nitro/modules/c/nitf/HISTOA.vcxproj +++ b/externals/nitro/modules/c/nitf/HISTOA.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/JITCID.vcxproj b/externals/nitro/modules/c/nitf/JITCID.vcxproj index 8361a3eff4..37b29b98e6 100644 --- a/externals/nitro/modules/c/nitf/JITCID.vcxproj +++ b/externals/nitro/modules/c/nitf/JITCID.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj index f504de3489..d0a975671a 100644 --- a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj +++ b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj index 308b65e848..a2858247eb 100644 --- a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj +++ b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj index 07d96936e3..a243a545b4 100644 --- a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj +++ b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj @@ -76,9 +76,6 @@ true ProgramDatabase AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true @@ -101,9 +98,6 @@ Guard true AdvancedVectorExtensions2 - stdcpp17 - stdc11 - true diff --git a/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h b/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h index 395efa892f..4892352631 100644 --- a/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h +++ b/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h @@ -34,7 +34,9 @@ namespace sidd struct GeoTIFFReadControl : public ReadControl { - GeoTIFFReadControl() = default; + GeoTIFFReadControl() noexcept(false) {} + + virtual ~GeoTIFFReadControl() noexcept {} GeoTIFFReadControl(const GeoTIFFReadControl&) = delete; GeoTIFFReadControl operator=(const GeoTIFFReadControl&) = delete; From f07f6c5262471a0465a1ab1428d5a67462df8c14 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 10 Jul 2023 16:39:15 -0400 Subject: [PATCH 2/4] latest from CODA-OSS and NITRO --- externals/coda-oss/modules/c++/coda-oss.vcxproj | 1 + externals/coda-oss/modules/c++/pch.h | 1 + externals/nitro/Test++/Test++.vcxproj | 6 ++++++ externals/nitro/Test/Test.vcxproj | 6 ++++++ externals/nitro/modules/c++/nitf-c++.vcxproj | 6 ++++++ .../modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj | 6 ++++++ externals/nitro/modules/c/j2k/J2KCompress.vcxproj | 6 ++++++ externals/nitro/modules/c/j2k/J2KDecompress.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf-c.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ACCHZB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ACCPOB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ACFTA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/AIMIDB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/CSCRNA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/CSEXRB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ENGRDA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/HISTOA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/JITCID.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/PTPRAA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/RPFHDR.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj | 6 ++++++ 21 files changed, 116 insertions(+) diff --git a/externals/coda-oss/modules/c++/coda-oss.vcxproj b/externals/coda-oss/modules/c++/coda-oss.vcxproj index 92ae5f065f..e35e63f9b3 100644 --- a/externals/coda-oss/modules/c++/coda-oss.vcxproj +++ b/externals/coda-oss/modules/c++/coda-oss.vcxproj @@ -587,6 +587,7 @@ true AdvancedVectorExtensions2 true + stdcpp17 diff --git a/externals/coda-oss/modules/c++/pch.h b/externals/coda-oss/modules/c++/pch.h index f39484bc24..5cca8aa101 100644 --- a/externals/coda-oss/modules/c++/pch.h +++ b/externals/coda-oss/modules/c++/pch.h @@ -46,6 +46,7 @@ CODA_OSS_disable_warning_pop #pragma warning(disable: 6011) // Dereferencing NULL pointer '...'. #pragma warning(disable: 6313) // Incorrect operator. Use an equality test to check for zero-valued flags. #pragma warning(disable: 6389) // Move '...' to anonymous namespace or put a forward declaration in a common header included in this file. +#pragma warning(disable: 4866) // compiler may not enforce left-to-right evaluation order for call to '...' #pragma warning(disable: 26432) // If you define or delete any default operation in the type '...', define or delete them all (c.21). #pragma warning(disable: 26429) // Symbol '...' is never tested for nullness, it can be marked as not_null (f.23). diff --git a/externals/nitro/Test++/Test++.vcxproj b/externals/nitro/Test++/Test++.vcxproj index 19fff43f6b..956d9b5995 100644 --- a/externals/nitro/Test++/Test++.vcxproj +++ b/externals/nitro/Test++/Test++.vcxproj @@ -69,6 +69,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows @@ -91,6 +94,9 @@ true true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows diff --git a/externals/nitro/Test/Test.vcxproj b/externals/nitro/Test/Test.vcxproj index 3f37235948..0d826bcb26 100644 --- a/externals/nitro/Test/Test.vcxproj +++ b/externals/nitro/Test/Test.vcxproj @@ -69,6 +69,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows @@ -91,6 +94,9 @@ true true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj b/externals/nitro/modules/c++/nitf-c++.vcxproj index 7a96691719..d7d9d60a7d 100644 --- a/externals/nitro/modules/c++/nitf-c++.vcxproj +++ b/externals/nitro/modules/c++/nitf-c++.vcxproj @@ -234,6 +234,9 @@ MultiThreadedDebugDLL true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -262,6 +265,9 @@ true Level3 AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj index 1ab273b982..0c6038085d 100644 --- a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj +++ b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj @@ -65,6 +65,9 @@ MultiThreadedDebugDLL true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Console @@ -89,6 +92,9 @@ true Level3 AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Console diff --git a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj index 80e6ea5317..48c8b1cc42 100644 --- a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -100,6 +103,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj index 2010203c4d..44a16714c8 100644 --- a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -100,6 +103,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf-c.vcxproj b/externals/nitro/modules/c/nitf-c.vcxproj index 45fa8fa678..cbb0f86899 100644 --- a/externals/nitro/modules/c/nitf-c.vcxproj +++ b/externals/nitro/modules/c/nitf-c.vcxproj @@ -66,6 +66,9 @@ true true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -90,6 +93,9 @@ true Level3 AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj index cf18d23902..ce2b47ab34 100644 --- a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj index 20212f3d20..40ab797e7e 100644 --- a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ACFTA.vcxproj b/externals/nitro/modules/c/nitf/ACFTA.vcxproj index 05e79a2de1..0739a7efc0 100644 --- a/externals/nitro/modules/c/nitf/ACFTA.vcxproj +++ b/externals/nitro/modules/c/nitf/ACFTA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj index 0f70aa7c9b..6d1f065e0d 100644 --- a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj +++ b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj index c737b6b4b3..94dda178a5 100644 --- a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj +++ b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj index 9712bafcda..b926fcec29 100644 --- a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj +++ b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj index aaa8673444..485b3d1e70 100644 --- a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj +++ b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/HISTOA.vcxproj b/externals/nitro/modules/c/nitf/HISTOA.vcxproj index f186bc6c9a..9875bc74cc 100644 --- a/externals/nitro/modules/c/nitf/HISTOA.vcxproj +++ b/externals/nitro/modules/c/nitf/HISTOA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/JITCID.vcxproj b/externals/nitro/modules/c/nitf/JITCID.vcxproj index 37b29b98e6..8361a3eff4 100644 --- a/externals/nitro/modules/c/nitf/JITCID.vcxproj +++ b/externals/nitro/modules/c/nitf/JITCID.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj index d0a975671a..f504de3489 100644 --- a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj +++ b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj index a2858247eb..308b65e848 100644 --- a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj +++ b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj index a243a545b4..07d96936e3 100644 --- a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj +++ b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true From 2e609250f31e42c17942cfb8c1bb076464693213 Mon Sep 17 00:00:00 2001 From: "J. Daniel Smith" Date: Mon, 10 Jul 2023 17:06:29 -0400 Subject: [PATCH 3/4] latest from CODA-OSS and NITRO (#673) * latest from CODA-OSS * Squashed 'externals/coda-oss/' changes from e87c32b4d..54033e70e 54033e70e Merge branch 'main' into feature/complex_short 3c63f9f65 std::numbers from C++20 (#691) 892dd0e00 ComplexInteger and ComplexReal to better match existing naming conventions (#690) b3872181e match coda-oss naming conventions (#688) 704d6867f beef-up our complex type (#687) 47c1c1cd6 check is_absolute() for URLs (#686) c042373e1 be sure our Path::isAbolute() matches std::filesystem::path::absolute() (#684) ad10286bc volatile is about "special" memory, not threading (#685) f4d42005f fix build error in NITRO ff11a5557 keep using std::complex for now (#682) c88b9c053 types::complex (#681) d1244a080 don't need our own make_unique in C++14 (#680) aeec0131c assert()s for mem::CopyablePtr (#679) 72b0ebd60 add types::complex_short (#678) 932130a58 patch to build other projects c00c1f203 coda-oss release 2023-06-06 (#677) ef54bbcd5 remove more compiler warnings (#676) dadfc5ce6 distinguish between byte-swapping a buffer and single value (#674) 90187f6cd more xml.lite tweaks for SIDD-3.0/ISM (#675) eb9960772 stronger type-checking for byteSwap() (#673) ff4f820ed xml.lite tweaks to support SIDD 3.0 ISM (#672) b1de8c0e5 std::byte should be a unique type (#671) c05bf9a02 allow enums to be byte-swapped too 1f9fd88d6 remove spurious 47684c45b byteSwap now uses byte buffers (#670) cbc659db2 add swapBytes() utility from SIX (#669) 891481b64 simplify byte-swapping (#668) 540ae763e more byteSwap() tweaks 0774c03c4 threaded byteSwap() (#667) d156370d3 swapping a single-byte value makes no sense c120e3255 be sure parameter is used to avoid compiler warning e85ec9331 --output-on-failure for CTest (#666) e80376197 turn off "there is no warning number" warning c5f0a5d15 A C-string may not be NULL-terminated (#665) 0c5eb29ae use platform-specific routines for byteSwap() (#664) 0b7d581fa remove transform_async() (#663) f6489b6be Merge branch 'main' into feature/xml.lite_tweaks 836c426a2 use function-pointers so that isConsoleOutput is only checked once 56e3c45b1 move depthPrint() functionality into non-member function in preparation for future changes ddcd26d97 Merge branch 'main' into feature/xml.lite_tweaks 69cc0e506 use the more rigorous create_and_check_datatype() 9efb87558 Merge branch 'main' into feature/hdf5 4d2f2f417 more HighFive unittests (#662) 14191a844 HighFive::create_datatype() goes from C++ to HighFive 98583473f utility routines to read string attributes 1fa75ce81 use the C API to read a string attribute 71e7b69f5 still can't figure out how to read a string attribute :-( e96f37a69 test reading the file attributes a25244519 getAttribute() unittest 8f12a3000 getDataType() unittest 857ff0af3 HighFive utility routines (#661) 1d687db57 writeDataSet() utility overload 106aa6894 sigh ... H5Easy::dump() fill fails on Windows/WAF :-( 2641b60b2 Merge branch 'main' into feature/hdf5 35c19e7e8 change actions to @v3 (#660) 212bbd3a3 works on local machine, but not build server ... ? 7125118b0 dump of 1D vector doesn't work :-( c704db435 sigh ... WAF build still failing :-( 01aae4616 does dump() of a 1D vector work? 76a53c813 comment-out H5 writing :-( 0f0e19aff test_highfive_dump() cb8f73795 trying to get highfive_dump() unittest working w/Windows-WAF 6584a264a does test_highfive_create() work? cde6147ce tweak HighFive wrappers (#659) 316566854 Revert "trying HighFive "write" unittests again" a9ec24ca4 trying HighFive "write" unittests again 585ad49a5 tweak names of utility routines 4c91a4d97 make it easier to read a std::vector and std::vecotr 0217ffa26 readDataSet() now works for 1D data 95e8973f2 trying to get hdf5::lite::load() working 4d294611d "const" correctness 5e6305c3f fix load_complex() 4a134dc5f start work on utility routines to read complex data from HDF5 9d76a7f41 Merge branch 'main' into feature/hdf5 8f9667a24 whitepsace ebd3fc99e Merge branch 'main' into feature/hdf5 40091b069 comment-out writing tests for now ... need to figure our WAF bulid failure 935aa3459 be sure the dataset has real data 114b9bf33 update release notes bd9c0b26c tweak HighFive utility routines acda1ef57 turn off diagnostics around expected failures 22a748840 readDataSet() utility routine for HighFive bd88a8c25 HighFive writeDataSet() utility to work with our SpanRC 6142f5b33 use HighFive routines to write a HDF5 file 5bbf1abaf Use HiveFive routines to get info about the file 84fbc8378 duplicate unittests with H5Easy f1f054c03 Merge branch 'main' into feature/hdf5 9b63ca470 fix directory names f6f826689 fix directory names 7aeb82c33 Merge branch 'main' into feature/hdf5 d028baaeb hook up HighFive header-only library (#653) 3083b0a31 Revert "HighFive 2.6.2" 246985a7f Revert ""build" HighFive HDF5 library" a8b75a586 Revert "turn off HighFive Boost support" ec68d5f83 Revert "Add HighFive unittests" f1f85b9e7 Revert "get test_high_five_base more-or-less compiling" 5ea634ee1 Revert "more work on getting HighFive unittests to build" ecc45433c more work on getting HighFive unittests to build bb194788a get test_high_five_base more-or-less compiling d42bde000 Add HighFive unittests ddc86bb32 turn off HighFive Boost support b255122d4 "build" HighFive HDF5 library 396cc3ef2 HighFive 2.6.2 5e5f9d9c0 Merge branch 'main' into feature/hdf5 ee938b4a5 changes from SIX bb764df90 Merge branch 'main' into feature/xml.lite_tweaks de2a24380 make derived classes 'final' if possible 14e19bcd2 Change xml lite function to virtual (#645) 8f42ac8e9 Merge branch 'main' into feature/xml.lite_tweaks 18ad90645 hdf5Write unittest 3462e1179 createFile() and writeFile() overloads ecee81d53 fix typos 197eecfa6 sketch-out hdf5::lite::writeFile() bd2311795 use SpanRC for writeFile(), not yet implemented ea9af7510 simple SpanRC to hold a 2D-size and pointer 027c19ee8 createFile() unittest 1f9d07ecb hook up createFile() 8c7e4473f start hooking up HDF5 writing 146e0bea3 Merge branch 'main' into feature/hdf5 88ca9fcb7 Merge branch 'main' into feature/hdf5 42b604b46 Squashed commit of the following: 10ee602c2 Merge branch 'main' into feature/hdf5 67aa42b69 restore changes from "main" 8bbfcbfbf unittests can be simplified to match fewer "view" classes 126bb802e Merge branch 'main' into feature/hdf5 3f8ba7a42 again, don't need a class just to convert from std::vector<> to std::span<> 24c2b489c Squashed commit of the following: 2703c119d Squashed commit of the following: 9d5228a2b don't need an entire class just to convert a std::vector<> into std::span<> 51bc931dc Merge branch 'main' into feature/hdf5 a84f25816 Squashed commit of the following: c4d2ed696 add missing #include guards, fix type in existing #include guard d541525a0 use a single ComplexViewConstIterator for all views 86e6a459f CODA_OSS_disable_warning causes GCC errors :-( 5d4b9c2cb only need an custom iterator for ComplexSpansView d9f0fb128 hook up iterators b9329e4db initial pass at a ComplexViewConstIterator 635238873 remove compiler warning about unused "constexpr" variables b39f6096f use the casing from H5 to make copy/pasting code slightly easier 0887b13eb Merge branch 'main' into feature/hdf5 bd07df1ca Consistent casing for Dataset, Datatype, Dataspace 7acd30ee2 tweak hdf5.lite dependencies 38ab914df Jupyter notebook for creating H5 files 95a040e0b _small.h5 is now (correctly) FLOAT32 107e7c487 make a simple values() member function to avoid template magic e1feca919 use TEST_SPECIFIC_EXCEPTION macro instead of try/catch 738333688 readDatasetT() now throws for the wrong buffer type 6b2cc2529 Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 310f8fd3d can't get template magic right for copy_axis() 86b306d59 stepping through copy ctors in the debugger is annoying f243e92d6 trying to make wrong type of buffer fail 2b10d9652 read in new sample file a28e59d8c help the compiler with type deduction 49bf5e9bc nested_complex_float_data_small.h5 e029325fc utility routines to "deconstruct" and array of std::complex dede3bd39 Merge branch 'main' into feature/hdf5 904b1ef5e tweak class names, make_() and copy() utility routines 8237b9efb make it harder to pass the wrong types to ComplexViews 4d9aeda2c ComplexArrayView and ComplexParallelView utility classes f5e367dfa test std::span> a4a2844f2 read in the nested "i" and "r" data 115615265 sample file has subgroups 8e1b7869a Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 9f4232a1d update sample H5 file 8c55db73a walk through HDF5 sub-groups 7775ed9c4 Update 123_barfoo_catdog_cx.h5 677975d7c Matlab code to create sample H5 file a0e7dfe07 Update test_hdf5info.cpp 0b67e1602 pass __FILE__ and __LINE__ from calling site for a more accurate exception message 86a677321 skeleton for more sample data 85f79b099 Merge branch 'main' into feature/hdf5 18088e942 Merge branch 'main' into feature/hdf5 3a1d17692 Merge branch 'main' into feature/hdf5 1755c69d7 Merge branch 'main' into feature/hdf5 9ad015432 No more "11" suffix on exception names c20d96251 Squashed commit of the following: c88cee999 other values to be filled-in bca4a4ecd incorporation NamedObject from HDF5 docs 61fa68f72 groupInfo() 460e7d766 datasetInfo() 14eb9b764 start filling in DatasetInfo afe5f1c3a start to fill in DatasetInfo 77a968c72 start filling in GroupInfo d81bcdfd9 openGroup() to open groups (loc) a0cd29469 comment-out "dataset" unittest for now 86e006024 begin filling in FileInfo 366dda6ab a return_type_of utility is needed to deduce the return type e21928263 explicitly pass return type to template 4937ccd11 template to reduce boilerplate when calling try_catch_H5Exceptions b3b5ebde7 use new exception utility routines ea1c03ef0 put exception handling/conversion in a utility routine 819a99d39 utility routine for exception handling 6f34eea97 put utilities in a separate file for easier reuse fcbde4f24 break utility routines into smaller pieces for easier reuse 52358ea8a WIN32 no longer automatically defined? 5a4286472 Revert "build HDF5 with C89" 680e599e9 build HDF5 with C89 a87a07121 Merge branch 'main' into feature/hdf5 8447c1a90 Revert "sym-links instead of copying files" db3b5e12b Merge branch 'main' into feature/xml.lite_tweaks fb60b5696 Merge branch 'main' into feature/hdf5 5110a5cc8 Comments about _u and _q 1a937d32c Merge branch 'main' into feature/xml.lite_tweaks fa06f04d7 get ready for hdf5.lite enhancdements b040c7c43 sym-links instead of copying files aa431bb47 use _u for xml::lite::Uri 3d0c6d58c fix case-sensitive #include filename 93dcd0e52 operator() for getElementByName() 75a93af85 more operator[] overloads to make attribute management easier 4ab8216f8 user-defined string literals to remove some noise around xml::lite::QName f82f0b0fc Merge branch 'main' into feature/xml.lite_tweaks ae30e3644 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks ffdd9beb0 simplify attribute creation 9bf5414f5 simplify attribute creation 82d7a4e95 SWIG gets confused about namespaces 7a61d0741 fix bug on Element ctor uncovered by unittest fdd7e58c1 QName is also in the xerces namespace which confuses SWIG bindings a325b7053 operator+=() overload for addChild daf30e6c0 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks b887d2b47 provide overloads for Element& rather than creating new "reference" types 1fa6bba38 rename test_xmleasy.cpp 7c8c9e0f1 += overload 850da6f63 overload for std::string 4547fc5a7 use UIT-8 strings for characterData 4723462a3 convenient addChild() overloads e48720753 copy over ElementReference from xml.easy a4ca30a0d Merge branch 'main' into feature/xml.lite_tweaks 6ae9f0b71 Revert "check-in of new xml.easy (to move code between computers)" f7466a6d7 Revert "simple routines for single element" a5490230d Revert "make some operators simplier ways of calling functions" c9a25630a Revert "get document creation working" 8af8710b0 Revert "free functions instead of member functions" 16c3847cb Revert "ElementReference distinct from Element" 7d68e156f Revert "ElementMutableReference" 00eb2a282 Merge branch 'main' into feature/xml.lite_tweaks a42969c1f ElementMutableReference a20ae9355 ElementReference distinct from Element 14eeeea0b free functions instead of member functions 4aae014b3 get document creation working 883569269 make some operators simplier ways of calling functions 053bd1212 simple routines for single element 8bf701a2e check-in of new xml.easy (to move code between computers) 41f959051 unittests for creating XML documents from scratch 9752d50ae Merge branch 'main' into feature/xml.lite_tweaks 1531d5709 by default, don't validate strings passed to Uri() 46d13d4bf Merge branch 'master' into feature/xml.lite_tweaks 39b547d32 remove more vestiges of Expat and LibXML ec8274d52 remove LibXML and Expat as they're no longer used/supported. 20eeefeef Merge branch 'master' into feature/xml.lite_tweaks 95074b9b1 update for newer Intel compiler 7024f71e1 Merge branch 'master' into feature/xml.lite_tweaks 57b1cbc83 Merge branch 'master' into feature/xml.lite_tweaks 4b67561c3 remove validate() overload that nobody is using fa15f1e5d Squashed commit of the following: 1484a9090 test the new validate() API 470da70fb hookup StringStreamT routines 2cddf2504 begin hooking up validate() overloads 1b5d910f3 overload validate() for UTF-8 and Windows-1252 03309b8c9 Squashed commit of the following: b72c6c5bf older compiler doesn't like our make_unique af8f00307 validate UTF-8 XML on Linux 211188613 unit-test for LEGACY XML validation 3c1169d2b Squashed commit of the following: 3afff19ca std::filesystem::path for FileInputStreamOS 908d452f8 WIP: validate all of our sample XML files 00f9bb16b validate against a XML schema 243d8c356 Merge branch 'master' into feature/xml.lite_tweaks 2815d707d fix to work with SWIG bindings. :-( 460862132 trying (again) to remove vestiages of old code e3c83a858 Revert "new code should use UTF-8" 811207c92 new code should use UTF-8 0ffd835f9 Squashed commit of the following: 1e7e03ded Merge branch 'master' into feature/xml.lite_tweaks c1d806aff Merge branch 'master' into feature/xml.lite_tweaks 850d3c811 str::strip() that can be easier to use than str::trim() 580ba9c8c explicitly =delete move 2b39831a8 Squashed commit of the following: 39eebdc23 Merge branch 'master' into feature/xml.lite_tweaks 9adf86cba force calling new UTF-8 write() routines ea61b6204 Merge branch 'master' into feature/xml.lite_tweaks 8a34583fa overload to take schemaPaths as filesystem::path 8671b442f parse XML embedded in a binary file ec4a902f1 updates from xerces.lite 80dc4d963 updates from xerces.lite 549766d6c Attributes::contains() no longer catches an exception 8a645ceac need "sys/" when building in other environments 36af08269 super-simple URI validation 78ef28a3e SWIG bindings are a PITA! :-( e9cba8491 SWIG needs help with Uri 8a8d8dc07 another routines used by pre-build SWIG bindings 818e1ec5d pre-build SWIG bindings use getElementByTagName() member function 067cac5d8 old compiler gets confused on unadorned QName ba92c0ae7 more use of Uri and QName 446c7d17a use QName in new code d6f8b0c83 more direct use of QName 90fff1c73 use xml::lite::QName instead of tuple 646cbb5ed more direct use of QName and Uri ba589ea3b make QName more robust bab0ee8b5 createElement() -> addNewElement() e3a145747 grab changes from six-library 32285e95c Merge branch 'master' into feature/xml.lite_tweaks 9f79f0bf6 Merge branch 'master' into feature/xml.lite_tweaks a12bbc32c make it easier to create new Elements with a value fc9967f98 make it easy for callers to addChild() keep a reference to the Element 4627766b7 be sure test_xmlparser works in "externals" of other projects bf2276396 "private" is part of the name-mangling fad92bcc8 making sure copy-ctor is implemented f90fdcead consolidate common XML test code 9fc53f2d5 use str:: utility for casting 6da6f794b still trying to find the right macro for SWIG 0c1b86c56 still trying to fix SWIG fdc6fc9bd trying to fix SWIG build error 7835e8c27 SWIG needs copy-ctor 585695942 disable copy/assignment for Element, it's probably almost always wrong 391fed613 fix double-delete caused by copying 61790fe69 retry parsing XML with Windows-1252 if first parse() fails 63cffac59 change string_encoding to match coda-oss style of PascalCase 010479bbe read an XML file we know is wrongly encoded as Windows-1252 9a0505062 more references instead of pointers 2d44b6951 Reading Windows-1252 w/o "encoding" fails 63dc7b076 read Windows-1252 too c9434c9cb test as UIT-8 too f310ccf0c get reading from UTF-8 XML working on Windows 1fa39c2be get testReadUtf8XmlFile working on Linux 1a83cd815 sys::Path is too much trouble right now ed60aa22c unit-test to read XML from a file a9336db7c Squashed commit of the following: 0825beb0d Merge branch 'master' into feature/xml.lite_tweaks c618489be Merge branch 'master' into feature/xml.lite_tweaks e8e4b8fe1 determine string_encoding based on platform 1f43bcfc2 create a new Element by using the platform to determine "characterData" encoding 961bef66b Merge branch 'master' into feature/xml.lite_tweaks e9798a5cb fix static_assert() 6f7772874 Merge branch 'master' into feature/xml.lite_tweaks b98d4f5a9 Merge branch 'master' into feature/xml.lite_tweaks 1b5abba2a The (old) version of SWIG we're using doesn't like certain C++11 features. 53bdeabaf Merge branch 'master' into feature/xml.lite_tweaks 60cf8ae80 "" doesn't work with decltype() in older C++ 97e72477a reduce getValue() overloads by making "key" a template argument 5e6373e55 reduce code duplication f9e7cfeee provide castValue instead of getValue(T&) cbd0bd8f2 castValue throws instead of returning a bool like getValue(T&) 87c7514fc Merge branch 'master' into feature/xml.lite_tweaks 10cc61223 make getElement*() consistent for zero or >1 results f5b137e3c Merge branch 'master' into feature/xml.lite_tweaks 1765efc62 allow clients to specify toType() and toString() for getValue() and setValue() df8b746e1 allow clients to specify their own toType/toString routines 66702726a Merge branch 'master' into feature/xml.lite_tweaks 6956311f1 Merge branch 'master' into feature/xml.lite_tweaks d505f3593 Merge branch 'master' into feature/xml.lite_tweaks fbd106115 catch a BadCastException and return false from getValue() 3a78377b5 use a template to reduce duplicated code 0ad4b8606 Merge branch 'master' into feature/xml.lite_tweaks a848aa3a2 get & set the characer data as a type f3ee1ee12 utility routines to set an attribute value 595227683 templates to get an attribute value convert to a specific type 06639227b miised a change in last commit 1aa458ef8 add getValue() overloads that return true/false rather than throwing faa6d3075 added getElementByTagName() overloads as that's a very common use-case git-subtree-dir: externals/coda-oss git-subtree-split: 54033e70e353da94340dd7b96d0b1c6652308952 * Squashed 'externals/nitro/' changes from c8ecbe9ae..3f01809fa 3f01809fa latest from coda-oss (#557) 471fb3fc1 Update test_j2k_loading++.cpp b12caf2fc latest from CODA-OSS (#556) 0cd432624 use sys::make_span (#555) 05dae18a3 patch to build other projects 8f974e995 NITRO-2.11.3 (#554) 870aa6afd update to coda-oss 2023-06-05 (#553) 2fd7a0bfa latest from coda-oss (#552) 0eecce004 invoke() utility to reduce code duplication (#550) 59fb02fe9 latest from coda-oss (#551) 9fbf2b7b8 Fill out adapter free block which is used for nitf decompression (#549) 089ba0b5b latest from coda-oss 3b52f0025 latest from coda-oss (#547) 90c6263e2 latest from coda-oss (#544) 90d513ac5 latest from coda-oss (#543) git-subtree-dir: externals/nitro git-subtree-split: 3f01809fae7d471aa0f1594fc5eec1e3111cd710 * latest from CODA-OSS * Squashed 'externals/nitro/' changes from 3f01809fa..cee9feb42 cee9feb42 latest from CODA-OSS (#558) git-subtree-dir: externals/nitro git-subtree-split: cee9feb424b0f9c1f11f37f67a1795b3cc5e8dd1 * latest from CODA-OSS and NITRO * latest from CODA-OSS and NITRO * Squashed 'externals/coda-oss/' changes from 54033e70e..c2fc5fc66 c2fc5fc66 add more projects to coda-oss-lite.vcxproj (#694) ceb86c186 support $(PlatformToolset) as a "special" environment variable (#693) d78a8595a OS::getSIMDInstructionSet() utility (#692) 2d2df467d fix `python3 waf dumplib` git-subtree-dir: externals/coda-oss git-subtree-split: c2fc5fc660c2794d77fac2b71cf0dfae76c22c3e * Squashed 'externals/nitro/' changes from cee9feb42..49ec50325 49ec50325 use new "PlatformToolkit" special environment variable (#560) 6c06e3711 latest from CODA-OSS (#559) git-subtree-dir: externals/nitro git-subtree-split: 49ec50325d0dcdef40b63dd440afdb82d6b6d379 * sync_externals * latest from CODA-OSS and NITRO * Squashed 'externals/coda-oss/' changes from c2fc5fc66..f70b4202f f70b4202f account for coda-oss.vcxproj being in other SLNs af3faebfc Remove more compiler/code-analysis warnings (#699) 82be2a6db unittests should work w/o install (#698) dbb90a06d add msbuild for coda-oss.sln (#697) 5a417140a reduce compiler warnings (#696) 288619dfa all modules now part of coda-oss.vcxproj (#695) git-subtree-dir: externals/coda-oss git-subtree-split: f70b4202f19f260941a0245e41301ae232348fc7 * Squashed 'externals/nitro/' changes from 49ec50325..b4ae2d429 b4ae2d429 match YAML from coda-oss 176bcaf6d build NITRO.SLN using msbuild (#562) 85e9043b8 latest from CODA-OSS (#561) git-subtree-dir: externals/nitro git-subtree-split: b4ae2d4290dcc5482970980ebe85719436990647 * latest from CODA-OSS and NITRO * somewhere a compiler warning got unsuppressed * =default doesn't implement the destructor --- .../.github/workflows/build_unittest.yml | 36 +- externals/coda-oss/CMakeLists.txt | 1 + externals/coda-oss/UnitTest/UnitTest.vcxproj | 31 +- .../UnitTest/UnitTest.vcxproj.filters | 21 + externals/coda-oss/UnitTest/avx.cpp | 2 + externals/coda-oss/UnitTest/mem.cpp | 3 + externals/coda-oss/UnitTest/mt.cpp | 11 + externals/coda-oss/UnitTest/pch.h | 78 +- externals/coda-oss/UnitTest/polygon.cpp | 3 + externals/coda-oss/UnitTest/str.cpp | 1 + externals/coda-oss/UnitTest/sys.cpp | 21 + externals/coda-oss/UnitTest/types.cpp | 6 + externals/coda-oss/UnitTest/xml.lite.cpp | 33 + externals/coda-oss/UnitTest/zip.cpp | 1 + .../cmake/CodaFindSystemDependencies.cmake | 3 - .../{coda-oss-lite.sln => coda-oss.sln} | 2 +- externals/coda-oss/modules/CMakeLists.txt | 2 + externals/coda-oss/modules/c++/CMakeLists.txt | 27 +- .../modules/c++/cli/include/cli/Argument.h | 20 +- .../modules/c++/cli/source/Argument.cpp | 4 +- .../modules/c++/cli/source/ArgumentParser.cpp | 12 +- .../coda-oss/modules/c++/coda-oss.ruleset | 699 ++++++++++++++++++ ...coda-oss-lite.vcxproj => coda-oss.vcxproj} | 114 ++- ...xproj.filters => coda-oss.vcxproj.filters} | 295 +++++++- .../c++/dbi/source/DatabaseClientFactory.cpp | 2 +- .../c++/dbi/source/OracleConnection.cpp | 18 +- .../modules/c++/except/source/Backtrace.cpp | 6 +- externals/coda-oss/modules/c++/framework.h | 12 +- .../modules/c++/gsl/include/gsl/gsl.h | 1 + .../c++/hdf5.lite/include/hdf5/lite/H5_.h | 69 ++ .../hdf5.lite/include/hdf5/lite/highfive.h | 4 +- .../coda-oss/modules/c++/include/TestCase.h | 3 +- .../modules/c++/io/include/io/PipeStream.h | 2 +- .../modules/c++/io/include/io/Serializable.h | 2 +- .../c++/io/source/FileInputStreamOS.cpp | 6 +- .../modules/c++/io/source/InputStream.cpp | 2 +- .../modules/c++/io/source/MMapInputStream.cpp | 4 +- .../modules/c++/io/source/PipeStream.cpp | 2 +- .../modules/c++/io/source/StandardStreams.cpp | 4 +- .../modules/c++/io/source/StreamSplitter.cpp | 2 +- .../unittests/test_exception_logger.cpp | 2 +- .../include/math/linear/MatrixMxN.h | 2 +- .../modules/c++/math/include/math/Round.h | 20 +- .../modules/c++/math/source/Bessel.cpp | 7 +- .../c++/mem/include/mem/ScratchMemory.h | 7 +- .../c++/mem/include/mem/ScratchMemory.hpp | 2 +- .../c++/mem/include/mem/SharedPtrCpp11.h | 2 - .../modules/c++/mem/source/ScratchMemory.cpp | 25 +- .../c++/mem/tests/ScratchVisualization.cpp | 12 +- .../c++/mt/include/mt/AbstractThreadPool.h | 5 + .../modules/c++/mt/include/mt/WorkerThread.h | 8 +- .../c++/mt/source/GenerationThreadPool.cpp | 6 +- .../c++/mt/source/GenericRequestHandler.cpp | 2 +- .../modules/c++/mt/source/ThreadGroup.cpp | 4 +- .../c++/net.ssl/source/SSLConnection.cpp | 4 +- .../source/SSLConnectionClientFactory.cpp | 4 +- .../c++/net/include/net/NetConnectionServer.h | 9 +- .../net/PerRequestThreadAllocStrategy.h | 8 +- .../c++/net/include/net/SocketsWin32.h | 19 +- .../net/include/net/ThreadPoolAllocStrategy.h | 10 + .../modules/c++/net/source/CurlHandle.cpp | 4 +- .../c++/net/source/NetConnectionServer.cpp | 2 +- .../modules/c++/net/source/NetUtils.cpp | 2 +- .../modules/c++/net/source/SocketAddress.cpp | 4 +- .../c++/numpyutils/source/numpyutils.cpp | 6 + externals/coda-oss/modules/c++/pch.h | 109 ++- .../modules/c++/re/include/re/Regex.h | 4 - .../modules/c++/re/source/RegexPCRE.cpp | 5 + .../modules/c++/re/source/RegexSTL.cpp | 33 +- .../sio.lite/include/sio/lite/SioFileWriter.h | 5 + .../c++/sio.lite/source/StreamReader.cpp | 4 +- .../modules/c++/std/include/import/cpp14.h | 60 -- .../modules/c++/std/include/import/cpp17.h | 36 - .../modules/c++/std/include/import/std.h | 64 +- .../modules/c++/str/source/Encoding.cpp | 94 ++- .../modules/c++/str/source/Format.cpp | 19 +- .../coda-oss/modules/c++/str/source/Manip.cpp | 14 +- .../c++/str/unittests/test_base_convert.cpp | 13 +- .../modules/c++/str/unittests/test_str.cpp | 6 +- .../modules/c++/sys/include/sys/AbstractOS.h | 6 +- .../modules/c++/sys/include/sys/Conf.h | 2 +- .../modules/c++/sys/include/sys/Dbg.h | 4 +- .../modules/c++/sys/include/sys/OSWin32.h | 2 +- .../c++/sys/include/sys/ReadWriteMutex.h | 2 +- .../modules/c++/sys/include/sys/String.h | 29 - .../c++/sys/include/sys/ThreadInterface.h | 2 +- .../modules/c++/sys/include/sys/ThreadPosix.h | 2 +- .../modules/c++/sys/source/AbstractOS.cpp | 7 + .../c++/sys/source/ConditionVarPosix.cpp | 6 +- .../c++/sys/source/ConditionVarWin32.cpp | 15 +- .../coda-oss/modules/c++/sys/source/Conf.cpp | 5 +- .../modules/c++/sys/source/DLLUnix.cpp | 4 +- .../modules/c++/sys/source/DLLWin32.cpp | 6 +- .../modules/c++/sys/source/DateTime.cpp | 16 +- .../coda-oss/modules/c++/sys/source/Dbg.cpp | 24 +- .../modules/c++/sys/source/ErrUnix.cpp | 2 +- .../modules/c++/sys/source/ErrWin32.cpp | 4 +- .../modules/c++/sys/source/ExecUnix.cpp | 8 +- .../modules/c++/sys/source/ExecWin32.cpp | 23 +- .../modules/c++/sys/source/FileFinder.cpp | 6 +- .../modules/c++/sys/source/FileUnix.cpp | 2 +- .../modules/c++/sys/source/FileWin32.cpp | 6 +- .../modules/c++/sys/source/LocalDateTime.cpp | 2 +- .../modules/c++/sys/source/MutexWin32.cpp | 4 +- .../modules/c++/sys/source/OSUnix.cpp | 14 +- .../modules/c++/sys/source/OSWin32.cpp | 31 +- .../modules/c++/sys/source/ResourceCheck.cpp | 3 +- .../c++/sys/source/ScopedCPUAffinityUnix.cpp | 7 +- .../modules/c++/sys/source/SemaphoreWin32.cpp | 10 +- .../modules/c++/sys/source/StopWatch.cpp | 6 +- .../modules/c++/sys/source/ThreadPosix.cpp | 8 +- .../modules/c++/sys/source/ThreadWin32.cpp | 4 +- .../modules/c++/sys/source/UTCDateTime.cpp | 2 +- .../modules/c++/sys/source/sys_Backtrace.cpp | 2 +- .../modules/c++/sys/tests/DLLTest.cpp | 2 +- .../coda-oss/modules/c++/tiff/source/IFD.cpp | 4 +- .../modules/c++/tiff/source/IFDEntry.cpp | 4 +- .../modules/c++/tiff/source/ImageWriter.cpp | 2 +- .../modules/c++/tiff/source/KnownTags.cpp | 2 +- .../modules/c++/tiff/source/TypeFactory.cpp | 2 +- .../modules/c++/tiff/source/Utils.cpp | 6 +- .../c++/types/include/types/PageRowCol.h | 44 +- .../modules/c++/types/include/types/RowCol.h | 3 +- .../c++/types/unittests/test_page_row_col.cpp | 4 +- .../modules/c++/unique/source/UUID.cpp | 2 +- externals/coda-oss/modules/c++/unique/wscript | 1 - .../xml.lite/include/xml/lite/Attributes.h | 10 +- .../include/xml/lite/ContentHandler.h | 8 +- .../c++/xml.lite/include/xml/lite/Document.h | 6 +- .../c++/xml.lite/include/xml/lite/Element.h | 48 +- .../include/xml/lite/MinidomHandler.h | 7 +- .../xml.lite/include/xml/lite/MinidomParser.h | 5 +- .../c++/xml.lite/include/xml/lite/QName.h | 10 +- .../xml.lite/include/xml/lite/Serializable.h | 6 +- .../include/xml/lite/UtilitiesXerces.h | 36 +- .../include/xml/lite/ValidatorInterface.h | 13 +- .../include/xml/lite/ValidatorXerces.h | 24 +- .../include/xml/lite/XMLReaderInterface.h | 12 +- .../include/xml/lite/XMLReaderXerces.h | 5 +- .../c++/xml.lite/include/xml/lite/xerces_.h | 97 +++ .../modules/c++/xml.lite/source/Document.cpp | 8 +- .../modules/c++/xml.lite/source/Element.cpp | 4 +- .../c++/xml.lite/source/MinidomHandler.cpp | 2 +- .../modules/c++/xml.lite/source/QName.cpp | 2 +- .../c++/xml.lite/source/Serializable.cpp | 2 +- .../c++/xml.lite/source/ValidatorXerces.cpp | 13 +- .../c++/xml.lite/source/XMLReaderXerces.cpp | 1 + .../xml.lite/unittests/test_soapelements.cpp | 13 +- .../xml.lite/unittests/test_xmlattribute.cpp | 35 +- .../xml.lite/unittests/test_xmlelement.cpp | 32 +- .../c++/xml.lite/unittests/test_xmlparser.cpp | 137 ++-- .../c++/zip/source/GZipInputStream.cpp | 4 +- .../c++/zip/source/GZipOutputStream.cpp | 4 +- .../modules/c++/zip/source/ZipEntry.cpp | 6 +- .../c++/zip/source/ZipOutputStream.cpp | 8 +- .../drivers/j2k/openjpeg/CMakeLists.txt | 6 +- .../modules/drivers/jpeg/CMakeLists.txt | 12 +- .../modules/drivers/pcre/CMakeLists.txt | 8 +- .../modules/drivers/uuid/CMakeLists.txt | 2 +- .../modules/drivers/xml/xerces/CMakeLists.txt | 54 +- .../.github/workflows/frequent_check.yml | 49 +- externals/nitro/.github/workflows/main.yml | 54 +- externals/nitro/CMakeLists.txt | 6 - externals/nitro/Test++/Test++.vcxproj | 10 +- externals/nitro/Test/Test.vcxproj | 10 +- externals/nitro/modules/c++/nitf-c++.vcxproj | 6 +- .../nitf/apps/show_nitf++/show_nitf++.vcxproj | 10 +- .../nitro/modules/c/j2k/J2KCompress.vcxproj | 6 +- .../nitro/modules/c/j2k/J2KDecompress.vcxproj | 6 +- externals/nitro/modules/c/nitf-c.vcxproj | 6 +- externals/nitro/modules/c/nitf/ACCHZB.vcxproj | 2 + externals/nitro/modules/c/nitf/ACCPOB.vcxproj | 2 + externals/nitro/modules/c/nitf/ACFTA.vcxproj | 2 + externals/nitro/modules/c/nitf/AIMIDB.vcxproj | 2 + externals/nitro/modules/c/nitf/CSCRNA.vcxproj | 2 + externals/nitro/modules/c/nitf/CSEXRB.vcxproj | 4 +- externals/nitro/modules/c/nitf/ENGRDA.vcxproj | 2 + externals/nitro/modules/c/nitf/HISTOA.vcxproj | 2 + externals/nitro/modules/c/nitf/JITCID.vcxproj | 2 + externals/nitro/modules/c/nitf/PTPRAA.vcxproj | 2 + externals/nitro/modules/c/nitf/RPFHDR.vcxproj | 2 + .../modules/c/nitf/XML_DATA_CONTENT.vcxproj | 2 + externals/nitro/nitro.sln | 9 + .../include/six/sidd/GeoTIFFReadControl.h | 4 +- 184 files changed, 2504 insertions(+), 897 deletions(-) create mode 100644 externals/coda-oss/UnitTest/xml.lite.cpp rename externals/coda-oss/{coda-oss-lite.sln => coda-oss.sln} (90%) create mode 100644 externals/coda-oss/modules/c++/coda-oss.ruleset rename externals/coda-oss/modules/c++/{coda-oss-lite.vcxproj => coda-oss.vcxproj} (77%) rename externals/coda-oss/modules/c++/{coda-oss-lite.vcxproj.filters => coda-oss.vcxproj.filters} (79%) create mode 100644 externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/H5_.h delete mode 100644 externals/coda-oss/modules/c++/std/include/import/cpp14.h delete mode 100644 externals/coda-oss/modules/c++/std/include/import/cpp17.h delete mode 100644 externals/coda-oss/modules/c++/sys/include/sys/String.h create mode 100644 externals/coda-oss/modules/c++/xml.lite/include/xml/lite/xerces_.h diff --git a/externals/coda-oss/.github/workflows/build_unittest.yml b/externals/coda-oss/.github/workflows/build_unittest.yml index 3f7b581659..04b2f3fae3 100644 --- a/externals/coda-oss/.github/workflows/build_unittest.yml +++ b/externals/coda-oss/.github/workflows/build_unittest.yml @@ -36,20 +36,33 @@ jobs: cd .. cd target-Debug cmake --build . --config Debug -j - - name: install + - name: test + # should run w/o install run: | cd target-Release - cmake --build . --config Release --target install + ctest -C Release --output-on-failure cd .. cd target-Debug - cmake --build . --config Debug --target install - - name: test + ctest -C Debug --output-on-failure + - name: install run: | cd target-Release - ctest -C Release --output-on-failure + cmake --build . --config Release --target install cd .. cd target-Debug - ctest -C Debug --output-on-failure + cmake --build . --config Debug --target install + cd .. + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + with: + msbuild-architecture: x64 + - name: msbuild + run: | + msbuild coda-oss.sln /p:configuration=Release + msbuild coda-oss.sln /p:configuration=Debug + #- name: mstest + # run: | + # mstest /testcontainer:${RUNNER_WORKSPACE}\coda-oss\x64\Debug\UnitTest.dll build-linux-cmake: strategy: @@ -79,14 +92,15 @@ jobs: cd target # "-j" spawns too many processes causing GCC to crash cmake --build . -j 12 - - name: install - run: | - cd target - cmake --build . --target install - name: test + # should run w/o install run: | cd target ctest --output-on-failure + - name: install + run: | + cd target + cmake --build . --target install build-waf: strategy: @@ -94,7 +108,7 @@ jobs: os: [ubuntu-latest, windows-2019] python-version: ['3.7'] debugging: ['--enable-debugging', ''] - name: ${{ matrix.os }}-${{ matrix.python-version }}-waf + name: ${{ matrix.os }}-${{ matrix.python-version }}-waf${{ matrix.debugging }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/externals/coda-oss/CMakeLists.txt b/externals/coda-oss/CMakeLists.txt index f1aa8e5ac9..4b1bc2c645 100644 --- a/externals/coda-oss/CMakeLists.txt +++ b/externals/coda-oss/CMakeLists.txt @@ -31,6 +31,7 @@ if (${CMAKE_PROJECT_NAME} STREQUAL coda-oss) endif() elseif (UNIX) add_compile_options(-Werror) # warnings as errors + if (ENABLE_ASAN) # https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html add_compile_options(-fsanitize=address) diff --git a/externals/coda-oss/UnitTest/UnitTest.vcxproj b/externals/coda-oss/UnitTest/UnitTest.vcxproj index 65fb191b71..65b3ca3225 100644 --- a/externals/coda-oss/UnitTest/UnitTest.vcxproj +++ b/externals/coda-oss/UnitTest/UnitTest.vcxproj @@ -57,7 +57,7 @@ Use Level4 true - $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\hdf5.lite\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;$(SolutionDir)modules\c++\zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;%(AdditionalIncludeDirectories) + $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\hdf5.lite\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;$(SolutionDir)modules\c++\xml.lite\include\;$(SolutionDir)modules\c++\zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\;%(AdditionalIncludeDirectories) _DEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 true pch.h @@ -75,7 +75,7 @@ Windows - $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) @@ -85,7 +85,7 @@ true true true - $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\hdf5.lite\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;$(SolutionDir)modules\c++\zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;%(AdditionalIncludeDirectories) + $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\hdf5.lite\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;$(SolutionDir)modules\c++\xml.lite\include\;$(SolutionDir)modules\c++\zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\;%(AdditionalIncludeDirectories) NDEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 true pch.h @@ -103,7 +103,7 @@ Windows true true - $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) @@ -355,6 +355,26 @@ true true + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + true true @@ -380,6 +400,7 @@ + @@ -387,7 +408,7 @@ - + {9997e895-5161-4ddf-8f3f-099894cb2f21} diff --git a/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters b/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters index c4c85031c1..ab3ead71f4 100644 --- a/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters +++ b/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters @@ -243,6 +243,24 @@ zip + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + @@ -300,5 +318,8 @@ {223c163f-0321-4935-8e20-0e05f048adf0} + + {f4dfc761-e468-4305-84dc-f3579e46107e} + \ No newline at end of file diff --git a/externals/coda-oss/UnitTest/avx.cpp b/externals/coda-oss/UnitTest/avx.cpp index 535dc859f3..907c5ddbcf 100644 --- a/externals/coda-oss/UnitTest/avx.cpp +++ b/externals/coda-oss/UnitTest/avx.cpp @@ -1,6 +1,8 @@ #include "pch.h" #include "CppUnitTest.h" +#include + namespace avx { diff --git a/externals/coda-oss/UnitTest/mem.cpp b/externals/coda-oss/UnitTest/mem.cpp index ea35c94051..375bb9384e 100644 --- a/externals/coda-oss/UnitTest/mem.cpp +++ b/externals/coda-oss/UnitTest/mem.cpp @@ -3,6 +3,9 @@ #include #include +#include +#include +#include namespace mem { diff --git a/externals/coda-oss/UnitTest/mt.cpp b/externals/coda-oss/UnitTest/mt.cpp index 6190f8aa4a..6be7aa9333 100644 --- a/externals/coda-oss/UnitTest/mt.cpp +++ b/externals/coda-oss/UnitTest/mt.cpp @@ -1,6 +1,17 @@ #include "pch.h" #include "CppUnitTest.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + namespace mt { diff --git a/externals/coda-oss/UnitTest/pch.h b/externals/coda-oss/UnitTest/pch.h index 14807bb811..8c2ebbb93c 100644 --- a/externals/coda-oss/UnitTest/pch.h +++ b/externals/coda-oss/UnitTest/pch.h @@ -24,81 +24,35 @@ #include #include "import/std.h" - -#include -#include -#include -#include #include +#include #include -#include // std::endian #include +#include +#include +#include +#include #include "CppUnitTest.h" -#include "coda_oss/span.h" -#include "gsl/gsl.h" -#include "import/sys.h" -#include "import/math.h" -#include "import/str.h" -#include "str/EncodedStringView.h" -#include "import/except.h" -#include "import/mem.h" -#include -#include -#include -#include "import/cli.h" -#include "polygon/DrawPolygon.h" -#include "polygon/PolygonMask.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include -#include -#include #include #include -#include "io/StringStream.h" -#include +#include +#include +#include + #include +#include #include "TestCase.h" diff --git a/externals/coda-oss/UnitTest/polygon.cpp b/externals/coda-oss/UnitTest/polygon.cpp index 32bc9fd0ba..424f3aa8a9 100644 --- a/externals/coda-oss/UnitTest/polygon.cpp +++ b/externals/coda-oss/UnitTest/polygon.cpp @@ -1,6 +1,9 @@ #include "pch.h" #include "CppUnitTest.h" +#include +#include + namespace polygon { TEST_CLASS(test_polygon_mask){ public: diff --git a/externals/coda-oss/UnitTest/str.cpp b/externals/coda-oss/UnitTest/str.cpp index d7fe5b718e..a3be22b7c9 100644 --- a/externals/coda-oss/UnitTest/str.cpp +++ b/externals/coda-oss/UnitTest/str.cpp @@ -5,6 +5,7 @@ #include #include +#include namespace str { diff --git a/externals/coda-oss/UnitTest/sys.cpp b/externals/coda-oss/UnitTest/sys.cpp index bedfa98188..7ac63c6a10 100644 --- a/externals/coda-oss/UnitTest/sys.cpp +++ b/externals/coda-oss/UnitTest/sys.cpp @@ -1,6 +1,27 @@ #include "pch.h" #include "CppUnitTest.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + namespace sys { TEST_CLASS(test_aligned_alloc){ public: diff --git a/externals/coda-oss/UnitTest/types.cpp b/externals/coda-oss/UnitTest/types.cpp index 3d03155b3f..64bb3a2723 100644 --- a/externals/coda-oss/UnitTest/types.cpp +++ b/externals/coda-oss/UnitTest/types.cpp @@ -1,6 +1,12 @@ #include "pch.h" #include "CppUnitTest.h" +#include +#include +#include +#include +#include + namespace types { TEST_CLASS(test_page_row_col){ public: diff --git a/externals/coda-oss/UnitTest/xml.lite.cpp b/externals/coda-oss/UnitTest/xml.lite.cpp new file mode 100644 index 0000000000..375a17fe54 --- /dev/null +++ b/externals/coda-oss/UnitTest/xml.lite.cpp @@ -0,0 +1,33 @@ +#include "pch.h" +#include "CppUnitTest.h" + +#include +#include +#include +#include +#include + +namespace xml_lite +{ + +TEST_CLASS(test_soapelements){ public: +#include "xml.lite/unittests/test_soapelements.cpp" +}; + +TEST_CLASS(test_xmlattribute){ public: +#include "xml.lite/unittests/test_xmlattribute.cpp" +}; + +TEST_CLASS(test_xmlcreate){ public: +#include "xml.lite/unittests/test_xmlcreate.cpp" +}; + +TEST_CLASS(test_xmlelement){ public: +#include "xml.lite/unittests/test_xmlelement.cpp" +}; + +TEST_CLASS(test_xmlparser){ public: +#include "xml.lite/unittests/test_xmlparser.cpp" +}; + +} \ No newline at end of file diff --git a/externals/coda-oss/UnitTest/zip.cpp b/externals/coda-oss/UnitTest/zip.cpp index b9fc79389f..6dd08743f9 100644 --- a/externals/coda-oss/UnitTest/zip.cpp +++ b/externals/coda-oss/UnitTest/zip.cpp @@ -2,6 +2,7 @@ #include "CppUnitTest.h" #include +#include namespace zip { diff --git a/externals/coda-oss/cmake/CodaFindSystemDependencies.cmake b/externals/coda-oss/cmake/CodaFindSystemDependencies.cmake index 5efe5c73b9..808361823e 100644 --- a/externals/coda-oss/cmake/CodaFindSystemDependencies.cmake +++ b/externals/coda-oss/cmake/CodaFindSystemDependencies.cmake @@ -92,9 +92,6 @@ macro(coda_find_system_dependencies) if (PYTHON_EXTRA_NATIVE) list(APPEND CMAKE_SWIG_FLAGS "-extranative") endif() - if (Python_VERSION_MAJOR GREATER_EQUAL 3) - list(APPEND CMAKE_SWIG_FLAGS "-py3") - endif() endif() else() set(SWIG_FOUND OFF CACHE INTERNAL "") diff --git a/externals/coda-oss/coda-oss-lite.sln b/externals/coda-oss/coda-oss.sln similarity index 90% rename from externals/coda-oss/coda-oss-lite.sln rename to externals/coda-oss/coda-oss.sln index 8310d71fd3..5583590dd7 100644 --- a/externals/coda-oss/coda-oss-lite.sln +++ b/externals/coda-oss/coda-oss.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.32421.90 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coda-oss-lite", "modules\c++\coda-oss-lite.vcxproj", "{9997E895-5161-4DDF-8F3F-099894CB2F21}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coda-oss", "modules\c++\coda-oss.vcxproj", "{9997E895-5161-4DDF-8F3F-099894CB2F21}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DEB848DD-4285-4BFA-9B2F-60FA46200205}" ProjectSection(SolutionItems) = preProject diff --git a/externals/coda-oss/modules/CMakeLists.txt b/externals/coda-oss/modules/CMakeLists.txt index d21b6d252c..d7a4f7d71e 100644 --- a/externals/coda-oss/modules/CMakeLists.txt +++ b/externals/coda-oss/modules/CMakeLists.txt @@ -1,5 +1,7 @@ add_subdirectory("drivers") + add_subdirectory("c++") if (BUILD_PYTHON_MODULES) add_subdirectory("python") endif() + diff --git a/externals/coda-oss/modules/c++/CMakeLists.txt b/externals/coda-oss/modules/c++/CMakeLists.txt index 5d6ec9ed88..d242748651 100644 --- a/externals/coda-oss/modules/c++/CMakeLists.txt +++ b/externals/coda-oss/modules/c++/CMakeLists.txt @@ -12,14 +12,27 @@ if (MSVC) elseif (UNIX) add_compile_options(-std=c++14) - add_compile_options(-Wall -pedantic -Wextra) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wregister") # -Wvolatile - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weffc++") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual") + # https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html + add_compile_options(-Werror) # Make all warnings into errors + add_compile_options(-Wall -Wextra -Wpedantic -pedantic-errors -Wunused) + + add_compile_options(-Wzero-as-null-pointer-constant) + add_compile_options(-Wsuggest-final-types -Wsuggest-final-methods) + add_compile_options(-Wsuggest-override) + add_compile_options(-Woverloaded-virtual) + add_compile_options(-Warray-bounds) + add_compile_options(-Wduplicated-branches -Wduplicated-cond) + add_compile_options(-Wtrampolines) + add_compile_options(-Wshadow) #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-final-types -Wsuggest-final-methods") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override") + #add_compile_options(-Wfloat-equal) + #add_compile_options(-Wconversion) + #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weffc++") + + add_compile_options(-Wno-double-promotion) # implicit conversion of `float` to `double` is fine + + # Need a newer compiler than GCC 9 + #add_compile_options(-Wnrvo) endif() # add an interface library for unittests diff --git a/externals/coda-oss/modules/c++/cli/include/cli/Argument.h b/externals/coda-oss/modules/c++/cli/include/cli/Argument.h index e7a90f83b4..65763cebcb 100644 --- a/externals/coda-oss/modules/c++/cli/include/cli/Argument.h +++ b/externals/coda-oss/modules/c++/cli/include/cli/Argument.h @@ -100,20 +100,20 @@ class CODA_OSS_API Argument std::string mName; std::vector mShortFlags; std::vector mLongFlags; - Action mAction; - int mMinArgs; - int mMaxArgs; - Value* mDefaultValue; - bool mOwnDefault; + Action mAction = cli::STORE; + int mMinArgs = 0; + int mMaxArgs = 1; + Value* mDefaultValue = nullptr; + bool mOwnDefault = false; std::vector mChoices; std::string mHelp; std::string mMetavar; std::string mDestination; - Value* mConstValue; - bool mOwnConst; - bool mRequired; - bool mShowsHelp; - ArgumentParser* mParser; + Value* mConstValue = nullptr; + bool mOwnConst = false; + bool mRequired = false; + bool mShowsHelp = true; + ArgumentParser* mParser = nullptr; friend class ArgumentParser; Argument(const std::string& nameOrFlags, ArgumentParser* parser); diff --git a/externals/coda-oss/modules/c++/cli/source/Argument.cpp b/externals/coda-oss/modules/c++/cli/source/Argument.cpp index a925262d16..11c541a2c2 100644 --- a/externals/coda-oss/modules/c++/cli/source/Argument.cpp +++ b/externals/coda-oss/modules/c++/cli/source/Argument.cpp @@ -25,9 +25,7 @@ #include cli::Argument::Argument(const std::string& nameOrFlags, cli::ArgumentParser* parser): - mAction(cli::STORE), mMinArgs(0), mMaxArgs(1), mDefaultValue(NULL), - mOwnDefault(false), mConstValue(NULL), mOwnConst(false), - mRequired(false), mShowsHelp(true), mParser(parser) + mParser(parser) { std::vector < std::string > vars = str::split(nameOrFlags, " "); if (vars.size() == 1 && !str::startsWith(vars[0], "-")) diff --git a/externals/coda-oss/modules/c++/cli/source/ArgumentParser.cpp b/externals/coda-oss/modules/c++/cli/source/ArgumentParser.cpp index 2a31bda458..be702484ef 100644 --- a/externals/coda-oss/modules/c++/cli/source/ArgumentParser.cpp +++ b/externals/coda-oss/modules/c++/cli/source/ArgumentParser.cpp @@ -415,12 +415,12 @@ std::unique_ptr cli::ArgumentParser::parse(const std::string& prog } auto results = std::make_unique(); - cli::Results *currentResults = NULL; + cli::Results* currentResults = nullptr; for (size_t i = 0, s = explodedArgs.size(); i < s; ++i) { currentResults = results.get(); // set the pointer std::string argStr = explodedArgs[i]; - cli::Argument *arg = NULL; + cli::Argument* arg = nullptr; std::string optionsStr(""); if (argStr.size() > 2 && argStr[0] == mPrefixChar && argStr[1] == mPrefixChar) @@ -509,7 +509,7 @@ std::unique_ptr cli::ArgumentParser::parse(const std::string& prog } - if (arg != NULL) + if (arg != nullptr) { std::string argVar = arg->getVariable(); switch (arg->getAction()) @@ -566,7 +566,7 @@ std::unique_ptr cli::ArgumentParser::parse(const std::string& prog case cli::STORE_CONST: { const Value* constVal = arg->getConst(); - currentResults->put(argVar, constVal ? constVal->clone() : NULL); + currentResults->put(argVar, constVal ? constVal->clone() : nullptr); break; } case cli::SUB_OPTIONS: @@ -607,7 +607,7 @@ std::unique_ptr cli::ArgumentParser::parse(const std::string& prog else { // it's a positional argument - cli::Value *lastPosVal = NULL; + cli::Value* lastPosVal = nullptr; for (std::vector::iterator it = positionalArgs.begin(); it != positionalArgs.end(); ++it) { @@ -655,7 +655,7 @@ std::unique_ptr cli::ArgumentParser::parse(const std::string& prog if (!results->hasValue(argVar)) { const Value* defaultVal = arg->getDefault(); - if (defaultVal != NULL) + if (defaultVal != nullptr) results->put(argVar, defaultVal->clone()); else if (arg->getAction() == cli::STORE_FALSE) results->put(argVar, new cli::Value(true)); diff --git a/externals/coda-oss/modules/c++/coda-oss.ruleset b/externals/coda-oss/modules/c++/coda-oss.ruleset new file mode 100644 index 0000000000..0da8c00a63 --- /dev/null +++ b/externals/coda-oss/modules/c++/coda-oss.ruleset @@ -0,0 +1,699 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj b/externals/coda-oss/modules/c++/coda-oss.vcxproj similarity index 77% rename from externals/coda-oss/modules/c++/coda-oss-lite.vcxproj rename to externals/coda-oss/modules/c++/coda-oss.vcxproj index 7165b8b151..b0c706116b 100644 --- a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj +++ b/externals/coda-oss/modules/c++/coda-oss.vcxproj @@ -31,6 +31,12 @@ + + + + + + @@ -43,12 +49,14 @@ + + @@ -164,6 +172,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -185,8 +224,6 @@ - - @@ -242,7 +279,6 @@ - @@ -271,9 +307,29 @@ + + + + + + + + + + + + + + + + + + + + @@ -284,6 +340,10 @@ + + + + @@ -338,6 +398,20 @@ + + + + + + + + + + + + + + @@ -411,6 +485,19 @@ + + + + + + + + + + + + + @@ -418,6 +505,7 @@ + @@ -445,7 +533,7 @@ {9997e895-5161-4ddf-8f3f-099894cb2f21} codaoss 10.0 - coda-oss-lite + coda-oss @@ -474,10 +562,11 @@ true true - AllRules.ruleset + coda-oss.ruleset false + coda-oss.ruleset @@ -485,13 +574,12 @@ true _DEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 pch.h - cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;hdf5.lite\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\;zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\ + cli\include\;coda_oss\include;config\include\;dbi\include\;except\include\;gsl\include\;hdf5.lite\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;net\include\;net.ssl\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;unique\include\;units\include\;xml.lite\include\;zip\include\;$(ProjectDir)..\..\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ Use pch.h true Guard ProgramDatabase - true true true true @@ -499,13 +587,14 @@ /Zc:__cplusplus %(AdditionalOptions) true AdvancedVectorExtensions2 + true true - $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\ - hdf5-c++.lib;z.lib;minizip.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ + hdf5-c++.lib;z.lib;minizip.lib;xerces-c.lib;rpcrt4.lib;%(AdditionalDependencies) @@ -516,12 +605,11 @@ true NDEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 pch.h - cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;hdf5.lite\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\;zip\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\ + cli\include\;coda_oss\include;config\include\;dbi\include\;except\include\;gsl\include\;hdf5.lite\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;net\include\;net.ssl\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;unique\include\;units\include\;xml.lite\include\;zip\include\;$(ProjectDir)..\..\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ Use pch.h true Guard - true true true true @@ -535,8 +623,8 @@ true true true - $(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\ - hdf5-c++.lib;z.lib;minizip.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ + hdf5-c++.lib;z.lib;minizip.lib;xerces-c.lib;rpcrt4.lib;%(AdditionalDependencies) diff --git a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters b/externals/coda-oss/modules/c++/coda-oss.vcxproj.filters similarity index 79% rename from externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters rename to externals/coda-oss/modules/c++/coda-oss.vcxproj.filters index e1e9675be9..2b1f013080 100644 --- a/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters +++ b/externals/coda-oss/modules/c++/coda-oss.vcxproj.filters @@ -219,9 +219,6 @@ sys - - sys - sys @@ -720,12 +717,6 @@ mem - - std - - - std - std @@ -795,6 +786,183 @@ zip + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + dbi + + + dbi + + + dbi + + + dbi + + + dbi + + + dbi + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net.ssl + + + net.ssl + + + net.ssl + + + net.ssl + + + unique + + + unique + + + hdf5.lite + + + xml.lite + + + hdf5.lite + @@ -1167,6 +1335,99 @@ zip + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + xml.lite + + + dbi + + + dbi + + + dbi + + + dbi + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net + + + net.ssl + + + net.ssl + + + unique + @@ -1247,6 +1508,21 @@ {a2682912-3963-489a-9cf0-c5224b27eb84} + + {1bb6daf3-40dd-44d8-8680-0e77e2c3bd17} + + + {13c98009-f1f9-4297-a2b3-bde23f3bea55} + + + {6575592b-9b28-49eb-be76-27f40825475e} + + + {21ddb4b6-54a2-4618-81ed-4fbbf37b30de} + + + {79aa73a7-ed0d-4826-b7ed-c8d91d96998a} + @@ -1309,5 +1585,6 @@ std + \ No newline at end of file diff --git a/externals/coda-oss/modules/c++/dbi/source/DatabaseClientFactory.cpp b/externals/coda-oss/modules/c++/dbi/source/DatabaseClientFactory.cpp index 170d405131..cd1b387335 100644 --- a/externals/coda-oss/modules/c++/dbi/source/DatabaseClientFactory.cpp +++ b/externals/coda-oss/modules/c++/dbi/source/DatabaseClientFactory.cpp @@ -47,7 +47,7 @@ dbi::DatabaseConnection * dbi::DatabaseClientFactory::create(const std::string& const std::string& host, unsigned int port) { - dbi::DatabaseConnection * connection = NULL; + dbi::DatabaseConnection * connection = nullptr; # if defined(USE_PGSQL) if (mType == dbi::PGSQL) { diff --git a/externals/coda-oss/modules/c++/dbi/source/OracleConnection.cpp b/externals/coda-oss/modules/c++/dbi/source/OracleConnection.cpp index 4f09abaa36..66ff79cb50 100644 --- a/externals/coda-oss/modules/c++/dbi/source/OracleConnection.cpp +++ b/externals/coda-oss/modules/c++/dbi/source/OracleConnection.cpp @@ -30,8 +30,8 @@ dbi::OracleConnection::OracleConnection() { - mEnvHandle = NULL; - mErrorHandle = NULL; + mEnvHandle = nullptr; + mErrorHandle = nullptr; (void) OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, (dvoid * (*)(dvoid *, size_t)) 0, (dvoid * (*)(dvoid *, dvoid *, size_t))0, @@ -118,7 +118,7 @@ dbi::pResultSet dbi::OracleConnection::query(const std::string& q) (ub4)countq.length(), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT); OCIStmtExecute(mContextHandle, countHandle, mErrorHandle, (ub4)val, (ub4)0, (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT); - OCIDefine * defineHandle = NULL; + OCIDefine * defineHandle = nullptr; OCIDefineByPos(countHandle, &defineHandle, mErrorHandle, 1, &rowCount, sizeof(rowCount), SQLT_UIN, 0, 0, 0, OCI_DEFAULT); OCIStmtFetch(countHandle, mErrorHandle, 1, OCI_FETCH_NEXT, OCI_DEFAULT); @@ -150,7 +150,7 @@ dbi::Row dbi::OracleResultSet::fetchRow() dbi::Row row; ub4 count = 0; sword result = OCIAttrGet(mSQLHandle, OCI_HTYPE_STMT, - &count, NULL, OCI_ATTR_PARAM_COUNT, mErrorHandle); + &count, nullptr, OCI_ATTR_PARAM_COUNT, mErrorHandle); Column * fields = new Column[count]; if (result == OCI_SUCCESS) { @@ -160,9 +160,9 @@ dbi::Row dbi::OracleResultSet::fetchRow() fields[i].type = 0; fields[i].extType = SQLT_STR; fields[i].fieldSize = 0; - fields[i].value = NULL; + fields[i].value = nullptr; - OCIParam* param_handle = NULL; + OCIParam* param_handle = nullptr; ub4 name_len = 0; result = OCIParamGet(mSQLHandle, OCI_HTYPE_STMT, @@ -180,14 +180,14 @@ dbi::Row dbi::OracleResultSet::fetchRow() if (result == OCI_SUCCESS) { result = OCIAttrGet(param_handle, OCI_DTYPE_PARAM, - &fields[i].type, NULL, OCI_ATTR_DATA_TYPE, + &fields[i].type, nullptr, OCI_ATTR_DATA_TYPE, mErrorHandle); } if (result == OCI_SUCCESS) { result = OCIAttrGet(param_handle, OCI_DTYPE_PARAM, - &fields[i].fieldSize, NULL, OCI_ATTR_DATA_SIZE, + &fields[i].fieldSize, nullptr, OCI_ATTR_DATA_SIZE, mErrorHandle); } @@ -210,7 +210,7 @@ dbi::Row dbi::OracleResultSet::fetchRow() int indp = -1; // This means that NULL values will not cause an error fields[i].value = new char[fields[i].fieldSize]; memset(fields[i].value, '\0', fields[i].fieldSize); - OCIDefine* defineHandle = NULL; + OCIDefine* defineHandle = nullptr; result = OCIDefineByPos(mSQLHandle, &defineHandle, mErrorHandle, i + 1, fields[i].value, fieldSize, fields[i].extType, &indp, 0, 0, OCI_DEFAULT); diff --git a/externals/coda-oss/modules/c++/except/source/Backtrace.cpp b/externals/coda-oss/modules/c++/except/source/Backtrace.cpp index a6a326415e..9adb564def 100644 --- a/externals/coda-oss/modules/c++/except/source/Backtrace.cpp +++ b/externals/coda-oss/modules/c++/except/source/Backtrace.cpp @@ -111,7 +111,7 @@ class SymInitialize_RAII final bool result; SymInitialize_RAII(HANDLE process) : process_(process) { - result = SymInitialize(process_, NULL, TRUE) == TRUE ? true : false; // https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-syminitialize + result = SymInitialize(process_, nullptr, TRUE) == TRUE ? true : false; // https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-syminitialize } ~SymInitialize_RAII() @@ -134,7 +134,7 @@ static std::string getBacktrace_(bool& supported, std::vector& symb } PVOID stack[100]; - const auto frames = CaptureStackBackTrace(0, 100, stack, NULL); + const auto frames = CaptureStackBackTrace(0, 100, stack, nullptr); auto symbol = reinterpret_cast(calloc(sizeof(SYMBOL_INFO) + 256 * sizeof(char), 1)); if (symbol == nullptr) { @@ -147,7 +147,7 @@ static std::string getBacktrace_(bool& supported, std::vector& symb for (unsigned int i = 0; i < frames; i++) { const auto address = reinterpret_cast(stack[i]); - const auto result = SymFromAddr(process, address, 0, symbol) == TRUE ? true : false; + const auto result = SymFromAddr(process, address, nullptr, symbol) == TRUE ? true : false; if (!result) { continue; diff --git a/externals/coda-oss/modules/c++/framework.h b/externals/coda-oss/modules/c++/framework.h index ced33cae73..1cab8338a0 100644 --- a/externals/coda-oss/modules/c++/framework.h +++ b/externals/coda-oss/modules/c++/framework.h @@ -5,14 +5,18 @@ #pragma warning(disable: 4514) // '...': unreferenced inline function has been removed #pragma warning(disable: 4365) // '...': conversion from '...' to '...', signed/unsigned mismatch #pragma warning(disable: 5204) // '...': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly +#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define NOMINMAX // no min()/max() macros -#pragma warning(push) -#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior #include + +#define _WINSOCK_DEPRECATED_NO_WARNINGS // '...': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings #include -#include -#pragma warning(pop) +#include #pragma comment(lib, "Ws2_32") + +#include + #pragma warning(pop) + diff --git a/externals/coda-oss/modules/c++/gsl/include/gsl/gsl.h b/externals/coda-oss/modules/c++/gsl/include/gsl/gsl.h index bd7b33a097..4563274f4f 100644 --- a/externals/coda-oss/modules/c++/gsl/include/gsl/gsl.h +++ b/externals/coda-oss/modules/c++/gsl/include/gsl/gsl.h @@ -40,6 +40,7 @@ #pragma warning(disable: 5027) // '...' : move assignment operator was implicitly defined as deleted #pragma warning(disable: 26487) // Don 't return a pointer '...' that may be invalid (lifetime.4). #pragma warning(disable: 4814) // '...': in C++14 '...' will not imply '...'; consider explicitly specifying '...' + #pragma warning(disable: 26823) // Dereferencing a possibly null pointer '...' (lifetime.1). #endif #include "gsl/gsl" diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/H5_.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/H5_.h new file mode 100644 index 0000000000..74ebc436cb --- /dev/null +++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/H5_.h @@ -0,0 +1,69 @@ +/* ========================================================================= + * This file is part of hdf5.lite-c++ + * ========================================================================= + * + * (C) Copyright 2022, Maxar Technologies, Inc. + * + * hdf5.lite-c++ is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; If not, + * see . + * + */ + +#pragma once +#ifndef CODA_OSS_hdf5_lite_H5__h_INCLUDED_ +#define CODA_OSS_hdf5_lite_H5__h_INCLUDED_ + +#include "config/compiler_extensions.h" + +CODA_OSS_disable_warning_system_header_push +#if _MSC_VER +#pragma warning(disable: 26493) // Don't use C-style casts (type.4). +#pragma warning(disable: 26494) // Variable '...' is uninitialized. Always initialize an object (type.5). +#pragma warning(disable: 26451) // Arithmetic overflow: Using operator '...' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '...' to avoid overflow (io.2). +#pragma warning(disable: 26814) // The const variable '...' can be computed at compile-time. Consider using constexpr (con.5). +#pragma warning(disable: 26447) // The function is declared '...' but calls function '...' which may throw exceptions (f.6). +#pragma warning(disable: 26455) // Default constructor should not throw. Declare it '...' (f.6). +#pragma warning(disable: 26440) // Function '...' can be declared '...' (f.6). +#pragma warning(disable: 26496) // The variable '...' does not change after construction, mark it as const (con.4). +#pragma warning(disable: 26462) // The value pointed to by '...' is assigned only once, mark it as a pointer to const (con.4). +#pragma warning(disable: 26435) // Function '...' should specify exactly one of '...', '...', or '...' (c.128). +#pragma warning(disable: 26433) // Function '...' should be marked with '...' (c.128). +#pragma warning(disable: 26497) // You can attempt to make '...' constexpr unless it contains any undefined behavior (f.4). +#pragma warning(disable: 26433) // Function '...' should be marked with '...' (c.128). +#pragma warning(disable: 26456) // Operator '...' hides a non-virtual operator '...' (c.128). +#pragma warning(disable: 26446) // Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4). +#pragma warning(disable: 26477) // Use '...' rather than 0 or NULL(es .47). +#pragma warning(disable: 26457) // (void) should not be used to ignore return values, use '...' instead (es.48). +#pragma warning(disable: 26813) // Use '...' to check if a flag is set. +#else +CODA_OSS_disable_warning(-Wshadow) +CODA_OSS_disable_warning(-Wsuggest-override) +CODA_OSS_disable_warning(-Wzero-as-null-pointer-constant) +#endif + +// see https://docs.hdfgroup.org/archive/support/HDF5/doc1.8/cpplus_RM/readdata_8cpp-example.html +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +CODA_OSS_disable_warning_pop + +#endif // CODA_OSS_hdf5_lite_H5__h_INCLUDED_ diff --git a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h index 99f9f0d080..fb276e681c 100644 --- a/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h +++ b/externals/coda-oss/modules/c++/hdf5.lite/include/hdf5/lite/highfive.h @@ -33,9 +33,7 @@ #include #include -#include "highfive/H5Easy.hpp" -#include "highfive/H5DataSet.hpp" - +#include "H5_.h" #include "SpanRC.h" namespace hdf5 diff --git a/externals/coda-oss/modules/c++/include/TestCase.h b/externals/coda-oss/modules/c++/include/TestCase.h index a068260e0d..a433140047 100644 --- a/externals/coda-oss/modules/c++/include/TestCase.h +++ b/externals/coda-oss/modules/c++/include/TestCase.h @@ -119,7 +119,8 @@ inline void assert_almost_eq_eps(const TX1& X1, const TX2& X2, const TEPS& EPS, const std::string& testName, const char* file, const char* func, int line) { const auto abs_difference = std::abs(X1 - X2); - if (abs_difference > EPS || IS_NAN(abs_difference)) + using abs_difference_t = decltype(abs_difference); + if (abs_difference > static_cast(EPS) || IS_NAN(abs_difference)) { diePrintf_("%s (%s,%s,%d): FAILED: Recv'd %s, Expected %s\n", testName, file, func, line, X1, X2); } diff --git a/externals/coda-oss/modules/c++/io/include/io/PipeStream.h b/externals/coda-oss/modules/c++/io/include/io/PipeStream.h index 0a6b910355..33dc707360 100644 --- a/externals/coda-oss/modules/c++/io/include/io/PipeStream.h +++ b/externals/coda-oss/modules/c++/io/include/io/PipeStream.h @@ -23,7 +23,7 @@ #ifndef __IO_PIPE_STREAM_H__ #define __IO_PIPE_STREAM_H__ -#include +#include #include #include diff --git a/externals/coda-oss/modules/c++/io/include/io/Serializable.h b/externals/coda-oss/modules/c++/io/include/io/Serializable.h index 4fb3978b0f..e6d2363ae1 100644 --- a/externals/coda-oss/modules/c++/io/include/io/Serializable.h +++ b/externals/coda-oss/modules/c++/io/include/io/Serializable.h @@ -49,7 +49,7 @@ namespace io struct Serializable { Serializable() = default; - virtual ~Serializable() = default; + virtual ~Serializable() noexcept(false) {} /*! * Transfer this object into a byte stream diff --git a/externals/coda-oss/modules/c++/io/source/FileInputStreamOS.cpp b/externals/coda-oss/modules/c++/io/source/FileInputStreamOS.cpp index a8340b2a14..8ad36f1472 100644 --- a/externals/coda-oss/modules/c++/io/source/FileInputStreamOS.cpp +++ b/externals/coda-oss/modules/c++/io/source/FileInputStreamOS.cpp @@ -39,7 +39,7 @@ sys::Off_T io::FileInputStreamOS::available() sys::Off_T until = mFile.getCurrentOffset(); mFile.seekTo(where, sys::File::FROM_START); - return (until - where); + return until - where; } @@ -49,8 +49,8 @@ sys::SSize_T io::FileInputStreamOS::readImpl(void* buffer, size_t len) sys::Off_T avail = available(); if (!avail) return io::InputStream::IS_EOF; - if (len > (sys::Size_T)avail) - len = (sys::Size_T)avail; + if (len > static_cast(avail)) + len = static_cast(avail); mFile.readInto(buffer, len); return static_cast(len); diff --git a/externals/coda-oss/modules/c++/io/source/InputStream.cpp b/externals/coda-oss/modules/c++/io/source/InputStream.cpp index 3fd81e2f6c..e39ac48a6b 100644 --- a/externals/coda-oss/modules/c++/io/source/InputStream.cpp +++ b/externals/coda-oss/modules/c++/io/source/InputStream.cpp @@ -102,6 +102,6 @@ sys::SSize_T InputStream::readln(sys::byte *cStr, const sys::Size_T strLenPlusNu if (*(cStr + i) == '\n') return i + 1; // Otherwise, append c; } - return (sys::SSize_T)i; + return static_cast(i); } } diff --git a/externals/coda-oss/modules/c++/io/source/MMapInputStream.cpp b/externals/coda-oss/modules/c++/io/source/MMapInputStream.cpp index 9818ffb043..d942ac2231 100644 --- a/externals/coda-oss/modules/c++/io/source/MMapInputStream.cpp +++ b/externals/coda-oss/modules/c++/io/source/MMapInputStream.cpp @@ -38,7 +38,7 @@ void io::MMapInputStream::close() { _unmap(); fclose(mFile); - mFile = NULL; + mFile = nullptr; } void io::MMapInputStream::_map() @@ -50,7 +50,7 @@ void io::MMapInputStream::_unmap() { // std::cout << "Unmapping file... "; mOs.unmapFile(mData, mLength); - mData = NULL; + mData = nullptr; // std::cout << "done!" << std::endl; } diff --git a/externals/coda-oss/modules/c++/io/source/PipeStream.cpp b/externals/coda-oss/modules/c++/io/source/PipeStream.cpp index d256583800..a807299bd4 100644 --- a/externals/coda-oss/modules/c++/io/source/PipeStream.cpp +++ b/externals/coda-oss/modules/c++/io/source/PipeStream.cpp @@ -63,7 +63,7 @@ sys::SSize_T io::PipeStream::readln(sys::byte *cStr, while (!feof(pipe)) { // get the next line or return null - if (fgets(cStr, static_cast(strLenPlusNullByte), pipe) != NULL) + if (fgets(cStr, static_cast(strLenPlusNullByte), pipe) != nullptr) { return gsl::narrow(strlen(cStr)); } diff --git a/externals/coda-oss/modules/c++/io/source/StandardStreams.cpp b/externals/coda-oss/modules/c++/io/source/StandardStreams.cpp index 02f6a61de7..2323613990 100644 --- a/externals/coda-oss/modules/c++/io/source/StandardStreams.cpp +++ b/externals/coda-oss/modules/c++/io/source/StandardStreams.cpp @@ -27,7 +27,7 @@ _STDOUT_DEFINE_MUTEX_SEMICOLON_ void io::StandardOutStream::write(const void* buffer, sys::Size_T len) { _STDSTREAM_BEGIN_CS_SEMICOLON_ - std::cout.write((const char*)buffer, len); + std::cout.write(static_cast(buffer), len); _STDSTREAM_END_CS_SEMICOLON_ //int returnVal = fwrite(b, len, len, stdout); if (!std::cout.good()) @@ -47,7 +47,7 @@ void io::StandardOutStream::flush() void io::StandardErrStream::write(const void* buffer, sys::Size_T len) { _STDSTREAM_BEGIN_CS_SEMICOLON_ - std::cerr.write((const char*)buffer, len); + std::cerr.write(static_cast(buffer), len); //int returnVal = fwrite(b, len, len, stderr); _STDSTREAM_END_CS_SEMICOLON_ if (!std::cerr.good()) diff --git a/externals/coda-oss/modules/c++/io/source/StreamSplitter.cpp b/externals/coda-oss/modules/c++/io/source/StreamSplitter.cpp index b922063838..57d6a2f603 100644 --- a/externals/coda-oss/modules/c++/io/source/StreamSplitter.cpp +++ b/externals/coda-oss/modules/c++/io/source/StreamSplitter.cpp @@ -40,7 +40,7 @@ StreamSplitter::StreamSplitter(io::InputStream& inputStream, mNumDelimitersProcessed(0), mBufferStorage(bufferSize), mBufferCapacity(mBufferStorage.size()), - mBuffer(mBufferStorage.empty() ? NULL : &mBufferStorage[0]), + mBuffer(mBufferStorage.empty() ? nullptr : &mBufferStorage[0]), mInputStream(inputStream), mStreamEmpty(false) { diff --git a/externals/coda-oss/modules/c++/logging/unittests/test_exception_logger.cpp b/externals/coda-oss/modules/c++/logging/unittests/test_exception_logger.cpp index f85d8cc54a..57016a0de9 100644 --- a/externals/coda-oss/modules/c++/logging/unittests/test_exception_logger.cpp +++ b/externals/coda-oss/modules/c++/logging/unittests/test_exception_logger.cpp @@ -43,7 +43,7 @@ class RunNothing final : public sys::Runnable } public: - RunNothing(size_t& c, logging::ExceptionLogger* el, bool getBacktrace=false) : counter(c), exLog(el), getBacktrace(getBacktrace) {} + RunNothing(size_t& c, logging::ExceptionLogger* el, bool getBacktrace_=false) : counter(c), exLog(el), getBacktrace(getBacktrace_) {} virtual void run() override { diff --git a/externals/coda-oss/modules/c++/math.linear/include/math/linear/MatrixMxN.h b/externals/coda-oss/modules/c++/math.linear/include/math/linear/MatrixMxN.h index 39006e1348..ef091020cf 100644 --- a/externals/coda-oss/modules/c++/math.linear/include/math/linear/MatrixMxN.h +++ b/externals/coda-oss/modules/c++/math.linear/include/math/linear/MatrixMxN.h @@ -1298,7 +1298,7 @@ template template inline MatrixMxN<_ND, _ND, _T> inverseLU(const MatrixMxN<_ND, _ND, _T>& mx) { - MatrixMxN<_ND, _ND, _T> a((_T)0); + MatrixMxN<_ND, _ND, _T> a(static_cast<_T>(0)); // Identity for (size_t i = 0; i < _ND; i++) diff --git a/externals/coda-oss/modules/c++/math/include/math/Round.h b/externals/coda-oss/modules/c++/math/include/math/Round.h index d141510040..f3df72c1f7 100644 --- a/externals/coda-oss/modules/c++/math/include/math/Round.h +++ b/externals/coda-oss/modules/c++/math/include/math/Round.h @@ -36,9 +36,11 @@ namespace math * \param value A number to evaluate * \return The 'fixed' number */ -template inline T fix(T value) +template inline T fix(T value_) { - return (value > 0.0 ? std::floor(value) : std::ceil(value)); + const double value = value_; + const auto result = value > 0.0 ? std::floor(value) : std::ceil(value); + return static_cast(result); } /*! @@ -48,9 +50,11 @@ template inline T fix(T value) * \param value A number to evaluate * \return The rounded number */ -template inline T round(T value) +template inline T round(T value_) { - return static_cast(value > 0.0 ? std::floor(value + 0.5) : std::ceil(value - 0.5)); + const double value = value_; + const auto result = value > 0.0 ? std::floor(value + 0.5) : std::ceil(value - 0.5); + return static_cast(result); } /*! @@ -60,7 +64,7 @@ template inline T round(T value) * \param fractionalDigits Number of fractional digits to round to * \return The rounded number */ -template inline T round(T value, size_t fractionalDigits) +template inline T round(T value_, size_t fractionalDigits) { double power10 = 1.0; for (size_t i = 0; i < fractionalDigits; ++i) @@ -68,8 +72,10 @@ template inline T round(T value, size_t fractionalDigits) power10 *= 10.0; } - return static_cast(value > 0.0 ? std::floor(value * power10 + 0.5) / power10 - : std::ceil(value * power10 - 0.5) / power10); + const double value = value_; + const auto result = value > 0.0 ? std::floor(value * power10 + 0.5) / power10 + : std::ceil(value * power10 - 0.5) / power10; + return static_cast(result); } /*! diff --git a/externals/coda-oss/modules/c++/math/source/Bessel.cpp b/externals/coda-oss/modules/c++/math/source/Bessel.cpp index 5c4911c074..b84f4fb8ac 100644 --- a/externals/coda-oss/modules/c++/math/source/Bessel.cpp +++ b/externals/coda-oss/modules/c++/math/source/Bessel.cpp @@ -22,6 +22,7 @@ #include #include +#include #include @@ -147,12 +148,12 @@ double besselIOrderN(size_t order, double x) double bi = 1.0; //Downward recurrence from even n - for (size_t jj = 2 * (order + int(std::sqrt(ACC * order))); jj > 0; jj--) + for (size_t jj = 2 * (order + int(std::sqrt(ACC * static_cast(order)))); jj > 0; jj--) { - double bim = bip + (jj * tox * bi); + double bim = bip + (static_cast(jj) * tox * bi); bip = bi; bi = bim; - std::frexp(bi, &k); + std::ignore = std::frexp(bi, &k); //Renormalize to prevent overflow if (k > IEXP) diff --git a/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.h b/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.h index 1a89da787e..57724f0a7e 100644 --- a/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.h +++ b/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.h @@ -50,8 +50,7 @@ namespace mem class CODA_OSS_API ScratchMemory { public: - //! Default constructor - ScratchMemory(); + ScratchMemory() = default; /*! * \brief Reserve a buffer segment within this scratch memory buffer. @@ -183,8 +182,8 @@ class CODA_OSS_API ScratchMemory std::set mConnectedKeys; BufferView mBuffer; - size_t mNumBytesNeeded; - size_t mOffset; + size_t mNumBytesNeeded=0; + size_t mOffset=0; }; } diff --git a/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.hpp b/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.hpp index 0682c5d830..45c6fcd261 100644 --- a/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.hpp +++ b/externals/coda-oss/modules/c++/mem/include/mem/ScratchMemory.hpp @@ -38,7 +38,7 @@ inline void ScratchMemory::put(const std::string& key, size_t alignment) { // invalidate buffer (setup must be called before any subsequent get call) - mBuffer.data = NULL; + mBuffer.data = nullptr; size_t segmentOffset = mOffset; diff --git a/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h b/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h index 619d7b045e..f6832fbcef 100644 --- a/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h +++ b/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h @@ -27,8 +27,6 @@ #include #include -#include "sys/CPlusPlus.h" - namespace mem { // Pretty much give-up on mem::SharedPtr as it's too hard to get something that will diff --git a/externals/coda-oss/modules/c++/mem/source/ScratchMemory.cpp b/externals/coda-oss/modules/c++/mem/source/ScratchMemory.cpp index bcedacaf0f..a3f162daa0 100644 --- a/externals/coda-oss/modules/c++/mem/source/ScratchMemory.cpp +++ b/externals/coda-oss/modules/c++/mem/source/ScratchMemory.cpp @@ -25,20 +25,15 @@ namespace mem { -ScratchMemory::ScratchMemory() : - mNumBytesNeeded(0), - mOffset(0) -{ -} -ScratchMemory::Segment::Segment(size_t numBytes, - size_t numBuffers, - size_t alignment, - size_t offset) : - numBytes(numBytes), - numBuffers(numBuffers), - alignment(alignment), - offset(offset) +ScratchMemory::Segment::Segment(size_t numBytes_, + size_t numBuffers_, + size_t alignment_, + size_t offset_) : + numBytes(numBytes_), + numBuffers(numBuffers_), + alignment(alignment_), + offset(offset_) { } @@ -185,7 +180,7 @@ void ScratchMemory::setup(const BufferView& scratchBuffer) throw except::Exception(Ctxt( "Buffer has insufficient space for scratch memory")); } - if (scratchBuffer.data == NULL) + if (scratchBuffer.data == nullptr) { throw except::Exception(Ctxt( "Invalid external buffer was provided")); @@ -214,7 +209,7 @@ const ScratchMemory::Segment& ScratchMemory::lookupSegment( const std::string& key, size_t indexBuffer) const { - if (mBuffer.data == NULL) + if (mBuffer.data == nullptr) { std::ostringstream oss; oss << "Tried to get scratch memory for \"" << key diff --git a/externals/coda-oss/modules/c++/mem/tests/ScratchVisualization.cpp b/externals/coda-oss/modules/c++/mem/tests/ScratchVisualization.cpp index 2585f7473f..20974a659c 100644 --- a/externals/coda-oss/modules/c++/mem/tests/ScratchVisualization.cpp +++ b/externals/coda-oss/modules/c++/mem/tests/ScratchVisualization.cpp @@ -32,12 +32,12 @@ namespace { struct Operation { - Operation(const std::string& op, - const std::string& name, - const size_t bytes) : - op(op), - name(name), - bytes(bytes) + Operation(const std::string& op_, + const std::string& name_, + const size_t bytes_) : + op(op_), + name(name_), + bytes(bytes_) { } diff --git a/externals/coda-oss/modules/c++/mt/include/mt/AbstractThreadPool.h b/externals/coda-oss/modules/c++/mt/include/mt/AbstractThreadPool.h index c72e9bd32a..92d3de272b 100644 --- a/externals/coda-oss/modules/c++/mt/include/mt/AbstractThreadPool.h +++ b/externals/coda-oss/modules/c++/mt/include/mt/AbstractThreadPool.h @@ -66,6 +66,11 @@ template class AbstractThreadPool join();//destroy(); } + AbstractThreadPool(const AbstractThreadPool&) = delete; + AbstractThreadPool& operator=(const AbstractThreadPool&) = delete; + AbstractThreadPool(AbstractThreadPool&&) = delete; + AbstractThreadPool& operator=(AbstractThreadPool&&) = delete; + /*! * Intialize and start each thread running. * Typically the caller will either join at this point diff --git a/externals/coda-oss/modules/c++/mt/include/mt/WorkerThread.h b/externals/coda-oss/modules/c++/mt/include/mt/WorkerThread.h index 4e865d0fff..2a2e204684 100644 --- a/externals/coda-oss/modules/c++/mt/include/mt/WorkerThread.h +++ b/externals/coda-oss/modules/c++/mt/include/mt/WorkerThread.h @@ -52,8 +52,12 @@ template class WorkerThread : public sys::Thread /*! * Virtual destructor */ - virtual ~WorkerThread() - {} + virtual ~WorkerThread() = default; + + WorkerThread(const WorkerThread&) = delete; + WorkerThread& operator=(const WorkerThread&) = delete; + WorkerThread(WorkerThread&&) = delete; + WorkerThread& operator=(WorkerThread&&) = delete; virtual void initialize() {} diff --git a/externals/coda-oss/modules/c++/mt/source/GenerationThreadPool.cpp b/externals/coda-oss/modules/c++/mt/source/GenerationThreadPool.cpp index a3776c3e84..651756573c 100644 --- a/externals/coda-oss/modules/c++/mt/source/GenerationThreadPool.cpp +++ b/externals/coda-oss/modules/c++/mt/source/GenerationThreadPool.cpp @@ -29,7 +29,7 @@ mt::TiedRequestHandler::~TiedRequestHandler() if (mAffinityInit) { delete mAffinityInit; - mAffinityInit = NULL; + mAffinityInit = nullptr; } } @@ -50,7 +50,7 @@ void mt::TiedRequestHandler::run() while (true) { // Pull a runnable off the queue - sys::Runnable *handler = NULL; + sys::Runnable *handler = nullptr; mRequestQueue->dequeue(handler); if (!handler) return; @@ -93,7 +93,7 @@ void mt::GenerationThreadPool::waitGroup() /*void mt::GenerationThreadPool::shutdown() { size_t size = mPool.size(); - static sys::Runnable* shutdown = NULL; + static sys::Runnable* shutdown = nullptr; for(unsigned int i=0; i < size; i++) { addRequest(shutdown); diff --git a/externals/coda-oss/modules/c++/mt/source/GenericRequestHandler.cpp b/externals/coda-oss/modules/c++/mt/source/GenericRequestHandler.cpp index 015a77f91a..9fe488668c 100644 --- a/externals/coda-oss/modules/c++/mt/source/GenericRequestHandler.cpp +++ b/externals/coda-oss/modules/c++/mt/source/GenericRequestHandler.cpp @@ -29,7 +29,7 @@ void mt::GenericRequestHandler::run() while (true) { // Pull a runnable off the queue - sys::Runnable* handler = NULL; + sys::Runnable* handler = nullptr; mRequest->dequeue(handler); if (!handler) { diff --git a/externals/coda-oss/modules/c++/mt/source/ThreadGroup.cpp b/externals/coda-oss/modules/c++/mt/source/ThreadGroup.cpp index 85bf054c58..0a3616a39f 100644 --- a/externals/coda-oss/modules/c++/mt/source/ThreadGroup.cpp +++ b/externals/coda-oss/modules/c++/mt/source/ThreadGroup.cpp @@ -34,7 +34,7 @@ namespace mt ThreadGroup::ThreadGroup(bool pinToCPU) : - mAffinityInit(pinToCPU ? new CPUAffinityInitializer() : NULL), + mAffinityInit(pinToCPU ? new CPUAffinityInitializer() : nullptr), mLastJoined(0) { } @@ -163,7 +163,7 @@ void ThreadGroup::ThreadGroupRunnable::run() bool ThreadGroup::isPinToCPUEnabled() const { - return mAffinityInit.get() != NULL; + return mAffinityInit.get() != nullptr; } bool ThreadGroup::getDefaultPinToCPU() diff --git a/externals/coda-oss/modules/c++/net.ssl/source/SSLConnection.cpp b/externals/coda-oss/modules/c++/net.ssl/source/SSLConnection.cpp index e0f37d1e70..75c7f5e031 100644 --- a/externals/coda-oss/modules/c++/net.ssl/source/SSLConnection.cpp +++ b/externals/coda-oss/modules/c++/net.ssl/source/SSLConnection.cpp @@ -30,12 +30,12 @@ net::ssl::SSLConnection::SSLConnection(std::unique_ptr&& socket, const std::string& host) : NetConnection(std::move(socket)), mServerAuthentication(serverAuth) { - mSSL = NULL; + mSSL = nullptr; mBioErr = BIO_new_fp(stderr, BIO_NOCLOSE); mSSL = SSL_new(ctx); - if (mSSL == NULL) + if (mSSL == nullptr) { throw net::ssl::SSLException(Ctxt(FmtX("SSL_new failed"))); } diff --git a/externals/coda-oss/modules/c++/net.ssl/source/SSLConnectionClientFactory.cpp b/externals/coda-oss/modules/c++/net.ssl/source/SSLConnectionClientFactory.cpp index c3cefdd410..5a9d441480 100644 --- a/externals/coda-oss/modules/c++/net.ssl/source/SSLConnectionClientFactory.cpp +++ b/externals/coda-oss/modules/c++/net.ssl/source/SSLConnectionClientFactory.cpp @@ -58,12 +58,12 @@ void net::ssl::SSLConnectionClientFactory::initializeContext() const SSL_METHOD *method = SSLv23_client_method(); #endif - if(method == NULL) + if(method == nullptr) { throw net::ssl::SSLException(Ctxt(FmtX("SSLv23_client_method failed"))); } mCtx = SSL_CTX_new(method); - if(mCtx == NULL) + if(mCtx == nullptr) { throw net::ssl::SSLException(Ctxt(FmtX("SSL_CTX_new failed"))); } diff --git a/externals/coda-oss/modules/c++/net/include/net/NetConnectionServer.h b/externals/coda-oss/modules/c++/net/include/net/NetConnectionServer.h index debc58d32c..e27a0d5432 100644 --- a/externals/coda-oss/modules/c++/net/include/net/NetConnectionServer.h +++ b/externals/coda-oss/modules/c++/net/include/net/NetConnectionServer.h @@ -56,9 +56,12 @@ class NetConnectionServer NetConnectionServer(); //! Destructor. - virtual ~NetConnectionServer() - { - } + virtual ~NetConnectionServer() = default; + + NetConnectionServer(const NetConnectionServer&) = delete; + NetConnectionServer& operator=(const NetConnectionServer&) = delete; + NetConnectionServer(NetConnectionServer&&) = default; + NetConnectionServer& operator=(NetConnectionServer&&) = default; /*! * Create a server on the port, with a backlog queue given in the diff --git a/externals/coda-oss/modules/c++/net/include/net/PerRequestThreadAllocStrategy.h b/externals/coda-oss/modules/c++/net/include/net/PerRequestThreadAllocStrategy.h index c02cb530bb..9568610471 100644 --- a/externals/coda-oss/modules/c++/net/include/net/PerRequestThreadAllocStrategy.h +++ b/externals/coda-oss/modules/c++/net/include/net/PerRequestThreadAllocStrategy.h @@ -61,8 +61,12 @@ class RequestHandlerThread : public sys::Thread {} //! Destructor - ~RequestHandlerThread() - {} + ~RequestHandlerThread() = default; + + RequestHandlerThread(const RequestHandlerThread&) = delete; + RequestHandlerThread& operator=(const RequestHandlerThread&) = delete; + RequestHandlerThread(RequestHandlerThread&&) = delete; + RequestHandlerThread& operator=(RequestHandlerThread&&) = delete; /*! * Overloaded run method for handling a connection. diff --git a/externals/coda-oss/modules/c++/net/include/net/SocketsWin32.h b/externals/coda-oss/modules/c++/net/include/net/SocketsWin32.h index b0490a7c3c..9e363c6488 100644 --- a/externals/coda-oss/modules/c++/net/include/net/SocketsWin32.h +++ b/externals/coda-oss/modules/c++/net/include/net/SocketsWin32.h @@ -20,20 +20,28 @@ * */ -#ifndef __NET_SOCKETS_WIN32_H__ -#define __NET_SOCKETS_WIN32_H__ #pragma once +#ifndef CODA_OSS_net_SocketsWin32_h_INCLUDED_ +#define CODA_OSS_net_SocketsWin32_h_INCLUDED_ #include +#include + +#ifndef _WINSOCK2API_ // already #include'd #undef BIGENDIAN // #define'd in +#define _WINSOCK_DEPRECATED_NO_WARNINGS // '...': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings #include #include -#include + +#endif // _WINSOCK2API_ #ifndef BIGENDIAN #error BIGENDIAN should be #defined! #endif +#include + + /*! * \file * \brief Handle winsock-level callss @@ -97,7 +105,7 @@ inline void Win32SocketInit() inited = true; WORD versionRequested = MAKEWORD(1, 1); WSADATA wsaData; - WSAStartup(versionRequested, &wsaData); + std::ignore = WSAStartup(versionRequested, &wsaData); atexit( net::Win32SocketDestroy ); } } @@ -109,5 +117,4 @@ inline void Win32SocketInit() } - -#endif +#endif // CODA_OSS_net_SocketsWin32_h_INCLUDED_ diff --git a/externals/coda-oss/modules/c++/net/include/net/ThreadPoolAllocStrategy.h b/externals/coda-oss/modules/c++/net/include/net/ThreadPoolAllocStrategy.h index 767e024503..2dc4b0509d 100644 --- a/externals/coda-oss/modules/c++/net/include/net/ThreadPoolAllocStrategy.h +++ b/externals/coda-oss/modules/c++/net/include/net/ThreadPoolAllocStrategy.h @@ -41,6 +41,11 @@ class ConnectionThread: public mt::WorkerThread delete mHandler; } + ConnectionThread(const ConnectionThread&) = delete; + ConnectionThread& operator=(const ConnectionThread&) = delete; + ConnectionThread(ConnectionThread&&) = delete; + ConnectionThread& operator=(ConnectionThread&&) = delete; + /*! * Do this in a loop forever. */ @@ -78,6 +83,11 @@ class ConnectionThreadPool: public mt::AbstractThreadPool delete mFactory; } + ConnectionThreadPool(const ConnectionThreadPool&) = delete; + ConnectionThreadPool& operator=(const ConnectionThreadPool&) = delete; + ConnectionThreadPool(ConnectionThreadPool&&) = delete; + ConnectionThreadPool& operator=(ConnectionThreadPool&&) = delete; + mt::WorkerThread* newWorker() override { return new ConnectionThread(&mRequestQueue, mFactory->create()); diff --git a/externals/coda-oss/modules/c++/net/source/CurlHandle.cpp b/externals/coda-oss/modules/c++/net/source/CurlHandle.cpp index 4840dc8eba..1b3554ccd6 100644 --- a/externals/coda-oss/modules/c++/net/source/CurlHandle.cpp +++ b/externals/coda-oss/modules/c++/net/source/CurlHandle.cpp @@ -31,7 +31,7 @@ namespace net CurlHandle::CurlHandle() : mHandle(curl_easy_init()) { - if (mHandle == NULL) + if (mHandle == nullptr) { throw except::Exception(Ctxt("curl_easy_init() failed")); } @@ -103,7 +103,7 @@ size_t CurlHandle::writeBetterCallback(char* data, size_t nmemb, std::string* writeData) { - if (writeData == NULL) + if (writeData == nullptr) { return 0; } diff --git a/externals/coda-oss/modules/c++/net/source/NetConnectionServer.cpp b/externals/coda-oss/modules/c++/net/source/NetConnectionServer.cpp index e6f4a4c59d..0bb479b621 100644 --- a/externals/coda-oss/modules/c++/net/source/NetConnectionServer.cpp +++ b/externals/coda-oss/modules/c++/net/source/NetConnectionServer.cpp @@ -58,7 +58,7 @@ net::NetConnection* net::NetConnectionServer::accept() void net::NetConnectionServer::initialize(net::RequestHandlerFactory* factory, net::AllocStrategy* newStrategy) { - std::unique_ptr tmp ((newStrategy == NULL) ? + std::unique_ptr tmp ((newStrategy == nullptr) ? new DefaultAllocStrategy() : newStrategy); tmp->setRequestHandlerFactory(factory); diff --git a/externals/coda-oss/modules/c++/net/source/NetUtils.cpp b/externals/coda-oss/modules/c++/net/source/NetUtils.cpp index 98c49d9a6d..5df324fe76 100644 --- a/externals/coda-oss/modules/c++/net/source/NetUtils.cpp +++ b/externals/coda-oss/modules/c++/net/source/NetUtils.cpp @@ -133,7 +133,7 @@ std::string net::unquote(std::string s) { std::string part = parts[i]; std::string hexStr = "0x" + part.substr(0, 2); - long val = strtol(hexStr.c_str(), NULL, 16); + long val = strtol(hexStr.c_str(), nullptr, 16); unquoted << (char) val; if (part.length() > 2) unquoted << part.substr(2); diff --git a/externals/coda-oss/modules/c++/net/source/SocketAddress.cpp b/externals/coda-oss/modules/c++/net/source/SocketAddress.cpp index e5dcf0494c..a6e4e0c9d8 100644 --- a/externals/coda-oss/modules/c++/net/source/SocketAddress.cpp +++ b/externals/coda-oss/modules/c++/net/source/SocketAddress.cpp @@ -20,6 +20,8 @@ * */ +#include + #ifdef _WIN32 #define _WINSOCK_DEPRECATED_NO_WARNINGS #endif @@ -69,7 +71,7 @@ void SocketAddress::setHost(const std::string& host) struct sockaddr saddr; int slen = sizeof(saddr); struct sockaddr_in *paddr = (struct sockaddr_in *)&saddr; - (void) WSAStringToAddress((LPSTR)host.c_str(), AF_INET, NULL, &saddr, &slen); + std::ignore = WSAStringToAddress((LPSTR)host.c_str(), AF_INET, nullptr, &saddr, &slen); mAddress.sin_addr = paddr->sin_addr; #else ::inet_pton(AF_INET, host.c_str(), &mAddress.sin_addr); diff --git a/externals/coda-oss/modules/c++/numpyutils/source/numpyutils.cpp b/externals/coda-oss/modules/c++/numpyutils/source/numpyutils.cpp index 6b8a76a5da..53b8b97b17 100644 --- a/externals/coda-oss/modules/c++/numpyutils/source/numpyutils.cpp +++ b/externals/coda-oss/modules/c++/numpyutils/source/numpyutils.cpp @@ -20,6 +20,12 @@ * */ + +#include "config/compiler_extensions.h" + +#ifndef _MSC_VER +CODA_OSS_disable_warning(-Wold-style-cast) +#endif #include #include #include diff --git a/externals/coda-oss/modules/c++/pch.h b/externals/coda-oss/modules/c++/pch.h index 342ae85267..f39484bc24 100644 --- a/externals/coda-oss/modules/c++/pch.h +++ b/externals/coda-oss/modules/c++/pch.h @@ -4,26 +4,14 @@ // However, files listed here are ALL re-compiled if any one of them is updated between builds. // Do not add files here that you will be updating frequently as this negates the performance advantage. +#pragma once #ifndef CODA_OSS_pch_h_INCLUDED_ #define CODA_OSS_pch_h_INCLUDED_ -#pragma warning(disable: 4619) // #pragma warning: there is no warning number '...' +#include "coda_oss/CPlusPlus.h" +#include "config/disable_compiler_warnings.h" -#pragma warning(disable: 4820) // '...': '...' bytes padding added after data member '...' -#pragma warning(disable: 4668) // '...' is not defined as a preprocessor macro, replacing with '...' for '...' -#pragma warning(disable: 5045) // Compiler will insert Spectre mitigation for memory load if / Qspectre switch specified -#pragma warning(disable: 4514) // '...': unreferenced inline function has been removed - -#pragma warning(push) -#pragma warning(disable: 4710) // '...': function not inlined -#pragma warning(disable: 5027) // '...': move assignment operator was implicitly defined as deleted -#pragma warning(disable: 5026) // '...': move constructor was implicitly defined as deleted -#pragma warning(disable: 4626) // '...': assignment operator was implicitly defined as deleted -#pragma warning(disable: 4625) // '...': copy constructor was implicitly defined as deleted -#pragma warning(disable: 4355) // '...': used in base member initializer list -#pragma warning(disable: 5220) // '...': a non-static data member with a volatile qualified type no longer implies that compiler generated copy/move constructors and copy/move assignment operators are not trivial -#pragma warning(disable: 5204) // '...': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly -#pragma warning(disable: 5264) // '...': '...' variable is not used +CODA_OSS_disable_warning_system_header_push // add headers that you want to pre-compile here #include "framework.h" @@ -36,19 +24,90 @@ #include #include #include +#include + +CODA_OSS_disable_warning_pop #include "import/std.h" -#include -#include -#include -#include -#include -#include -#include -#pragma warning(pop) + +#include +#include +#include #pragma warning(disable: 4251) // '...': class '...' needs to have dll-interface to be used by clients of class '...' -#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior +#pragma warning(disable: 4365) // '...': conversion from '...' to '...', signed/unsigned mismatch +#pragma warning(disable: 5039) // '...': pointer or reference to potentially throwing function passed to '...' function under -EHc. Undefined behavior may occur if this function throws an exception. +#pragma warning(disable: 6326) // Potential comparison of a constant with another constant. +#pragma warning(disable: 6054) // String '...' might not be zero-terminated. +#pragma warning(disable: 6387) // '...' could be '...'. +#pragma warning(disable: 6305) // Potential mismatch between sizeof and countof quantities. Use sizeof() to scale byte sizes. +#pragma warning(disable: 6288) // Incorrect operator. Did you intend to use || instead? +#pragma warning(disable: 6011) // Dereferencing NULL pointer '...'. +#pragma warning(disable: 6313) // Incorrect operator. Use an equality test to check for zero-valued flags. +#pragma warning(disable: 6389) // Move '...' to anonymous namespace or put a forward declaration in a common header included in this file. + +#pragma warning(disable: 26432) // If you define or delete any default operation in the type '...', define or delete them all (c.21). +#pragma warning(disable: 26429) // Symbol '...' is never tested for nullness, it can be marked as not_null (f.23). +#pragma warning(disable: 26455) // Default constructor should not throw. Declare it '...' (f.6). +#pragma warning(disable: 26440) // Function '...' can be declared '...' (f.6). +#pragma warning(disable: 26447) // The function is declared '...' but calls function '...' which may throw exceptions (f.6). +#pragma warning(disable: 26446) // Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4). +#pragma warning(disable: 26481) // Don't use pointer arithmetic. Use span instead (bounds.1). +#pragma warning(disable: 26496) // The variable '...' does not change after construction, mark it as const (con.4). +#pragma warning(disable: 26462) // The value pointed to by '...' is assigned only once, mark it as a pointer to const (con.4). +#pragma warning(disable: 26409) // Avoid calling new and delete explicitly, use std::make_unique instead (r.11). +#pragma warning(disable: 26401) // Do not delete a raw pointer that is not an owner (i.11). +#pragma warning(disable: 26482) // Only index into arrays using constant expressions (bounds.2). +#pragma warning(disable: 26472) // Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or gsl::narrow (type.1). +#pragma warning(disable: 26485) // Expression '...': No array to pointer decay (bounds.3). +#pragma warning(disable: 26493) // Don't use C-style casts (type.4). +#pragma warning(disable: 26451) // Arithmetic overflow: Using operator '...' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '...' to avoid overflow (io.2). +#pragma warning(disable: 26494) // Variable '...' is uninitialized. Always initialize an object (type.5). +#pragma warning(disable: 26814) // The const variable '...' can be computed at compile-time. Consider using constexpr (con.5). +#pragma warning(disable: 26826) // Don't use C-style variable arguments (f.55). +#pragma warning(disable: 26435) // Function '...' should specify exactly one of '...', '...', or '...' (c.128). +#pragma warning(disable: 26434) // Function '...' hides a non-virtual function '...'. +#pragma warning(disable: 26400) // Do not assign the result of an allocation or a function call with an owner return value to a raw pointer, use owner instead (i.11). +#pragma warning(disable: 26433) // Function '...' should be marked with '...' (c.128). +#pragma warning(disable: 26456) // Operator '...' hides a non-virtual operator '...' (c.128). +#pragma warning(disable: 26465) // Don't use const_cast to cast away const or volatile. const_cast is not required; constness or volatility is not being removed by this conversion (type.3). +#pragma warning(disable: 26408) // Avoid malloc() and free(), prefer the nothrow version of new with delete (r.10). +#pragma warning(disable: 26471) // Don't use reinterpret_cast. A cast from void* can use static_cast (type.1). +#pragma warning(disable: 26490) // Don't use reinterpret_cast (type.1). +#pragma warning(disable: 26460) // The reference argument '...' for function '...' can be marked as const (con.3). +#pragma warning(disable: 26495) // Variable '...' is uninitialized. Always initialize a member variable (type.6). +#pragma warning(disable: 26461) // The pointer argument '...' for function '...' can be marked as a pointer to const (con.3). +#pragma warning(disable: 26436) // The type '...' with a virtual function needs either public virtual or protected non-virtual destructor (c.35). +#pragma warning(disable: 26467) // Converting from floating point to unsigned integral types results in non-portable code if the double/float has a negative value. Use gsl::narrow_cast or gsl::narrow instead to guard against undefined behavior and potential data loss (es.46). +#pragma warning(disable: 26135) // Missing annotation _Acquires_lock_(this->mNative) at function '...'. +#pragma warning(disable: 28159) // Consider using '...' instead of '...'. Reason: Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers. +#pragma warning(disable: 26439) // This kind of function should not throw. Declare it '...' (f.6). +#pragma warning(disable: 26454) // Arithmetic overflow: '...' operation produces a negative unsigned result at compile time (io.5). +#pragma warning(disable: 26492) // Don't use const_cast to cast away const or volatile (type.3). +#pragma warning(disable: 26110) // Caller failing to hold lock '...' before calling function '...'. +#pragma warning(disable: 26459) // You called an STL function '...' with a raw pointer parameter at position '...' that may be unsafe - this relies on the caller to check that the passed values are correct. Consider wrapping your range in a gsl::span and pass as a span iterator (stl.1). +#pragma warning(disable: 26473) // Don't cast between pointer types where the source type and the target type are the same (type.1). +#pragma warning(disable: 26491) // Don't use static_cast downcasts (type.2). +#pragma warning(disable: 26405) // Do not assign to an owner which may be in valid state (r.3). +#pragma warning(disable: 26403) // Reset or explicitly delete an owner pointer '...' (r.3). +#pragma warning(disable: 26489) // Don't dereference a pointer that may be invalid: '...'. '...' may have been invalidated at line 132 (lifetime.1). +#pragma warning(disable: 26486) // Don't pass a pointer that may be invalid to a function. Parameter 0 '...' in call to '...' may be invalid (lifetime.3). +#pragma warning(disable: 26823) // Dereferencing a possibly null pointer '...' (lifetime.1). +#pragma warning(disable: 26487) // Don't return a pointer '...' that may be invalid (lifetime.4). +#pragma warning(disable: 26812) // The enum type '...' is unscoped. Prefer '...' over '...' (Enum.3). +#pragma warning(disable: 26822) // Dereferencing a null pointer '...' (lifetime.1). +#pragma warning(disable: 26458) // Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4). + +// Yes, these are our files ... but they don't change very often, and if they do +// change we want to rebuild everything anyway. +#include "gsl/gsl.h" +#include "config/Exports.h" +#include "except/Throwable.h" +#include "sys/Conf.h" +#include "sys/filesystem.h" +#include "mem/SharedPtr.h" +#include "xml/lite/xerces_.h" +#include "hdf5/lite/H5_.h" #endif //CODA_OSS_pch_h_INCLUDED_ diff --git a/externals/coda-oss/modules/c++/re/include/re/Regex.h b/externals/coda-oss/modules/c++/re/include/re/Regex.h index 5a6234b4d6..d7dd55dd21 100644 --- a/externals/coda-oss/modules/c++/re/include/re/Regex.h +++ b/externals/coda-oss/modules/c++/re/include/re/Regex.h @@ -205,10 +205,6 @@ class CODA_OSS_API Regex //! The regex object std::regex mRegex; - static const std::regex badDotRegex; - static const std::regex invalidCaret; - static const std::regex invalidDollar; - #else // Internal function for passing flags to pcre2_match() std::string search(const std::string& matchString, diff --git a/externals/coda-oss/modules/c++/re/source/RegexPCRE.cpp b/externals/coda-oss/modules/c++/re/source/RegexPCRE.cpp index e641e2d57d..479d1fac72 100644 --- a/externals/coda-oss/modules/c++/re/source/RegexPCRE.cpp +++ b/externals/coda-oss/modules/c++/re/source/RegexPCRE.cpp @@ -29,6 +29,11 @@ #include +#ifndef _MSC_VER +#include "config/compiler_extensions.h" +CODA_OSS_disable_warning(-Wold-style-cast) +#endif + namespace { std::string getErrorMessage(int errorCode) diff --git a/externals/coda-oss/modules/c++/re/source/RegexSTL.cpp b/externals/coda-oss/modules/c++/re/source/RegexSTL.cpp index 29aed5dd46..ea0bc2bc95 100644 --- a/externals/coda-oss/modules/c++/re/source/RegexSTL.cpp +++ b/externals/coda-oss/modules/c++/re/source/RegexSTL.cpp @@ -30,15 +30,28 @@ namespace re { -// This is a raw literal, so ignore the R"lit( )lit" -const std::regex Regex::badDotRegex( R"lit(((^|[^\\])(\\\\)*)\.)lit", - std::regex::ECMAScript|std::regex::optimize ); -const std::regex Regex::invalidCaret( R"lit([\s\S]*([^\[\\]|[^\\](\\\\)+)\^)lit", +// These are a raw literals, so ignore the R"lit( )lit" +static const std::regex& badDotRegex() +{ + static const std::regex retval(R"lit(((^|[^\\])(\\\\)*)\.)lit", + std::regex::ECMAScript | std::regex::optimize); + return retval; +} + +static const std::regex& invalidCaret() +{ + static const std::regex retval( R"lit([\s\S]*([^\[\\]|[^\\](\\\\)+)\^)lit", std::regex::ECMAScript|std::regex::optimize ); + return retval; +} -const std::regex Regex::invalidDollar( R"lit(^([\s\S]*[^\\](\\\\)*)?\$[\s\S]+$)lit", - std::regex::ECMAScript|std::regex::optimize ); +static const std::regex& invalidDollar() +{ + static const std::regex retval( R"lit(^([\s\S]*[^\\](\\\\)*)?\$[\s\S]+$)lit", + std::regex::ECMAScript|std::regex::optimize ); + return retval; +} Regex::Regex(const std::string& pattern) : mPattern(pattern) @@ -91,8 +104,7 @@ Regex& Regex::compile(const std::string& pattern) std::smatch tmpmatch; // Look for ^ in the middle, but ignore \^ and [^ - if (std::regex_search(mPattern, tmpmatch, - invalidCaret, + if (std::regex_search(mPattern, tmpmatch, invalidCaret(), std::regex_constants::match_continuous)) { std::string msg( @@ -102,8 +114,7 @@ Regex& Regex::compile(const std::string& pattern) } // Look for $ in the middle, but ignore \$ - if (std::regex_match(mPattern, tmpmatch, - invalidDollar)) + if (std::regex_match(mPattern, tmpmatch, invalidDollar())) { std::string msg( "'$' in mid-string is not handled the same by gcc and VS2015!"); @@ -231,7 +242,7 @@ std::string Regex::replaceDot(const std::string& str) const // This makes sure we're not grabbing "\." // Replace just the "." with "[\s\S]" - std::string newstr = std::regex_replace(str, badDotRegex, "$1[\\s\\S]"); + std::string newstr = std::regex_replace(str, badDotRegex(), "$1[\\s\\S]"); return newstr; } diff --git a/externals/coda-oss/modules/c++/sio.lite/include/sio/lite/SioFileWriter.h b/externals/coda-oss/modules/c++/sio.lite/include/sio/lite/SioFileWriter.h index a674a4f60b..8d75266d52 100644 --- a/externals/coda-oss/modules/c++/sio.lite/include/sio/lite/SioFileWriter.h +++ b/externals/coda-oss/modules/c++/sio.lite/include/sio/lite/SioFileWriter.h @@ -78,6 +78,11 @@ struct FileWriter if (!mAdopt) mStream.release(); } + FileWriter(const FileWriter&) = delete; + FileWriter& operator=(const FileWriter&) = delete; + FileWriter(FileWriter&&) = default; + FileWriter& operator=(FileWriter&&) = default; + /*! * Writes the SIO given the FileHeader and InputStreams. */ diff --git a/externals/coda-oss/modules/c++/sio.lite/source/StreamReader.cpp b/externals/coda-oss/modules/c++/sio.lite/source/StreamReader.cpp index d629f809c5..2677d9f9b1 100644 --- a/externals/coda-oss/modules/c++/sio.lite/source/StreamReader.cpp +++ b/externals/coda-oss/modules/c++/sio.lite/source/StreamReader.cpp @@ -30,7 +30,7 @@ union _IntBuffer int sio::lite::StreamReader::getNextInteger() { - if (header == NULL) + if (header == nullptr) throw sio::lite::InvalidHeaderException( Ctxt("Header == null") @@ -94,7 +94,7 @@ void sio::lite::StreamReader::killHeader() { if (header) delete header; - header = NULL; + header = nullptr; // Reset length so we always have a correct value headerLength = 0; } diff --git a/externals/coda-oss/modules/c++/std/include/import/cpp14.h b/externals/coda-oss/modules/c++/std/include/import/cpp14.h deleted file mode 100644 index 1bc2640a5f..0000000000 --- a/externals/coda-oss/modules/c++/std/include/import/cpp14.h +++ /dev/null @@ -1,60 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2023, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#pragma once -#ifndef CODA_OSS_import_cpp14_h_INCLUDED_ -#define CODA_OSS_import_cpp14_h_INCLUDED_ - -// Common C++14 headers -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#endif // CODA_OSS_import_cpp14_h_INCLUDED_ - - diff --git a/externals/coda-oss/modules/c++/std/include/import/cpp17.h b/externals/coda-oss/modules/c++/std/include/import/cpp17.h deleted file mode 100644 index a03b2c5dad..0000000000 --- a/externals/coda-oss/modules/c++/std/include/import/cpp17.h +++ /dev/null @@ -1,36 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2023, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#ifndef CODA_OSS_import_cpp17_h_INCLUDED_ -#define CODA_OSS_import_cpp17_h_INCLUDED_ -#pragma once - -#include "cpp14.h" - -// Common C++17 headers -#include -#include - -#endif // CODA_OSS_import_cpp17_h_INCLUDED_ - - diff --git a/externals/coda-oss/modules/c++/std/include/import/std.h b/externals/coda-oss/modules/c++/std/include/import/std.h index 426a80f0c4..4dee10481c 100644 --- a/externals/coda-oss/modules/c++/std/include/import/std.h +++ b/externals/coda-oss/modules/c++/std/include/import/std.h @@ -29,11 +29,10 @@ #include "coda_oss/CPlusPlus.h" #include "config/disable_compiler_warnings.h" -CODA_OSS_disable_warning_push +CODA_OSS_disable_warning_system_header_push #if _MSC_VER #pragma warning(disable: 4619) // #pragma warning: there is no warning number '...' -#pragma warning(disable: 4710) // '...': function not inlined #pragma warning(disable: 5027) // '...': move assignment operator was implicitly defined as deleted #pragma warning(disable: 5026) // '...': move constructor was implicitly defined as deleted #pragma warning(disable: 4626) // '...': assignment operator was implicitly defined as deleted @@ -44,12 +43,63 @@ CODA_OSS_disable_warning_push #pragma warning(disable: 5264) // '...': '...' variable is not used #endif // _MSC_VER -// Common C++14 headers -#include "cpp14.h" +#include +#include +#include +#include +#include +#include +#include +#include -#if CODA_OSS_cpp17 -#include "cpp17.h" -#endif +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +//#include +#include +#include +#include +#include +#include +#include +#include CODA_OSS_disable_warning_pop diff --git a/externals/coda-oss/modules/c++/str/source/Encoding.cpp b/externals/coda-oss/modules/c++/str/source/Encoding.cpp index 86a879b0c4..46ce45b738 100644 --- a/externals/coda-oss/modules/c++/str/source/Encoding.cpp +++ b/externals/coda-oss/modules/c++/str/source/Encoding.cpp @@ -33,56 +33,74 @@ #include #include +#include "gsl/gsl.h" +#include "config/compiler_extensions.h" + #include "str/Encoding.h" #include "str/Manip.h" #include "str/Convert.h" -#include "str/utf8.h" #include "str/EncodedStringView.h" + +CODA_OSS_disable_warning_push +#if _MSC_VER +#pragma warning(disable: 26818) // Switch statement does not cover all cases. Consider adding a '...' label (es.79). +#else +CODA_OSS_disable_warning(-Wshadow) +#endif +#include "str/utf8.h" +CODA_OSS_disable_warning_pop + // Need to look up characters from \x80 (EURO SIGN) to \x9F (LATIN CAPITAL LETTER Y WITH DIAERESIS) // in a map: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT -inline coda_oss::u8string utf8_(std::u32string::value_type ch) +inline coda_oss::u8string utf8_(uint32_t i) { + const auto ch = gsl::narrow(i); return str::to_u8string(std::u32string{ch}); } -static const std::map Windows1252_x80_x9F_to_u8string{ - {0x80, utf8_(0x20AC) } // EURO SIGN - // , {0x81, replacement_character } // UNDEFINED - , {0x82, utf8_(0x201A) } // SINGLE LOW-9 QUOTATION MARK - , {0x83, utf8_(0x0192) } // LATIN SMALL LETTER F WITH HOOK - , {0x84, utf8_(0x201E) } // DOUBLE LOW-9 QUOTATION MARK - , {0x85, utf8_(0x2026) } // HORIZONTAL ELLIPSIS - , {0x86, utf8_(0x2020) } // DAGGER - , {0x87, utf8_(0x2021) } // DOUBLE DAGGER - , {0x88, utf8_(0x02C6) } // MODIFIER LETTER CIRCUMFLEX ACCENT - , {0x89, utf8_(0x2030) } // PER MILLE SIGN - , {0x8A, utf8_(0x0160) } // LATIN CAPITAL LETTER S WITH CARON - , {0x8B, utf8_(0x2039) } // SINGLE LEFT-POINTING ANGLE QUOTATION MARK - , {0x8C, utf8_(0x0152) } // LATIN CAPITAL LIGATURE OE - //, {0x8D, replacement_character } // UNDEFINED - , {0x8E, utf8_(0x017D) } // LATIN CAPITAL LETTER Z WITH CARON - //, {0x8F, replacement_character } // UNDEFINED - //, {0x90, replacement_character } // UNDEFINED - , {0x91, utf8_(0x2018) } // LEFT SINGLE QUOTATION MARK - , {0x92, utf8_(0x2019) } // RIGHT SINGLE QUOTATION MARK - , {0x93, utf8_(0x201C) } // LEFT DOUBLE QUOTATION MARK - , {0x94, utf8_(0x201D) } // RIGHT DOUBLE QUOTATION MARK - , {0x95, utf8_(0x2022) } // BULLET - , {0x96, utf8_(0x2013) } // EN DASH - , {0x97, utf8_(0x2014) } // EM DASH - , {0x98, utf8_(0x02DC) } // SMALL TILDE - , {0x99, utf8_(0x2122) } // TRADE MARK SIGN - , {0x9A, utf8_(0x0161) } // LATIN SMALL LETTER S WITH CARON - , {0x9B, utf8_(0x203A) } // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - , {0x9C, utf8_(0x0153) } // LATIN SMALL LIGATURE OE - //, {0x9D, replacement_character } // UNDEFINED - , {0x9E, utf8_(0x017E) } // LATIN SMALL LETTER Z WITH CARON - , {0x9F, utf8_(0x0178) } // LATIN CAPITAL LETTER Y WITH DIAERESIS -}; -static std::map Windows1252_to_u8string() +static const auto& Windows1252_x80_x9F_to_u8string() +{ + static const std::map retval { + {0x80, utf8_(0x20AC) } // EURO SIGN + // , {0x81, replacement_character } // UNDEFINED + , {0x82, utf8_(0x201A) } // SINGLE LOW-9 QUOTATION MARK + , {0x83, utf8_(0x0192) } // LATIN SMALL LETTER F WITH HOOK + , {0x84, utf8_(0x201E) } // DOUBLE LOW-9 QUOTATION MARK + , {0x85, utf8_(0x2026) } // HORIZONTAL ELLIPSIS + , {0x86, utf8_(0x2020) } // DAGGER + , {0x87, utf8_(0x2021) } // DOUBLE DAGGER + , {0x88, utf8_(0x02C6) } // MODIFIER LETTER CIRCUMFLEX ACCENT + , {0x89, utf8_(0x2030) } // PER MILLE SIGN + , {0x8A, utf8_(0x0160) } // LATIN CAPITAL LETTER S WITH CARON + , {0x8B, utf8_(0x2039) } // SINGLE LEFT-POINTING ANGLE QUOTATION MARK + , {0x8C, utf8_(0x0152) } // LATIN CAPITAL LIGATURE OE + //, {0x8D, replacement_character } // UNDEFINED + , {0x8E, utf8_(0x017D) } // LATIN CAPITAL LETTER Z WITH CARON + //, {0x8F, replacement_character } // UNDEFINED + //, {0x90, replacement_character } // UNDEFINED + , {0x91, utf8_(0x2018) } // LEFT SINGLE QUOTATION MARK + , {0x92, utf8_(0x2019) } // RIGHT SINGLE QUOTATION MARK + , {0x93, utf8_(0x201C) } // LEFT DOUBLE QUOTATION MARK + , {0x94, utf8_(0x201D) } // RIGHT DOUBLE QUOTATION MARK + , {0x95, utf8_(0x2022) } // BULLET + , {0x96, utf8_(0x2013) } // EN DASH + , {0x97, utf8_(0x2014) } // EM DASH + , {0x98, utf8_(0x02DC) } // SMALL TILDE + , {0x99, utf8_(0x2122) } // TRADE MARK SIGN + , {0x9A, utf8_(0x0161) } // LATIN SMALL LETTER S WITH CARON + , {0x9B, utf8_(0x203A) } // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + , {0x9C, utf8_(0x0153) } // LATIN SMALL LIGATURE OE + //, {0x9D, replacement_character } // UNDEFINED + , {0x9E, utf8_(0x017E) } // LATIN SMALL LETTER Z WITH CARON + , {0x9F, utf8_(0x0178) } // LATIN CAPITAL LETTER Y WITH DIAERESIS + }; + return retval; +} + +static auto Windows1252_to_u8string() { - auto retval = Windows1252_x80_x9F_to_u8string; + auto retval = Windows1252_x80_x9F_to_u8string(); // Add the ISO8859-1 values to the map too. 1) We're already looking // in the map anyway for Windows-1252 characters. 2) Need map diff --git a/externals/coda-oss/modules/c++/str/source/Format.cpp b/externals/coda-oss/modules/c++/str/source/Format.cpp index 2d24470881..b89c974e8f 100644 --- a/externals/coda-oss/modules/c++/str/source/Format.cpp +++ b/externals/coda-oss/modules/c++/str/source/Format.cpp @@ -22,8 +22,11 @@ #include "str/Format.h" + #include +#include +#include static std::string vformat(const char* format, va_list& args) { @@ -36,12 +39,24 @@ static std::string vformat(const char* format, va_list& args) return std::string(buffer); } +inline void va_end_(va_list& args) +{ + CODA_OSS_disable_warning_push + #if _MSC_VER + #pragma warning(disable : 26477) // Use '...' rather than 0 or NULL(es .47). + #endif + + va_end(args); + + CODA_OSS_disable_warning_pop +} + std::string str::format(const char *format, ...) { va_list args; va_start(args, format); auto retval = vformat(format, args); - va_end(args); + va_end_(args); return retval; } @@ -50,6 +65,6 @@ str::Format::Format(const char* format, ...) va_list args; va_start(args, format); auto result = vformat(format, args); - va_end(args); + va_end_(args); mString = std::move(result); } diff --git a/externals/coda-oss/modules/c++/str/source/Manip.cpp b/externals/coda-oss/modules/c++/str/source/Manip.cpp index 9efdac7166..f8dbce7db7 100644 --- a/externals/coda-oss/modules/c++/str/source/Manip.cpp +++ b/externals/coda-oss/modules/c++/str/source/Manip.cpp @@ -33,6 +33,8 @@ #include #include +#include "gsl/gsl.h" + #include "str/Convert.h" #include "str/Encoding.h" @@ -81,7 +83,7 @@ inline void trim_(std::basic_string & s) } s.erase(0, i); - for (i = s.length() - 1; (int) i >= 0; i--) + for (i = s.length() - 1; static_cast(i) >= 0; i--) { if (!iswspace(static_cast(s[i]))) break; @@ -251,10 +253,16 @@ bool containsOnly(const std::string& s, const std::string& validChars) typedef std::string::const_iterator StringIter; std::vector chars(255, false); for (StringIter it = validChars.begin(); it != validChars.end(); ++it) - chars[(unsigned int)*it] = true; + { + const auto i = gsl::narrow(*it); + chars[i] = true; + } for (StringIter it = s.begin(); it != s.end(); ++it) - if (!chars[(unsigned int)*it]) + { + const auto i = gsl::narrow(*it); + if (!chars[i]) return false; + } return true; } diff --git a/externals/coda-oss/modules/c++/str/unittests/test_base_convert.cpp b/externals/coda-oss/modules/c++/str/unittests/test_base_convert.cpp index 358fa6827a..71ee45016d 100644 --- a/externals/coda-oss/modules/c++/str/unittests/test_base_convert.cpp +++ b/externals/coda-oss/modules/c++/str/unittests/test_base_convert.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "TestCase.h" @@ -44,14 +45,14 @@ inline static void test_assert_eq(const std::string& testName, const std::u8stri TEST_CASE(testConvert) { - TEST_ASSERT_EQ(str::toType("0x3BC7", 16), (long long) 0x3BC7); - TEST_ASSERT_EQ(str::toType("1101", 2), (long long) 13); - TEST_ASSERT_EQ(str::toType("231", 5), (long long) 66); + TEST_ASSERT_EQ(str::toType("0x3BC7", 16), gsl::narrow(0x3BC7)); + TEST_ASSERT_EQ(str::toType("1101", 2), gsl::narrow(13)); + TEST_ASSERT_EQ(str::toType("231", 5), gsl::narrow(66)); TEST_ASSERT_EQ(str::toType("0xFFFFFFFFFFFFFFFF", 16), - (unsigned long long) 0xFFFFFFFFFFFFFFFF); + gsl::narrow(0xFFFFFFFFFFFFFFFF)); TEST_ASSERT_EQ(str::toType("-10", 10), - (unsigned long long) -10); - TEST_ASSERT_EQ(str::toType("13", 4), (short) 7); + gsl::narrow_cast(-10)); + TEST_ASSERT_EQ(str::toType("13", 4), gsl::narrow(7)); } TEST_CASE(testBadConvert) diff --git a/externals/coda-oss/modules/c++/str/unittests/test_str.cpp b/externals/coda-oss/modules/c++/str/unittests/test_str.cpp index e04b8ce7ba..a3381632d8 100644 --- a/externals/coda-oss/modules/c++/str/unittests/test_str.cpp +++ b/externals/coda-oss/modules/c++/str/unittests/test_str.cpp @@ -199,9 +199,9 @@ TEST_CASE(testRoundDouble) nv *= denom; TEST_ASSERT_ALMOST_EQ_EPS(nv, numerator, eps); std::cout << nv << std::endl; - std::cout << (nv - (int)nv) << std::endl; + std::cout << (nv - static_cast(nv)) << std::endl; std::cout << std::numeric_limits::epsilon() << std::endl; - TEST_ASSERT_EQ((int)std::ceil(nv), (int)numerator); + TEST_ASSERT_EQ(static_cast(std::ceil(nv)), static_cast(numerator)); } TEST_CASE(testEscapeForXMLNoReplace) @@ -335,4 +335,4 @@ TEST_MAIN( TEST_CHECK(test_toTypeComplexFloat); TEST_CHECK(test_toStringComplexShort); TEST_CHECK(test_toTypeComplexShort); - ) \ No newline at end of file + ) diff --git a/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h b/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h index 8457c16b6d..1b040790e0 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h @@ -352,10 +352,8 @@ struct CODA_OSS_API AbstractOS class AbstractDirectory { public: - AbstractDirectory() - { - } - virtual ~AbstractDirectory() + AbstractDirectory() = default; + virtual ~AbstractDirectory() noexcept(false) { } virtual void close() = 0; diff --git a/externals/coda-oss/modules/c++/sys/include/sys/Conf.h b/externals/coda-oss/modules/c++/sys/include/sys/Conf.h index 111e5f9c86..45cf7da292 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/Conf.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/Conf.h @@ -21,9 +21,9 @@ * */ +#pragma once #ifndef CODA_OSS_sys_Conf_h_INCLUDED_ #define CODA_OSS_sys_Conf_h_INCLUDED_ -#pragma once // In case there is still a WIN32 (should be "_WIN32" with a leading '_') someplace. #if defined(_WIN32) && !defined(WIN32) diff --git a/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h b/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h index acd05b980e..5c896f354a 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/Dbg.h @@ -196,14 +196,14 @@ namespace sys * \param format * \param ... Put in any format value here */ -CODA_OSS_API void dbgPrintf(const char *format, ...); +CODA_OSS_API void dbgPrintf(const char *format, ...) noexcept; /*! * Prints to DEBUG_STREAM and kills the program * \param format * \param ... Put in any format value here */ -void diePrintf(const char *format, ...); +void diePrintf(const char* format, ...) noexcept; } #define dbg_printf sys::dbgPrintf diff --git a/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h b/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h index ffba1f30b2..c39d3b8460 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/OSWin32.h @@ -270,7 +270,7 @@ struct CODA_OSS_API OSWin32 final : public AbstractOS struct DirectoryWin32 final : public AbstractDirectory { DirectoryWin32() = default; - virtual ~DirectoryWin32() + virtual ~DirectoryWin32() noexcept(false) { close(); } diff --git a/externals/coda-oss/modules/c++/sys/include/sys/ReadWriteMutex.h b/externals/coda-oss/modules/c++/sys/include/sys/ReadWriteMutex.h index e3141a7ddc..1200514cbf 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/ReadWriteMutex.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/ReadWriteMutex.h @@ -51,7 +51,7 @@ struct ReadWriteMutex } //! Destructor - virtual ~ReadWriteMutex() + virtual ~ReadWriteMutex() { dbg_printf("Destroying a read/write mutex\n"); } diff --git a/externals/coda-oss/modules/c++/sys/include/sys/String.h b/externals/coda-oss/modules/c++/sys/include/sys/String.h deleted file mode 100644 index 5adc016f11..0000000000 --- a/externals/coda-oss/modules/c++/sys/include/sys/String.h +++ /dev/null @@ -1,29 +0,0 @@ -/* ========================================================================= - * This file is part of sys-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * - * sys-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#ifndef CODA_OSS_sys_String_h_INCLUDED_ -#define CODA_OSS_sys_String_h_INCLUDED_ -#pragma once - -#include "str/String_.h" - -#endif // CODA_OSS_sys_String_h_INCLUDED_ diff --git a/externals/coda-oss/modules/c++/sys/include/sys/ThreadInterface.h b/externals/coda-oss/modules/c++/sys/include/sys/ThreadInterface.h index 576f643471..e536fe48e7 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/ThreadInterface.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/ThreadInterface.h @@ -47,7 +47,7 @@ namespace sys * { * // declare this function. * STANDARD_START_CALL(Win32Thread, v); - * return NULL; + * return nullptr; * } * \endcode */ diff --git a/externals/coda-oss/modules/c++/sys/include/sys/ThreadPosix.h b/externals/coda-oss/modules/c++/sys/include/sys/ThreadPosix.h index 5e5efe8c29..26a17b1751 100644 --- a/externals/coda-oss/modules/c++/sys/include/sys/ThreadPosix.h +++ b/externals/coda-oss/modules/c++/sys/include/sys/ThreadPosix.h @@ -49,7 +49,7 @@ namespace sys */ inline long getThreadID() { - return (long)pthread_self(); + return static_cast(pthread_self()); } /*! diff --git a/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp b/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp index 773067c1be..e32b44d879 100644 --- a/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp +++ b/externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -405,7 +406,13 @@ static std::string getSpecialEnv_SECONDS(const AbstractOS&, const std::string& e #endif return getSpecialEnv_SECONDS_(); } + +CODA_OSS_disable_warning_push +#if _MSC_VER +#pragma warning(disable: 26426) // Global initializer calls a non-constexpr function '...' (i.22). +#endif static std::string strUnusedSeconds = getSpecialEnv_SECONDS_(); // "start" the "shell" +CODA_OSS_disable_warning_pop // See https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html // and https://wiki.bash-hackers.org/syntax/shellvars diff --git a/externals/coda-oss/modules/c++/sys/source/ConditionVarPosix.cpp b/externals/coda-oss/modules/c++/sys/source/ConditionVarPosix.cpp index 267a339275..505a17634b 100644 --- a/externals/coda-oss/modules/c++/sys/source/ConditionVarPosix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ConditionVarPosix.cpp @@ -22,6 +22,8 @@ #include +#include "gsl/gsl.h" + #if CODA_OSS_POSIX_SOURCE #include @@ -85,8 +87,8 @@ void sys::ConditionVarPosix::wait(double seconds) if ( seconds > 0 ) { timespec tout; - tout.tv_sec = time(NULL) + (int)seconds; - tout.tv_nsec = (int)((seconds - (int)(seconds)) * 1e9); + tout.tv_sec = time(NULL) + gsl::narrow_cast(seconds); + tout.tv_nsec = gsl::narrow_cast((seconds - gsl::narrow_cast(seconds)) * 1e9); if (::pthread_cond_timedwait(&mNative, &(mMutex->getNative()), &tout) != 0) diff --git a/externals/coda-oss/modules/c++/sys/source/ConditionVarWin32.cpp b/externals/coda-oss/modules/c++/sys/source/ConditionVarWin32.cpp index 45ffac49a7..eb719a428e 100644 --- a/externals/coda-oss/modules/c++/sys/source/ConditionVarWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ConditionVarWin32.cpp @@ -41,6 +41,11 @@ namespace LeaveCriticalSection(&mCriticalSection); } + ScopedCriticalSection(const ScopedCriticalSection&) = delete; + ScopedCriticalSection& operator=(const ScopedCriticalSection&) = delete; + ScopedCriticalSection(ScopedCriticalSection&&) = delete; + ScopedCriticalSection& operator=(ScopedCriticalSection&&) = delete; + private: CRITICAL_SECTION& mCriticalSection; }; @@ -48,12 +53,12 @@ namespace sys::ConditionVarDataWin32::ConditionVarDataWin32(): mNumWaiters(0), - mSemaphore(CreateSemaphore(NULL, 0, 0x7FFFFFFF, NULL)), - mWaitersAreDone(CreateEvent(NULL, FALSE, FALSE, NULL)), + mSemaphore(CreateSemaphore(nullptr, 0, 0x7FFFFFFF, nullptr)), + mWaitersAreDone(CreateEvent(nullptr, FALSE, FALSE, nullptr)), mWasBroadcast(false) { InitializeCriticalSection(&mNumWaitersCS); - if (mSemaphore == NULL || mWaitersAreDone == NULL) + if (mSemaphore == nullptr || mWaitersAreDone == nullptr) { throw sys::SystemException( "ConditionVarDataWin32 Initializer failed"); @@ -163,7 +168,7 @@ void sys::ConditionVarDataWin32::signal() // If there are waiters, increment the semaphore by 1 to wake one up if (haveWaiters) { - ReleaseSemaphore(mSemaphore, 1, NULL); + ReleaseSemaphore(mSemaphore, 1, nullptr); } } @@ -179,7 +184,7 @@ void sys::ConditionVarDataWin32::broadcast() { mWasBroadcast = true; haveWaiters = true; - ReleaseSemaphore(mSemaphore, static_cast(mNumWaiters), 0); + ReleaseSemaphore(mSemaphore, static_cast(mNumWaiters), nullptr); } else { diff --git a/externals/coda-oss/modules/c++/sys/source/Conf.cpp b/externals/coda-oss/modules/c++/sys/source/Conf.cpp index 326b3cac71..1358a1e81e 100644 --- a/externals/coda-oss/modules/c++/sys/source/Conf.cpp +++ b/externals/coda-oss/modules/c++/sys/source/Conf.cpp @@ -85,8 +85,9 @@ constexpr inline bool is_big_or_little_endian() inline bool testIsBigEndianSystem() { // This is an endian test - int intVal = 1; - unsigned char* endianTest = (unsigned char*)&intVal; + static const int intVal = 1; + const void* const pIntVal = &intVal; + const auto endianTest = static_cast(pIntVal); return endianTest[0] != 1; } inline auto isBigEndianSystem_() diff --git a/externals/coda-oss/modules/c++/sys/source/DLLUnix.cpp b/externals/coda-oss/modules/c++/sys/source/DLLUnix.cpp index a0bb26ecfb..f43457e69a 100644 --- a/externals/coda-oss/modules/c++/sys/source/DLLUnix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/DLLUnix.cpp @@ -58,7 +58,7 @@ void sys::DLL::unload() throw sys::DLLException("Failed to close library"); // Now we reset member data - mLib = NULL; + mLib = nullptr; mLibName.clear(); } } @@ -72,7 +72,7 @@ sys::DLL::retrieve(const std::string& functionName) DLL_FUNCTION_PTR ptr = dlsym( mLib , functionName.c_str()); // Now we check the ptr value - if (ptr == NULL) + if (ptr == nullptr) throw sys::DLLException("Failed to load function"); return ptr; diff --git a/externals/coda-oss/modules/c++/sys/source/DLLWin32.cpp b/externals/coda-oss/modules/c++/sys/source/DLLWin32.cpp index d3d6ff48ba..466f7d2952 100644 --- a/externals/coda-oss/modules/c++/sys/source/DLLWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/DLLWin32.cpp @@ -58,7 +58,7 @@ void sys::DLL::unload() FreeLibrary( mLib ); // Now we reset member data - mLib = NULL; + mLib = nullptr; mLibName.clear(); } } @@ -67,14 +67,14 @@ DLL_FUNCTION_PTR sys::DLL:: retrieve(const std::string& functionName) { // Check to make sure we have a library - if ( mLib != NULL ) + if ( mLib != nullptr ) { // Now we get a ptr DLL_FUNCTION_PTR ptr = (DLL_FUNCTION_PTR) GetProcAddress(mLib, functionName.c_str()); // Now we check the ptr value - if (ptr == NULL) + if (ptr == nullptr) throw sys::DLLException(FmtX("Failed to load function: %s", functionName.c_str())); return ptr; diff --git a/externals/coda-oss/modules/c++/sys/source/DateTime.cpp b/externals/coda-oss/modules/c++/sys/source/DateTime.cpp index 9aaa96a7bf..e0f411d5bc 100644 --- a/externals/coda-oss/modules/c++/sys/source/DateTime.cpp +++ b/externals/coda-oss/modules/c++/sys/source/DateTime.cpp @@ -349,7 +349,7 @@ char* strptime(const char *buf, const char *fmt, struct tm& tm, double& millis) } // LINTED functional specification - return ((char *) bp); + return const_cast(bp); } } @@ -371,14 +371,14 @@ void sys::DateTime::fromMillis(const tm& t) mHour = t.tm_hour; mMinute = t.tm_min; - const size_t timeInSeconds = (size_t)(mTimeInMillis / 1000); - const double timediff = ((double)mTimeInMillis / 1000.0) - timeInSeconds; + const auto timeInSeconds = gsl::narrow_cast(mTimeInMillis / 1000); + const auto timediff = (gsl::narrow_cast(mTimeInMillis) / 1000.0) - gsl::narrow_cast(timeInSeconds); mSecond = t.tm_sec + timediff; } double sys::DateTime::toMillis(tm t) const { - time_t timeInSeconds = mktime(&t); + const auto timeInSeconds = gsl::narrow_cast(mktime(&t)); double timediff = mSecond - t.tm_sec; return (timeInSeconds + timediff) * 1000.0; } @@ -404,9 +404,9 @@ static double getNowInMillis() // does not need millisecond accuracy SYSTEMTIME now; GetLocalTime(&now); - return (double)time(NULL) * 1000 + now.wMilliseconds; + return (double)time(nullptr) * 1000 + now.wMilliseconds; #else - return (double)time(NULL) * 1000; + return (double)time(nullptr) * 1000; #endif } void sys::DateTime::setNow() @@ -634,7 +634,7 @@ void sys::DateTime::localtime(time_t numSecondsSinceEpoch, tm& t) // our fingers and hope the regular function actually is reentrant // (supposedly this is the case on Windows). #if CODA_OSS_POSIX_SOURCE - if (::localtime_r(&numSecondsSinceEpoch, &t) == NULL) + if (::localtime_r(&numSecondsSinceEpoch, &t) == nullptr) { int const errnum = errno; throw except::Exception(Ctxt("localtime_r() failed (" + @@ -664,7 +664,7 @@ void sys::DateTime::gmtime(time_t numSecondsSinceEpoch, tm& t) // our fingers and hope the regular function actually is reentrant // (supposedly this is the case on Windows). #if CODA_OSS_POSIX_SOURCE - if (::gmtime_r(&numSecondsSinceEpoch, &t) == NULL) + if (::gmtime_r(&numSecondsSinceEpoch, &t) == nullptr) { int const errnum = errno; throw except::Exception(Ctxt("gmtime_r() failed (" + diff --git a/externals/coda-oss/modules/c++/sys/source/Dbg.cpp b/externals/coda-oss/modules/c++/sys/source/Dbg.cpp index 804d504ed3..3fa6f37a03 100644 --- a/externals/coda-oss/modules/c++/sys/source/Dbg.cpp +++ b/externals/coda-oss/modules/c++/sys/source/Dbg.cpp @@ -24,7 +24,23 @@ #include "sys/Dbg.h" -void sys::dbgPrintf(const char *format, ...) +#include + +#include + +inline void va_end_(va_list& args) noexcept +{ + CODA_OSS_disable_warning_push + #if _MSC_VER + #pragma warning(disable : 26477) // Use '...' rather than 0 or NULL(es .47). + #endif + + va_end(args); + + CODA_OSS_disable_warning_pop +} + +void sys::dbgPrintf(const char *format, ...) noexcept { if (sys::debugging) { @@ -32,16 +48,16 @@ void sys::dbgPrintf(const char *format, ...) va_start(args, format); fprintf(DEBUG_STREAM, " "); vfprintf(DEBUG_STREAM, format, args); - va_end(args); + va_end_(args); } } -void sys::diePrintf(const char *format, ...) +void sys::diePrintf(const char* format, ...) noexcept { va_list args; va_start(args, format); vfprintf(DEBUG_STREAM, format, args); - va_end(args); + va_end_(args); exit(EXIT_FAILURE); } diff --git a/externals/coda-oss/modules/c++/sys/source/ErrUnix.cpp b/externals/coda-oss/modules/c++/sys/source/ErrUnix.cpp index f2db39499c..6fcf3699f3 100644 --- a/externals/coda-oss/modules/c++/sys/source/ErrUnix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ErrUnix.cpp @@ -33,7 +33,7 @@ int sys::Err::getLast() const std::string sys::Err::toString() const { char *temp = strerror(mErrId); - if (temp == NULL) + if (temp == nullptr) return std::string(""); std::string stringError = temp; diff --git a/externals/coda-oss/modules/c++/sys/source/ErrWin32.cpp b/externals/coda-oss/modules/c++/sys/source/ErrWin32.cpp index bac96d0af3..cb82416877 100644 --- a/externals/coda-oss/modules/c++/sys/source/ErrWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ErrWin32.cpp @@ -35,9 +35,9 @@ std::string sys::Err::toString() const { LPTSTR buffer; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, NULL, + FORMAT_MESSAGE_FROM_SYSTEM, nullptr, static_cast(mErrId), 0, - (LPTSTR)&buffer, 0, NULL) == 0) + (LPTSTR)&buffer, 0, nullptr) == 0) { return std::string("Unknown error code"); } diff --git a/externals/coda-oss/modules/c++/sys/source/ExecUnix.cpp b/externals/coda-oss/modules/c++/sys/source/ExecUnix.cpp index 6a5f20912f..24ea231038 100644 --- a/externals/coda-oss/modules/c++/sys/source/ExecUnix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ExecUnix.cpp @@ -39,13 +39,13 @@ namespace sys FILE* ExecPipe::openPipe(const std::string& command, const std::string& type) { - FILE* ioFile = NULL; + FILE* ioFile = nullptr; int pIO[2]; //! create the IO pipes for stdin/out if (pipe(pIO) < 0) { - return NULL; + return nullptr; } //! fork a subprocess for running our command -- @@ -58,7 +58,7 @@ FILE* ExecPipe::openPipe(const std::string& command, // there was an error while forking close(pIO[READ_PIPE]); close(pIO[WRITE_PIPE]); - return NULL; + return nullptr; case 0: { // we are now in the forked process -- @@ -144,7 +144,7 @@ int ExecPipe::closePipe() if (mOutStream) { fclose(mOutStream); - mOutStream = NULL; + mOutStream = nullptr; } int exitStatus = 0; diff --git a/externals/coda-oss/modules/c++/sys/source/ExecWin32.cpp b/externals/coda-oss/modules/c++/sys/source/ExecWin32.cpp index 86bfa17cdc..f49271d6b1 100644 --- a/externals/coda-oss/modules/c++/sys/source/ExecWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ExecWin32.cpp @@ -20,6 +20,7 @@ * */ +#include #ifdef _WIN32 @@ -42,22 +43,22 @@ FILE* ExecPipe::openPipe(const std::string& command, const std::string& type) { FILE* ioFile = nullptr; - HANDLE outIO[2] = {NULL, NULL}; + HANDLE outIO[2] = {nullptr, nullptr}; //! inherit the pipe handles SECURITY_ATTRIBUTES saAttr; saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.bInheritHandle = TRUE; - saAttr.lpSecurityDescriptor = NULL; + saAttr.lpSecurityDescriptor = nullptr; if (!CreatePipe(&outIO[READ_PIPE], &outIO[WRITE_PIPE], &saAttr, 0)) { - return NULL; + return nullptr; } // check the pipes themselves are not inherited if (!SetHandleInformation(outIO[READ_PIPE], HANDLE_FLAG_INHERIT, 0)) { - return NULL; + return nullptr; } // the startInfo structure is where the pipes are connected @@ -75,11 +76,11 @@ FILE* ExecPipe::openPipe(const std::string& command, //! create the subprocess -- // this is equivalent to a fork + exec - if (CreateProcess(NULL, const_cast(command.c_str()), - NULL, NULL, TRUE, 0, NULL, NULL, + if (CreateProcess(nullptr, const_cast(command.c_str()), + nullptr, nullptr, TRUE, 0, nullptr, nullptr, &mStartInfo, &mProcessInfo) == 0) { - return NULL; + return nullptr; } // connect the pipes currently connected in the subprocess @@ -92,7 +93,7 @@ FILE* ExecPipe::openPipe(const std::string& command, if ((readDescriptor = _open_osfhandle( (intptr_t)outIO[READ_PIPE], _O_RDONLY)) == -1) { - return NULL; + return nullptr; } ioFile = _fdopen(readDescriptor, type.c_str()); CloseHandle(outIO[WRITE_PIPE]); @@ -121,13 +122,13 @@ int ExecPipe::closePipe() } // in case it fails - mOutStream = NULL; + mOutStream = nullptr; DWORD dwMillisec = INFINITE; - (void) WaitForSingleObject(mProcessInfo.hProcess, dwMillisec); + std::ignore = WaitForSingleObject(mProcessInfo.hProcess, dwMillisec); //! get the exit code - DWORD exitCode = NULL; + DWORD exitCode = 0; GetExitCodeProcess(mProcessInfo.hProcess, &exitCode); const int exitStatus = static_cast(exitCode); if (exitStatus == -1) diff --git a/externals/coda-oss/modules/c++/sys/source/FileFinder.cpp b/externals/coda-oss/modules/c++/sys/source/FileFinder.cpp index b95600aa32..6b47dda795 100644 --- a/externals/coda-oss/modules/c++/sys/source/FileFinder.cpp +++ b/externals/coda-oss/modules/c++/sys/source/FileFinder.cpp @@ -102,7 +102,7 @@ sys::NotPredicate::~NotPredicate() if (mPredicate.second && mPredicate.first) { FilePredicate* tmp = mPredicate.first; - mPredicate.first = NULL; + mPredicate.first = nullptr; delete tmp; } } @@ -125,7 +125,7 @@ sys::LogicalPredicate::~LogicalPredicate() if (p.first && p.second) { sys::FilePredicate* tmp = p.first; - p.first = NULL; + p.first = nullptr; delete tmp; } } @@ -265,7 +265,7 @@ fs::path sys::findFirstDirectory(const fs::path& startingDirectory, const fs::pa fs::path sys::test::findRootDirectory(const fs::path& p, const std::string& rootName, std::function isRoot) { - const auto isRootDirectory = [&](const fs::path& p) { return is_directory(p) && isRoot(p); }; + const auto isRootDirectory = [&](const fs::path& v) { return is_directory(v) && isRoot(v); }; // Does the given path look good? if (isRootDirectory(p)) diff --git a/externals/coda-oss/modules/c++/sys/source/FileUnix.cpp b/externals/coda-oss/modules/c++/sys/source/FileUnix.cpp index f046f7db3d..e603835a32 100644 --- a/externals/coda-oss/modules/c++/sys/source/FileUnix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/FileUnix.cpp @@ -118,7 +118,7 @@ void sys::File::writeFrom(const void* buffer, size_t size) sys::Off_T sys::File::seekTo(sys::Off_T offset, int whence) { sys::Off_T off = ::lseek(mHandle, offset, whence); - if (off == (sys::Off_T) - 1) + if (off == static_cast(-1)) throw sys::SystemException(Ctxt("Seeking in file")); return off; } diff --git a/externals/coda-oss/modules/c++/sys/source/FileWin32.cpp b/externals/coda-oss/modules/c++/sys/source/FileWin32.cpp index 1b60a02010..5e2f2b23d0 100644 --- a/externals/coda-oss/modules/c++/sys/source/FileWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/FileWin32.cpp @@ -49,7 +49,7 @@ _SYS_HANDLE_TYPE sys::File::createFile(const coda_oss::filesystem::path& str_, i nullptr /*lpSecurityAttributes*/, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, - static_cast(0) /*hTemplateFile*/); + static_cast(nullptr) /*hTemplateFile*/); } void sys::File::create(const std::string& str, int accessFlags, @@ -83,7 +83,7 @@ void sys::File::readInto(void* buffer, size_t size) bufferPtr + bytesRead, bytesToRead, &bytesThisRead, - NULL)) + nullptr)) { throw sys::SystemException(Ctxt("Error reading from file")); } @@ -120,7 +120,7 @@ void sys::File::writeFrom(const void* buffer, size_t size) bufferPtr + bytesWritten, bytesToWrite, &bytesThisWrite, - NULL)) + nullptr)) { throw sys::SystemException(Ctxt("Writing from file")); } diff --git a/externals/coda-oss/modules/c++/sys/source/LocalDateTime.cpp b/externals/coda-oss/modules/c++/sys/source/LocalDateTime.cpp index 5f72154805..d0df8a2134 100644 --- a/externals/coda-oss/modules/c++/sys/source/LocalDateTime.cpp +++ b/externals/coda-oss/modules/c++/sys/source/LocalDateTime.cpp @@ -47,7 +47,7 @@ void LocalDateTime::toMillis() t.tm_yday = mDayOfYear - 1; t.tm_hour = mHour; t.tm_min = mMinute; - t.tm_sec = (int)mSecond; + t.tm_sec = static_cast(mSecond); t.tm_isdst = mDST; mTimeInMillis = DateTime::toMillis(t); diff --git a/externals/coda-oss/modules/c++/sys/source/MutexWin32.cpp b/externals/coda-oss/modules/c++/sys/source/MutexWin32.cpp index 62786f0ee0..d04d74511d 100644 --- a/externals/coda-oss/modules/c++/sys/source/MutexWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/MutexWin32.cpp @@ -29,8 +29,8 @@ sys::MutexWin32::MutexWin32() { - mNative = CreateMutex(NULL, FALSE, NULL); - if (mNative == NULL) + mNative = CreateMutex(nullptr, FALSE, nullptr); + if (mNative == nullptr) throw sys::SystemException("Mutex initializer failed"); } diff --git a/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp b/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp index 355245e3b7..e2b96cf18c 100644 --- a/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp @@ -257,7 +257,7 @@ std::string sys::OSUnix::getTempName(const std::string& path, } #else CharWrapper tempname = tempnam(path.c_str(), prefix.c_str()); - if (tempname.get() == NULL) + if (tempname.get() == nullptr) name = ""; else { @@ -299,7 +299,7 @@ std::string sys::OSUnix::operator[](const std::string& s) const std::string sys::OSUnix::getEnv(const std::string& s) const { const char* envVal = getenv(s.c_str()); - if (envVal == NULL) + if (envVal == nullptr) throw sys::SystemException( Ctxt("Unable to get unix environment variable " + s)); return std::string(envVal); @@ -324,7 +324,7 @@ void sys::OSUnix::setEnv(const std::string& var, // putenv() will overwrite the value if it already exists, so if we don't // want to overwrite, we do nothing when getenv() indicates the variable's // already set - if (overwrite || getenv(var.c_str()) == NULL) + if (overwrite || getenv(var.c_str()) == nullptr) { // putenv() isn't guaranteed to make a copy of the string, so we need // to allocate it and let it leak. Ugh. @@ -560,23 +560,23 @@ void sys::DirectoryUnix::close() if (mDir) { closedir( mDir); - mDir = NULL; + mDir = nullptr; } } std::string sys::DirectoryUnix::findFirstFile(const std::string& dir) { // First file is always . on Unix mDir = ::opendir(dir.c_str()); - if (mDir == NULL) + if (mDir == nullptr) return ""; return findNextFile(); } std::string sys::DirectoryUnix::findNextFile() { - struct dirent* entry = NULL; + struct dirent* entry = nullptr; entry = ::readdir(mDir); - if (entry == NULL) + if (entry == nullptr) return ""; return entry->d_name; } diff --git a/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp b/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp index b8a1f39e64..e381f2f917 100644 --- a/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/OSWin32.cpp @@ -81,12 +81,12 @@ bool sys::OSWin32::exists(const std::string& path) const const DWORD errCode = GetLastError(); if (errCode != ERROR_FILE_NOT_FOUND && errCode != ERROR_PATH_NOT_FOUND) { - char* err = NULL; + char* err = nullptr; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, errCode, + nullptr, errCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &err, 0, NULL); + (LPTSTR) &err, 0, nullptr); throw except::Exception(Ctxt( "Problem while testing file existence for " + path + " with Error: " + std::string(err))); @@ -166,7 +166,7 @@ bool sys::OSWin32::isDirectory(const std::string& path) const bool sys::OSWin32::makeDirectory(const std::string& path) const { - return (CreateDirectory(path.c_str(), NULL)) ? (true): (false); + return (CreateDirectory(path.c_str(), nullptr)) ? (true) : (false); } std::string sys::OSWin32::getCurrentWorkingDirectory() const @@ -224,7 +224,7 @@ std::string sys::OSWin32::operator[](const std::string& s) const static std::string getEnv(const std::string& s) { - const DWORD size = GetEnvironmentVariable(s.c_str(), NULL, 0); + const DWORD size = GetEnvironmentVariable(s.c_str(), nullptr, 0); if (size == 0) { throw sys::SystemException(Ctxt( @@ -266,7 +266,7 @@ std::string sys::OSWin32::getEnv(const std::string& s) const bool sys::OSWin32::isEnvSet(const std::string& s) const { - const DWORD size = GetEnvironmentVariable(s.c_str(), NULL, 0); + const DWORD size = GetEnvironmentVariable(s.c_str(), nullptr, 0); if (size != 0) { return true; @@ -283,8 +283,14 @@ static void setEnv(const std::string& var, throw sys::SystemException(Ctxt( "Unable to set windows environment variable " + var)); } + const auto s = var + "=" + val; - _putenv(s.c_str()); + const auto result = _putenv(s.c_str()); + if (result != 0) // "The functions return 0 if successful, or -1 if there's an error." + { + throw sys::SystemException(Ctxt("Unable to set windows environment variable " + var)); + } + } void sys::OSWin32::setEnv(const std::string& var, const std::string& val, @@ -298,13 +304,18 @@ void sys::OSWin32::setEnv(const std::string& var, void sys::OSWin32::unsetEnv(const std::string& var) { - const BOOL ret = SetEnvironmentVariable(var.c_str(), NULL); + const BOOL ret = SetEnvironmentVariable(var.c_str(), nullptr); if (!ret) { throw sys::SystemException(Ctxt("Unable to unset windows environment variable " + var)); } + const auto s = var + "="; - _putenv(s.c_str()); + const auto result = _putenv(s.c_str()); + if (result != 0) // "The functions return 0 if successful, or -1 if there's an error." + { + throw sys::SystemException(Ctxt("Unable to unset windows environment variable " + var)); + } } size_t sys::OSWin32::getNumCPUs() const @@ -433,7 +444,7 @@ std::string sys::OSWin32::getCurrentExecutable( char buffer[MAX_PATH + 2]; memset(buffer, 0, MAX_PATH + 2); - size_t bytesRead = GetModuleFileName(NULL, buffer, MAX_PATH + 1); + size_t bytesRead = GetModuleFileName(nullptr, buffer, MAX_PATH + 1); if (bytesRead == MAX_PATH + 1 || bytesRead == 0) { diff --git a/externals/coda-oss/modules/c++/sys/source/ResourceCheck.cpp b/externals/coda-oss/modules/c++/sys/source/ResourceCheck.cpp index ab4eacc999..9bfcaea46c 100644 --- a/externals/coda-oss/modules/c++/sys/source/ResourceCheck.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ResourceCheck.cpp @@ -22,6 +22,7 @@ #include #include +#include namespace sys { @@ -40,7 +41,7 @@ size_t getAvailableMem(size_t systemMemBytes, size_t reservedBytes, double margin) { - const auto relativeAvailable = static_cast(systemMemBytes * margin); + const auto relativeAvailable = gsl::narrow_cast(gsl::narrow_cast(systemMemBytes) * margin); if (reservedBytes > systemMemBytes) { return 0; diff --git a/externals/coda-oss/modules/c++/sys/source/ScopedCPUAffinityUnix.cpp b/externals/coda-oss/modules/c++/sys/source/ScopedCPUAffinityUnix.cpp index f56e45e779..2b7fbc8445 100644 --- a/externals/coda-oss/modules/c++/sys/source/ScopedCPUAffinityUnix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ScopedCPUAffinityUnix.cpp @@ -26,6 +26,7 @@ #include #include +#include #include @@ -51,7 +52,7 @@ void ScopedCPUMaskUnix::initialize(int numCPUs) mSize = CPU_ALLOC_SIZE(numCPUs); mMask = CPU_ALLOC(numCPUs); - if (mMask == NULL) + if (mMask == nullptr) { std::ostringstream msg; msg << "Failed to allocate CPU mask for " << numCPUs << "CPUs"; @@ -84,12 +85,12 @@ std::string ScopedCPUMaskUnix::toString() const int ScopedCPUMaskUnix::getNumOnlineCPUs() { #ifdef _SC_NPROCESSORS_ONLN - const int numOnlineCPUs = sysconf(_SC_NPROCESSORS_ONLN); + const auto numOnlineCPUs = sysconf(_SC_NPROCESSORS_ONLN); if (numOnlineCPUs == -1) { throw except::Exception(Ctxt("Failed to get online CPU count")); } - return numOnlineCPUs; + return gsl::narrow(numOnlineCPUs); #else throw except::NotImplementedException(Ctxt("Unable to get the number of CPUs")); #endif diff --git a/externals/coda-oss/modules/c++/sys/source/SemaphoreWin32.cpp b/externals/coda-oss/modules/c++/sys/source/SemaphoreWin32.cpp index fcfd8255bf..6d136b4b66 100644 --- a/externals/coda-oss/modules/c++/sys/source/SemaphoreWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/SemaphoreWin32.cpp @@ -30,11 +30,11 @@ sys::SemaphoreWin32::SemaphoreWin32(unsigned int count, size_t _maxCount) { // Ensure maxCount never becomes negative due to casting between signed/unsigned types - const LONG maxLong = std::numeric_limits::max(); - LONG maxCount = (_maxCount > maxLong) ? maxLong : static_cast(_maxCount); + constexpr auto maxLong = std::numeric_limits::max(); + const auto maxCount = (_maxCount > maxLong) ? maxLong : static_cast(_maxCount); - mNative = CreateSemaphore(NULL, static_cast(count), maxCount, NULL); - if (mNative == NULL) + mNative = CreateSemaphore(nullptr, static_cast(count), maxCount, nullptr); + if (mNative == nullptr) throw sys::SystemException("CreateSemaphore Failed"); } @@ -53,7 +53,7 @@ void sys::SemaphoreWin32::signal() { if (!ReleaseSemaphore(mNative, 1, - NULL) ) + nullptr) ) { throw sys::SystemException("Semaphore signal failed"); } diff --git a/externals/coda-oss/modules/c++/sys/source/StopWatch.cpp b/externals/coda-oss/modules/c++/sys/source/StopWatch.cpp index 81b27ed99f..ca33000107 100644 --- a/externals/coda-oss/modules/c++/sys/source/StopWatch.cpp +++ b/externals/coda-oss/modules/c++/sys/source/StopWatch.cpp @@ -114,7 +114,7 @@ double sys::CPUStopWatch::start() else mStartTime = now; - return ((double)now/mClocksPerMillis); + return static_cast(now)/mClocksPerMillis; } double sys::CPUStopWatch::stop() @@ -128,7 +128,7 @@ double sys::CPUStopWatch::stop() } // If start time was never set (or reset) then don't bother calculating elapsed time if(mStartTime != -1) - return ((double)(end - mStartTime - mTimePaused)/mClocksPerMillis); + return static_cast(end - mStartTime - mTimePaused)/mClocksPerMillis; else return 0; } @@ -140,7 +140,7 @@ double sys::CPUStopWatch::pause() mPauseStartTime = clock(); mPaused = true; } - return ((double)mPauseStartTime/mClocksPerMillis); + return static_cast(mPauseStartTime)/mClocksPerMillis; } void sys::CPUStopWatch::clear() diff --git a/externals/coda-oss/modules/c++/sys/source/ThreadPosix.cpp b/externals/coda-oss/modules/c++/sys/source/ThreadPosix.cpp index 4892ab3961..4ee1f24112 100644 --- a/externals/coda-oss/modules/c++/sys/source/ThreadPosix.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ThreadPosix.cpp @@ -52,7 +52,7 @@ void sys::ThreadPosix::start() if (::pthread_create(&mNative, &attr, - (void *(*)(void *))this->__start, + static_cast(this->__start), this) != 0) throw sys::SystemException("pthread_create()"); pthread_attr_destroy(&attr); @@ -60,8 +60,8 @@ void sys::ThreadPosix::start() else { if (::pthread_create(&mNative, - NULL, - (void *(*)(void *))this->__start, + nullptr, + static_cast(this->__start), this) != 0) throw sys::SystemException("pthread_create()"); } @@ -81,7 +81,7 @@ void *sys::ThreadPosix::__start(void *v) */ pthread_exit(NULL); - return NULL; + return nullptr; } void sys::ThreadPosix::kill() diff --git a/externals/coda-oss/modules/c++/sys/source/ThreadWin32.cpp b/externals/coda-oss/modules/c++/sys/source/ThreadWin32.cpp index 43ee313b65..0b0521b00d 100644 --- a/externals/coda-oss/modules/c++/sys/source/ThreadWin32.cpp +++ b/externals/coda-oss/modules/c++/sys/source/ThreadWin32.cpp @@ -39,13 +39,13 @@ void sys::ThreadWin32::start() { DWORD threadId; - mNative = __CREATETHREAD(NULL, + mNative = __CREATETHREAD(nullptr, 0, __start, (void*)this, 0, &threadId); - if (mNative == NULL) + if (mNative == nullptr) throw sys::SystemException("Thread creation failed"); diff --git a/externals/coda-oss/modules/c++/sys/source/UTCDateTime.cpp b/externals/coda-oss/modules/c++/sys/source/UTCDateTime.cpp index 36a166ee97..1ed9951210 100644 --- a/externals/coda-oss/modules/c++/sys/source/UTCDateTime.cpp +++ b/externals/coda-oss/modules/c++/sys/source/UTCDateTime.cpp @@ -49,7 +49,7 @@ const int DAYS_PER_YEAR[2] = {365, 366}; // Returns the appropriate index into CUMULATIVE_DAYS_PER_MONTH based on // whether 'year' is a leap year or not -int yearIndex(int year) +constexpr int yearIndex(int year) { return (!(year % 4) && ((year % 100) || !(year % 400))); } diff --git a/externals/coda-oss/modules/c++/sys/source/sys_Backtrace.cpp b/externals/coda-oss/modules/c++/sys/source/sys_Backtrace.cpp index 13098be08b..ce5bdb03e8 100644 --- a/externals/coda-oss/modules/c++/sys/source/sys_Backtrace.cpp +++ b/externals/coda-oss/modules/c++/sys/source/sys_Backtrace.cpp @@ -24,7 +24,7 @@ std::string sys::getBacktrace(bool* pSupported) { - bool supported; + bool supported = false; std::vector frames; bool& supported_ = pSupported != nullptr ? *pSupported : supported; return getBacktrace(supported_, frames); diff --git a/externals/coda-oss/modules/c++/sys/tests/DLLTest.cpp b/externals/coda-oss/modules/c++/sys/tests/DLLTest.cpp index dcaa92a44a..1e37e2587f 100644 --- a/externals/coda-oss/modules/c++/sys/tests/DLLTest.cpp +++ b/externals/coda-oss/modules/c++/sys/tests/DLLTest.cpp @@ -46,7 +46,7 @@ int main(int argc, char** argv) DLL dso(dsoPath); - HOOK_FN theHook = (HOOK_FN) dso.retrieve(hook); + auto theHook = reinterpret_cast(dso.retrieve(hook)); // Call the hook if (!theHook()) diff --git a/externals/coda-oss/modules/c++/tiff/source/IFD.cpp b/externals/coda-oss/modules/c++/tiff/source/IFD.cpp index 96de554d58..fb145461db 100644 --- a/externals/coda-oss/modules/c++/tiff/source/IFD.cpp +++ b/externals/coda-oss/modules/c++/tiff/source/IFD.cpp @@ -53,7 +53,7 @@ tiff::IFDEntry *tiff::IFD::operator[](unsigned short tag) // not exist. This is to make sure that the map doesn't get full // of invalid key/value pairs if you're just trying to verify whether // a key already exists of not. - return exists(tag) ? mIFD[tag] : NULL; + return exists(tag) ? mIFD[tag] : nullptr; } const tiff::IFDEntry* tiff::IFD::operator[](unsigned short tag) const { @@ -123,7 +123,7 @@ void tiff::IFD::serialize(io::OutputStream& output) { io::Seekable *seekable = dynamic_cast(&output); - if (seekable == NULL) + if (seekable == nullptr) throw except::Exception(Ctxt("Can only serialize IFD to seekable stream")); // Makes sure all data offsets are defined for each entry. diff --git a/externals/coda-oss/modules/c++/tiff/source/IFDEntry.cpp b/externals/coda-oss/modules/c++/tiff/source/IFDEntry.cpp index bb05316af7..1ac612aeac 100644 --- a/externals/coda-oss/modules/c++/tiff/source/IFDEntry.cpp +++ b/externals/coda-oss/modules/c++/tiff/source/IFDEntry.cpp @@ -38,7 +38,7 @@ void tiff::IFDEntry::serialize(io::OutputStream& output) { io::Seekable *seekable = dynamic_cast(&output); - if (seekable == NULL) + if (seekable == nullptr) throw except::Exception(Ctxt("Can only serialize IFDEntry to seekable stream")); output.write((sys::byte *)&mTag, sizeof(mTag)); @@ -88,7 +88,7 @@ void tiff::IFDEntry::deserialize(io::InputStream& input, const bool reverseBytes { io::Seekable *seekable = dynamic_cast(&input); - if (seekable == NULL) + if (seekable == nullptr) throw except::Exception(Ctxt("Can only deserialize IFDEntry from seekable stream")); input.read((char *)&mTag, sizeof(mTag)); diff --git a/externals/coda-oss/modules/c++/tiff/source/ImageWriter.cpp b/externals/coda-oss/modules/c++/tiff/source/ImageWriter.cpp index 284ffd52f0..d293fed738 100644 --- a/externals/coda-oss/modules/c++/tiff/source/ImageWriter.cpp +++ b/externals/coda-oss/modules/c++/tiff/source/ImageWriter.cpp @@ -210,7 +210,7 @@ void tiff::ImageWriter::validate() // if (mGeoTIFFReader) // { - // tiff::IFDEntry *entry = NULL; + // tiff::IFDEntry *entry = nullptr; // if ((entry = (*mGeoTIFFReader)["ModelPixelScaleTag"])) // mIFD.addEntry(entry); // if ((entry = (*mGeoTIFFReader)["ModelTiepointTag"])) diff --git a/externals/coda-oss/modules/c++/tiff/source/KnownTags.cpp b/externals/coda-oss/modules/c++/tiff/source/KnownTags.cpp index 946818b279..60b3290794 100644 --- a/externals/coda-oss/modules/c++/tiff/source/KnownTags.cpp +++ b/externals/coda-oss/modules/c++/tiff/source/KnownTags.cpp @@ -161,6 +161,6 @@ tiff::IFDEntry *tiff::KnownTags::operator[] (const unsigned short tagKey) { std::map::iterator pos = mKnownTags.find(tagKey); - return pos != mKnownTags.end() ? pos->second : NULL; + return pos != mKnownTags.end() ? pos->second : nullptr; } diff --git a/externals/coda-oss/modules/c++/tiff/source/TypeFactory.cpp b/externals/coda-oss/modules/c++/tiff/source/TypeFactory.cpp index 5f5715a6cb..1e7f52b2a7 100644 --- a/externals/coda-oss/modules/c++/tiff/source/TypeFactory.cpp +++ b/externals/coda-oss/modules/c++/tiff/source/TypeFactory.cpp @@ -28,7 +28,7 @@ tiff::TypeInterface *tiff::TypeFactory::create(const unsigned char *data, const unsigned short type) { - tiff::TypeInterface *tiffType = NULL; + tiff::TypeInterface* tiffType = nullptr; switch (type) { case tiff::Const::Type::BYTE: diff --git a/externals/coda-oss/modules/c++/tiff/source/Utils.cpp b/externals/coda-oss/modules/c++/tiff/source/Utils.cpp index 59de597e3b..ff6e60d044 100644 --- a/externals/coda-oss/modules/c++/tiff/source/Utils.cpp +++ b/externals/coda-oss/modules/c++/tiff/source/Utils.cpp @@ -30,7 +30,7 @@ bool tiff::Utils::hasGeoTiffIFD(const tiff::IFD* ifd) tiff::IFD* tiff::Utils::createGeoTiffIFD(tiff::IFD* ifd) { if (!tiff::Utils::hasGeoTiffIFD(ifd)) - return NULL; + return nullptr; std::map keyMap; keyMap[1024] = "GTModelTypeGeoKey"; @@ -85,10 +85,10 @@ tiff::IFD* tiff::Utils::createGeoTiffIFD(tiff::IFD* ifd) tiff::IFDEntry *geoDir = (*ifd)["GeoKeyDirectoryTag"]; tiff::IFDEntry* const doubleParams = ifd->exists("GeoDoubleParamsTag") ? (*ifd)["GeoDoubleParamsTag"] - : NULL; + : nullptr; tiff::IFDEntry* const asciiParams = ifd->exists("GeoAsciiParamsTag") ? (*ifd)["GeoAsciiParamsTag"] - : NULL; + : nullptr; std::vector geoVals = geoDir->getValues(); size_t idx = 0; diff --git a/externals/coda-oss/modules/c++/types/include/types/PageRowCol.h b/externals/coda-oss/modules/c++/types/include/types/PageRowCol.h index 1900d23d62..5c4b5ce280 100644 --- a/externals/coda-oss/modules/c++/types/include/types/PageRowCol.h +++ b/externals/coda-oss/modules/c++/types/include/types/PageRowCol.h @@ -52,7 +52,7 @@ struct PageRowCol // especially when doing scalar operations that might otherwise // create ambiguities PageRowCol() : - page((T)0.0), row((T)0.0), col((T)0.0) {} + page(static_cast(0.0)), row(static_cast(0.0)), col(static_cast(0.0)) {} PageRowCol(T p, T r, T c) : @@ -61,17 +61,17 @@ struct PageRowCol template explicit PageRowCol(const PageRowCol& p) { - page = (T)p.page; - row = (T)p.row; - col = (T)p.col; + page = static_cast(p.page); + row = static_cast(p.row); + col = static_cast(p.col); } template PageRowCol(Other_T1 p, const RowCol& rc) { - page = (T)p; - row = (T)rc.row; - col = (T)rc.col; + page = static_cast(p); + row = static_cast(rc.row); + col = static_cast(rc.col); } template @@ -79,9 +79,9 @@ struct PageRowCol { if (this != (PageRowCol*)&p) { - page = (T)p.page; - row = (T)p.row; - col = (T)p.col; + page = static_cast(p.page); + row = static_cast(p.row); + col = static_cast(p.col); } return *this; } @@ -89,9 +89,9 @@ struct PageRowCol template PageRowCol& operator+=(const PageRowCol& p) { - page += (T)p.page; - row += (T)p.row; - col += (T)p.col; + page += static_cast(p.page); + row += static_cast(p.row); + col += static_cast(p.col); return *this; } @@ -105,9 +105,9 @@ struct PageRowCol template PageRowCol& operator*=(const PageRowCol& p) { - page *= (T)p.page; - row *= (T)p.row; - col *= (T)p.col; + page *= static_cast(p.page); + row *= static_cast(p.row); + col *= static_cast(p.col); return *this; } @@ -121,9 +121,9 @@ struct PageRowCol template PageRowCol& operator-=(const PageRowCol& p) { - page -= (T)p.page; - row -= (T)p.row; - col -= (T)p.col; + page -= static_cast(p.page); + row -= static_cast(p.row); + col -= static_cast(p.col); return *this; } @@ -137,9 +137,9 @@ struct PageRowCol template PageRowCol& operator/=(const PageRowCol& p) { - page /= (T)p.page; - row /= (T)p.row; - col /= (T)p.col; + page /= static_cast(p.page); + row /= static_cast(p.row); + col /= static_cast(p.col); return *this; } diff --git a/externals/coda-oss/modules/c++/types/include/types/RowCol.h b/externals/coda-oss/modules/c++/types/include/types/RowCol.h index 1b55265cab..e13f125a2e 100644 --- a/externals/coda-oss/modules/c++/types/include/types/RowCol.h +++ b/externals/coda-oss/modules/c++/types/include/types/RowCol.h @@ -50,9 +50,8 @@ namespace types template class RowCol { template - static U cast(const Other_T& t) + static U cast(const Other_T& t) noexcept { - //return static_cast(t); return gsl::narrow_cast(t); } diff --git a/externals/coda-oss/modules/c++/types/unittests/test_page_row_col.cpp b/externals/coda-oss/modules/c++/types/unittests/test_page_row_col.cpp index edf926bab8..a2e6702cb7 100644 --- a/externals/coda-oss/modules/c++/types/unittests/test_page_row_col.cpp +++ b/externals/coda-oss/modules/c++/types/unittests/test_page_row_col.cpp @@ -97,8 +97,8 @@ TEST_CASE(TestPageRowColDouble) pageRowColAssign.page += std::numeric_limits::epsilon() * 2.0; TEST_ASSERT(pageRowColAssign != pageRowColA); - TEST_ASSERT_EQ(pageRowColA.volume(), 3.1 * 5.2 * 11.3); - TEST_ASSERT_EQ(pageRowColA.normL2(), std::sqrt(3.1 * 3.1 + 5.2 * 5.2 + 11.3 * 11.3)); + TEST_ASSERT_ALMOST_EQ(pageRowColA.volume(), 3.1 * 5.2 * 11.3); + TEST_ASSERT_ALMOST_EQ(pageRowColA.normL2(), std::sqrt(3.1 * 3.1 + 5.2 * 5.2 + 11.3 * 11.3)); // test arithmetic operators const types::PageRowCol sum = pageRowColA + pageRowColB; diff --git a/externals/coda-oss/modules/c++/unique/source/UUID.cpp b/externals/coda-oss/modules/c++/unique/source/UUID.cpp index 682dac8433..0a79a77d97 100644 --- a/externals/coda-oss/modules/c++/unique/source/UUID.cpp +++ b/externals/coda-oss/modules/c++/unique/source/UUID.cpp @@ -32,7 +32,7 @@ std::string unique::generateUUID() { #ifdef _WIN32 GUID uuid; - unsigned char *cResult = NULL; + unsigned char* cResult = nullptr; if ((UuidCreateSequential (&uuid) != RPC_S_OK) || (UuidToString(&uuid, &cResult) != RPC_S_OK)) diff --git a/externals/coda-oss/modules/c++/unique/wscript b/externals/coda-oss/modules/c++/unique/wscript index ffaf6c7239..bd30e6da78 100644 --- a/externals/coda-oss/modules/c++/unique/wscript +++ b/externals/coda-oss/modules/c++/unique/wscript @@ -1,5 +1,4 @@ NAME = 'unique' -MAINTAINER = 'jmrandol@users.sourceforge.net' VERSION = '1.0' MODULE_DEPS = 'except' USELIB = 'RPC' diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Attributes.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Attributes.h index b8823164d4..8dac07f8f6 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Attributes.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Attributes.h @@ -20,19 +20,21 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_Attributes_h_INCLUDED_ #define CODA_OSS_xml_lite_Attributes_h_INCLUDED_ -#pragma once #include #include +#include + #include "sys/Conf.h" #include "except/Exception.h" -#include "xml/lite/QName.h" #include "str/Convert.h" #include "gsl/gsl.h" +#include "xml/lite/QName.h" /*! * \file Attributes.h * \brief Implementation of SAX 2.0 Attributes @@ -55,7 +57,7 @@ namespace lite * internal organs. We have a URI, a QName, and a local part * as well. We also need a value, of course. */ -struct AttributeNode final +struct CODA_OSS_API AttributeNode final { AttributeNode() = default; @@ -158,7 +160,7 @@ struct AttributeNode final * this data structure everywhere. That also allows us to * simplify future dom classes */ -struct Attributes final +struct CODA_OSS_API Attributes final { typedef std::vector Attributes_T; //! Default constructor diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ContentHandler.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ContentHandler.h index 9e03adeaeb..f7e8da6f0a 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ContentHandler.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ContentHandler.h @@ -20,9 +20,9 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_ContentHandler_h_INCLUDED_ #define CODA_OSS_xml_lite_ContentHandler_h_INCLUDED_ -#pragma once #include #include @@ -30,6 +30,8 @@ #include #include +#include + #include "xml/lite/QName.h" // Uri #include "xml/lite/Attributes.h" @@ -68,12 +70,12 @@ namespace lite * which should increase performance and efficiency. */ -class ContentHandler +class CODA_OSS_API ContentHandler { protected: //! Constructor ContentHandler() = default; - virtual ~ContentHandler() = default; + virtual ~ContentHandler() noexcept(false) {} public: //! Receive notification of the beginning of a document. diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h index 76ab1dd13a..6d6bdf2664 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h @@ -20,9 +20,9 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_Doocument_h_INCLUDED_ #define CODA_OSS_xml_lite_Doocument_h_INCLUDED_ -#pragma once /*! * \file Document.h @@ -42,6 +42,8 @@ #include #include "coda_oss/string.h" +#include + #include "xml/lite/Element.h" #include "xml/lite/QName.h" @@ -56,7 +58,7 @@ namespace lite * Use the Document to access the Element nodes contained within. * The DocumentParser will build a tree that you can use. */ -struct Document // SOAPDocument derives :-( +struct CODA_OSS_API Document // SOAPDocument derives :-( { //! Constructor Document(Element* rootNode = nullptr, bool own = true) : diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Element.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Element.h index 911a50f864..14e23a900e 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Element.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Element.h @@ -20,9 +20,9 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_Element_h_INCLUDED_ #define CODA_OSS_xml_lite_Element_h_INCLUDED_ -#pragma once #include #include @@ -30,15 +30,17 @@ #include #include +#include #include #include #include #include +#include "sys/Conf.h" +#include "mem/SharedPtr.h" + #include "xml/lite/XMLException.h" #include "xml/lite/Attributes.h" #include "xml/lite/QName.h" -#include "sys/Conf.h" -#include "mem/SharedPtr.h" /*! * \file Element.h @@ -63,7 +65,7 @@ struct AttributeNode; * This class stores all of the element information about an XML * document. */ -struct Element // SOAPElement derives :-( +struct CODA_OSS_API Element // SOAPElement derives :-( { Element() = default; @@ -597,28 +599,28 @@ inline Element* addNewOptionalElement(const xml::lite::QName& name, const coda_o #endif // SWIG -Element& setChild(Element&, std::unique_ptr&&); // destroyChildren() + addChild() +CODA_OSS_API Element& setChild(Element&, std::unique_ptr&&); // destroyChildren() + addChild() -void operator+=(Element&, std::unique_ptr&&); // addChild() +CODA_OSS_API void operator+=(Element&, std::unique_ptr&&); // addChild() -Element& addChild(Element&, const std::string& qname); -void operator+=(Element&, const std::string& qname); // addChild() -Element& addChild(Element&, const xml::lite::QName&); // there is also a QName in the xerces namespace -void operator+=(Element&, const xml::lite::QName&); // addChild() -Element& addChild(Element&, const std::string& qname, const coda_oss::u8string& characterData); +CODA_OSS_API Element& addChild(Element&, const std::string& qname); +CODA_OSS_API void operator+=(Element&, const std::string& qname); // addChild() +CODA_OSS_API Element& addChild(Element&, const xml::lite::QName&); // there is also a QName in the xerces namespace +CODA_OSS_API void operator+=(Element&, const xml::lite::QName&); // addChild() +CODA_OSS_API Element& addChild(Element&, const std::string& qname, const coda_oss::u8string& characterData); Element& addChild(Element&, const std::string&, const std::string&) = delete; // NO, order matters! -Element& addChild(Element&, const xml::lite::QName&, const coda_oss::u8string& characterData); -Element& addChild(Element&, const xml::lite::QName&, const std::string& characterData); -Element& addChild(Element&, const std::string& qname, const xml::lite::Uri&); -Element& addChild(Element&, const std::string& qname, const xml::lite::Uri&, const coda_oss::u8string& characterData); - -coda_oss::u8string getCharacterData(const Element&); - -xml::lite::AttributeNode& addAttribute(Element&, const xml::lite::AttributeNode&); -void operator+=(Element&, const xml::lite::AttributeNode&); // addAttribute() -xml::lite::AttributeNode& addAttribute(Element&, const std::string& qname); -xml::lite::AttributeNode& addAttribute(Element&, const xml::lite::QName&); -xml::lite::AttributeNode& addAttribute(Element&, const xml::lite::QName&, const std::string& value); +CODA_OSS_API Element& addChild(Element&, const xml::lite::QName&, const coda_oss::u8string& characterData); +CODA_OSS_API Element& addChild(Element&, const xml::lite::QName&, const std::string& characterData); +CODA_OSS_API Element& addChild(Element&, const std::string& qname, const xml::lite::Uri&); +CODA_OSS_API Element& addChild(Element&, const std::string& qname, const xml::lite::Uri&, const coda_oss::u8string& characterData); + +CODA_OSS_API coda_oss::u8string getCharacterData(const Element&); + +CODA_OSS_API xml::lite::AttributeNode& addAttribute(Element&, const xml::lite::AttributeNode&); +CODA_OSS_API void operator+=(Element&, const xml::lite::AttributeNode&); // addAttribute() +CODA_OSS_API xml::lite::AttributeNode& addAttribute(Element&, const std::string& qname); +CODA_OSS_API xml::lite::AttributeNode& addAttribute(Element&, const xml::lite::QName&); +CODA_OSS_API xml::lite::AttributeNode& addAttribute(Element&, const xml::lite::QName&, const std::string& value); xml::lite::AttributeNode& addAttribute(Element&, const std::string&, const std::string&) = delete; // NO, order matters! } diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h index e8d9e25678..ac9590662b 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h @@ -20,9 +20,9 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_MinidomHandler_h_INCLUDED_ #define CODA_OSS_xml_lite_MinidomHandler_h_INCLUDED_ -#pragma once /*! * \file MinidomHandler.h @@ -49,6 +49,7 @@ #include #include "coda_oss/string.h" +#include #include "str/EncodedString.h" #include "str/EncodedStringView.h" #include "XMLReader.h" @@ -68,7 +69,7 @@ namespace lite * whether it is allocated externally or not. DONT delete it * explicitly unless you are looking for disaster. */ -struct MinidomHandler final : public ContentHandler +struct CODA_OSS_API MinidomHandler final : public ContentHandler { //! Constructor. Uses default document MinidomHandler() @@ -77,7 +78,7 @@ struct MinidomHandler final : public ContentHandler } //! Destructor - ~ MinidomHandler() + ~MinidomHandler() noexcept(false) { setDocument(nullptr, true); } diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomParser.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomParser.h index a701e70dd5..9fd151ab11 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomParser.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomParser.h @@ -20,12 +20,13 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_MinidomParser_h_INCLUDED_ #define CODA_OSS_xml_lite_MinidomParser_h_INCLUDED_ -#pragma once #include +#include #include "xml/lite/XMLReader.h" #include "xml/lite/Document.h" @@ -56,7 +57,7 @@ namespace lite * bloat of the spec. It was inspired by python's xml.dom.minidom * module. */ -struct MinidomParser // SOAPParser inherits :-( +struct CODA_OSS_API MinidomParser // SOAPParser inherits :-( { /*! * Constructor. Set our SAX ContentHandler. diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/QName.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/QName.h index 78fc2fb616..b537b5262d 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/QName.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/QName.h @@ -20,11 +20,11 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_QName_h_INCLLUDED_ #define CODA_OSS_xml_lite_QName_h_INCLLUDED_ -#pragma once -/*! + /*! * \file QName.h * \brief A Qualified name (includes the namespace stuff) * @@ -42,6 +42,8 @@ #include #include +#include + #include "sys/OS.h" #include "str/Manip.h" @@ -66,7 +68,7 @@ namespace lite * to a namespace URI */ -struct Uri final // help prevent mixups with std::string +struct CODA_OSS_API Uri final // help prevent mixups with std::string { Uri(); explicit Uri(const std::string& v); // validate=false @@ -93,7 +95,7 @@ inline std::ostream& operator<<(std::ostream& os, const Uri& uri) return os; } -class QName final +class CODA_OSS_API QName final { //! Prefix (Qualified) std::string mPrefix; diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Serializable.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Serializable.h index a1e486447c..3a6da62e51 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Serializable.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Serializable.h @@ -58,7 +58,7 @@ struct Serializable : public io::Serializable } //! Destructor - virtual ~Serializable() {} + virtual ~Serializable() noexcept(false) {} Serializable(const Serializable&) = delete; Serializable& operator=(const Serializable&) = delete; @@ -94,13 +94,13 @@ struct Serializable : public io::Serializable * Transfer this object into a byte stream * \param os The object to serialize this to */ - virtual void serialize(io::OutputStream& os); + void serialize(io::OutputStream& os) override; /*! * Unpack this input stream to the object * \param is Stream to read object from */ - virtual void deserialize(io::InputStream& is); + void deserialize(io::InputStream& is) override; protected: //! The parser diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/UtilitiesXerces.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/UtilitiesXerces.h index ba587a91be..ef20391231 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/UtilitiesXerces.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/UtilitiesXerces.h @@ -20,6 +20,7 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_UtilitiesXerces_h_INCLUDED_ #define CODA_OSS_xml_lite_UtilitiesXerces_h_INCLUDED_ @@ -30,34 +31,7 @@ #include #include "config/compiler_extensions.h" -#include "xml/lite/xml_lite_config.h" - -#if defined(USE_XERCES) - -CODA_OSS_disable_warning_system_header_push -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -CODA_OSS_disable_warning_pop +#include "config/Exports.h" #include #include @@ -66,6 +40,10 @@ CODA_OSS_disable_warning_pop #include #include +#include +#if defined(USE_XERCES) +#include "xerces_.h" + #include "xml/lite/XMLException.h" #include "xml/lite/ContentHandler.h" #include "xml/lite/Attributes.h" @@ -429,7 +407,7 @@ struct XercesErrorHandler final : public XercesErrorHandlerInterface_T * \class XercesContext * \brief This class safely creates and destroys Xerces */ -struct XercesContext final +struct CODA_OSS_API XercesContext final { //! Constructor XercesContext(); diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorInterface.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorInterface.h index c8066b1b17..4e50656eff 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorInterface.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorInterface.h @@ -20,9 +20,9 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_ValidatorInterface_h_INCLUDED_ #define CODA_OSS_xml_lite_ValidatorInterface_h_INCLUDED_ -#pragma once /*! * \file ValidatorInterface.h @@ -35,14 +35,17 @@ #include #include +#include + +#include #include #include #include #include +#include + #include #include -#include -#include namespace xml { @@ -94,7 +97,7 @@ struct ValidationInfo final * * This class is the interface for schema validators */ -class ValidatorInterface +class CODA_OSS_API ValidatorInterface { public: @@ -184,4 +187,4 @@ inline std::ostream& operator<< (std::ostream& out, } } -#endif // CODA_OSS_xml_lite_ValidatorInterface_h_INCLUDED_ \ No newline at end of file +#endif // CODA_OSS_xml_lite_ValidatorInterface_h_INCLUDED_ diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorXerces.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorXerces.h index 3cdde68844..8d5d79ba0b 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorXerces.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/ValidatorXerces.h @@ -20,30 +20,22 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_ValidatorXerces_h_INCLUDED_ #define CODA_OSS_xml_lite_ValidatorXerces_h_INCLUDED_ -#include - -#ifdef USE_XERCES - #include #include #include -#include -#include +#include "config/Exports.h" -#include -#include -#include -#include -#include -#include +#include +#ifdef USE_XERCES +#include "xerces_.h" -#include -#include -#include +#include +#include namespace xml { @@ -97,7 +89,7 @@ struct ValidationErrorHandler final : public xercesc::DOMErrorHandler * * This class is the Xercesc schema validator */ -class ValidatorXerces : public ValidatorInterface +class CODA_OSS_API ValidatorXerces : public ValidatorInterface { XercesContext mCtxt; //! this must be the first member listed diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderInterface.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderInterface.h index c0540b8cbe..f39bb47eaf 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderInterface.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderInterface.h @@ -20,17 +20,21 @@ * */ -#ifndef __XML_LITE_ABSTRACT_XML_READER_H__ -#define __XML_LITE_ABSTRACT_XML_READER_H__ +#pragma once +#ifndef CODA_OSS_xml_lite_XMLReaderInterface_h_INCLUDED_ +#define CODA_OSS_xml_lite_XMLReaderInterface_h_INCLUDED_ #include + +#include + #include "XMLException.h" namespace xml { namespace lite { -class XMLReaderInterface : public io::OutputStream +class CODA_OSS_API XMLReaderInterface : public io::OutputStream { public: @@ -77,4 +81,4 @@ class XMLReaderInterface : public io::OutputStream } } -#endif +#endif // CODA_OSS_xml_lite_XMLReaderInterface_h_INCLUDED_ diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderXerces.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderXerces.h index 52b78befbc..a808be8d86 100644 --- a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderXerces.h +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/XMLReaderXerces.h @@ -20,6 +20,7 @@ * */ +#pragma once #ifndef CODA_OSS_xml_lite_XMLReaderXerces_h_INCLUDED_ #define CODA_OSS_xml_lite_XMLReaderXerces_h_INCLUDED_ @@ -29,6 +30,8 @@ #include +#include + #include #include #include @@ -56,7 +59,7 @@ namespace lite * the Expat C Parser underneath, and wiring it to * generic event calls, via the content handler. */ -class XMLReaderXerces final : public XMLReaderInterface +class CODA_OSS_API XMLReaderXerces final : public XMLReaderInterface { XercesContext mCtxt; //! this must be the first member listed std::unique_ptr mNative; diff --git a/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/xerces_.h b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/xerces_.h new file mode 100644 index 0000000000..51d2ca436f --- /dev/null +++ b/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/xerces_.h @@ -0,0 +1,97 @@ +/* ========================================================================= + * This file is part of xml.lite-c++ + * ========================================================================= + * + * (C) Copyright 2004 - 2014, MDA Information Systems LLC + * + * xml.lite-c++ is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; If not, + * see . + * + */ + +#pragma once +#ifndef CODA_OSS_xml_lite_xerces_h_INCLUDED_ +#define CODA_OSS_xml_lite_xerces_h_INCLUDED_ + +#include "config/compiler_extensions.h" +#include + +#if defined(USE_XERCES) + +CODA_OSS_disable_warning_system_header_push +#if _MSC_VER +#pragma warning(disable: 26493) // Don't use C-style casts (type.4). +#pragma warning(disable: 26494) // Variable '...' is uninitialized. Always initialize an object (type.5). +#pragma warning(disable: 26451) // Arithmetic overflow: Using operator '...' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '...' to avoid overflow (io.2). +#pragma warning(disable: 26814) // The const variable '...' can be computed at compile-time. Consider using constexpr (con.5). +#pragma warning(disable: 26447) // The function is declared '...' but calls function '...' which may throw exceptions (f.6). +#pragma warning(disable: 26455) // Default constructor should not throw. Declare it '...' (f.6). +#pragma warning(disable: 26440) // Function '...' can be declared '...' (f.6). +#pragma warning(disable: 26496) // The variable '...' does not change after construction, mark it as const (con.4). +#pragma warning(disable: 26462) // The value pointed to by '...' is assigned only once, mark it as a pointer to const (con.4). +#pragma warning(disable: 26435) // Function '...' should specify exactly one of '...', '...', or '...' (c.128). +#pragma warning(disable: 26433) // Function '...' should be marked with '...' (c.128). +#pragma warning(disable: 26497) // You can attempt to make '...' constexpr unless it contains any undefined behavior (f.4). +#pragma warning(disable: 26433) // Function '...' should be marked with '...' (c.128). +#pragma warning(disable: 26456) // Operator '...' hides a non-virtual operator '...' (c.128). +#pragma warning(disable: 26446) // Prefer to use gsl::at() instead of unchecked subscript operator (bounds.4). +#pragma warning(disable: 26488) // Do not dereference a potentially null pointer: '...'. '...' was null at line 133 (lifetime.1). +#pragma warning(disable : 26477) // Use '...' rather than 0 or NULL(es .47). +#pragma warning(disable: 26457) // (void) should not be used to ignore return values, use '...' instead (es.48). +#pragma warning(disable: 26475) // Do not use function style casts (es.49). Prefer '...' over '...'.. +#else +CODA_OSS_disable_warning(-Wshadow) +CODA_OSS_disable_warning(-Wsuggest-override) +CODA_OSS_disable_warning(-Wzero-as-null-pointer-constant) +#endif + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +CODA_OSS_disable_warning_pop + +#endif + +#endif // CODA_OSS_xml_lite_xerces_h_INCLUDED_ + diff --git a/externals/coda-oss/modules/c++/xml.lite/source/Document.cpp b/externals/coda-oss/modules/c++/xml.lite/source/Document.cpp index 20fec58da3..3e61a3af7b 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/Document.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/Document.cpp @@ -43,7 +43,7 @@ void xml::lite::Document::remove(Element * toDelete) { if (mRootNode && mOwnRoot) delete mRootNode; - mRootNode = NULL; + mRootNode = nullptr; } else remove(toDelete, mRootNode); @@ -88,14 +88,14 @@ std::unique_ptr xml::lite::Document::createElement(const QNa void xml::lite::Document::insert(xml::lite::Element * element, xml::lite::Element * underThis) { - if (element != NULL && underThis != NULL) + if (element != nullptr && underThis != nullptr) underThis->addChild(element); } void xml::lite::Document::remove(xml::lite::Element * toDelete, xml::lite::Element * fromHere) { - if (fromHere != NULL && toDelete != NULL) + if (fromHere != nullptr && toDelete != nullptr) { for (std::vector::iterator i = fromHere->getChildren().begin(); i @@ -105,7 +105,7 @@ void xml::lite::Document::remove(xml::lite::Element * toDelete, { fromHere->getChildren().erase(i); delete toDelete; - toDelete = NULL; + toDelete = nullptr; return; } else diff --git a/externals/coda-oss/modules/c++/xml.lite/source/Element.cpp b/externals/coda-oss/modules/c++/xml.lite/source/Element.cpp index ddb7177d81..150588e5e4 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/Element.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/Element.cpp @@ -19,6 +19,7 @@ * see . * */ +#include "xml/lite/Element.h" #include @@ -26,7 +27,6 @@ #include #include -#include "xml/lite/Element.h" #include #include #include @@ -69,7 +69,7 @@ void xml::lite::Element::clone(const xml::lite::Element& node) *this = node; clearChildren(); - mParent = NULL; + mParent = nullptr; std::vector::const_iterator iter; iter = node.getChildren().begin(); diff --git a/externals/coda-oss/modules/c++/xml.lite/source/MinidomHandler.cpp b/externals/coda-oss/modules/c++/xml.lite/source/MinidomHandler.cpp index fe33084b70..3e2e1334cd 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/MinidomHandler.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/MinidomHandler.cpp @@ -34,7 +34,7 @@ void xml::lite::MinidomHandler::setDocument(Document *newDocument, bool own) { - if (mDocument != NULL && mOwnDocument) + if (mDocument != nullptr && mOwnDocument) { if (newDocument != mDocument) delete mDocument; diff --git a/externals/coda-oss/modules/c++/xml.lite/source/QName.cpp b/externals/coda-oss/modules/c++/xml.lite/source/QName.cpp index 1893cf4a32..5ce60dfff7 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/QName.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/QName.cpp @@ -19,10 +19,10 @@ * see . * */ +#include "xml/lite/QName.h" #include -#include "xml/lite/QName.h" #include "str/Manip.h" std::string xml::lite::QName::getName() const diff --git a/externals/coda-oss/modules/c++/xml.lite/source/Serializable.cpp b/externals/coda-oss/modules/c++/xml.lite/source/Serializable.cpp index c03969ee38..d5f55479ce 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/Serializable.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/Serializable.cpp @@ -25,7 +25,7 @@ void xml::lite::Serializable::serialize(io::OutputStream& os) { xml::lite::Element *root = getDocument()->getRootElement(); - if (root != NULL) + if (root != nullptr) os.write("\n"); root->print(os); } diff --git a/externals/coda-oss/modules/c++/xml.lite/source/ValidatorXerces.cpp b/externals/coda-oss/modules/c++/xml.lite/source/ValidatorXerces.cpp index 7e794d4e4b..cc1a1b516a 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/ValidatorXerces.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/ValidatorXerces.cpp @@ -28,11 +28,18 @@ #include #include // std::ignore +#include +#include +CODA_OSS_disable_warning_push +#ifndef _MSC_VER +CODA_OSS_disable_warning(-Wshadow) +#endif +#include +CODA_OSS_disable_warning_pop + #include #include #include -#include -#include namespace fs = std::filesystem; @@ -126,7 +133,7 @@ ValidatorXerces::ValidatorXerces( xercesc::DOMImplementationRegistry:: getDOMImplementation (ls_id)->createLSParser( xercesc::DOMImplementationLS::MODE_SYNCHRONOUS, - 0, + nullptr, xercesc::XMLPlatformUtils::fgMemoryManager, mSchemaPool.get())); diff --git a/externals/coda-oss/modules/c++/xml.lite/source/XMLReaderXerces.cpp b/externals/coda-oss/modules/c++/xml.lite/source/XMLReaderXerces.cpp index 3ecf8d79fc..a776842d90 100644 --- a/externals/coda-oss/modules/c++/xml.lite/source/XMLReaderXerces.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/source/XMLReaderXerces.cpp @@ -19,6 +19,7 @@ * see . * */ +#include "xml/lite/XMLReaderXerces.h" #include diff --git a/externals/coda-oss/modules/c++/xml.lite/unittests/test_soapelements.cpp b/externals/coda-oss/modules/c++/xml.lite/unittests/test_soapelements.cpp index 55de517a95..e1ec61504c 100644 --- a/externals/coda-oss/modules/c++/xml.lite/unittests/test_soapelements.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/unittests/test_soapelements.cpp @@ -25,7 +25,12 @@ #include "xml/lite/Document.h" #include "xml/lite/Element.h" #include "xml/lite/QName.h" -static const std::string test_text = "SOAP Test"; + +static const std::string& test_text() +{ + static const std::string retval = "SOAP Test"; + return retval; +} struct SOAPBody final : public xml::lite::Element { @@ -44,7 +49,7 @@ struct SOAP final : public xml::lite::Document const xml::lite::QName asQName(uri, qname); xml::lite::Element* elem = new SOAPBody(asQName); elem->setCharacterData(characterData); // avoid unused parameter warning - elem->setCharacterData(test_text); + elem->setCharacterData(test_text()); return elem; } }; @@ -55,8 +60,8 @@ TEST_CASE(test_overrideCreateElement) std::unique_ptr a(soap_test.createElement("a","b","Not SOAP Test")); auto b = dynamic_cast(a.get()); TEST_ASSERT_NOT_NULL(b); - TEST_ASSERT_EQ(a->getCharacterData(), test_text); - TEST_ASSERT_EQ(b->getCharacterData(), test_text); + TEST_ASSERT_EQ(a->getCharacterData(), test_text()); + TEST_ASSERT_EQ(b->getCharacterData(), test_text()); } TEST_MAIN diff --git a/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlattribute.cpp b/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlattribute.cpp index 011bb79d1c..8df82c970f 100644 --- a/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlattribute.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlattribute.cpp @@ -28,18 +28,31 @@ #include "xml/lite/MinidomParser.h" #include "xml/lite/QName.h" -static const std::string strUri = "urn:example.com"; -static const xml::lite::Uri uri(strUri); -static const std::string strXml_1_ = R"( +static const std::string& strUri() +{ + static const std::string retval("urn:example.com"); + return retval; +} +static const xml::lite::Uri& uri() +{ + static const xml::lite::Uri retval(strUri()); + return retval; +} + +static const auto& strXml() +{ + static const std::string strXml_1_ = R"( TEXT + static const std::string strXml_2_ = R"(" ns:int="314" /> )"; -static const auto strXml = strXml_1_ + strUri + strXml_2_; + static const auto retval = strXml_1_ + strUri() + strXml_2_; + return retval; +} struct test_MinidomParser final { @@ -47,7 +60,7 @@ struct test_MinidomParser final xml::lite::Element* getRootElement() { io::StringStream ss; - ss.stream() << strXml; + ss.stream() << strXml(); xmlParser.parse(ss); return getDocument(xmlParser).getRootElement(); @@ -88,19 +101,19 @@ TEST_CASE(test_getAttributeByNS) using namespace xml::lite; std::string strValue; - strValue = attributes.getValue(xml::lite::QName(uri, "int")); + strValue = attributes.getValue(xml::lite::QName(uri(), "int")); TEST_ASSERT_EQ("314", strValue); - strValue = getValue(attributes, uri, "int"); + strValue = getValue(attributes, uri(), "int"); TEST_ASSERT_EQ("314", strValue); - const auto key = xml::lite::QName(uri, "int"); + const auto key = xml::lite::QName(uri(), "int"); strValue = getValue(attributes, key); TEST_ASSERT_EQ("314", strValue); int value; - auto result = getValue(attributes, uri, "int", value); + auto result = getValue(attributes, uri(), "int", value); TEST_ASSERT_TRUE(result); TEST_ASSERT_EQ(314, value); - value = getValue(attributes, uri, "int"); + value = getValue(attributes, uri(), "int"); TEST_ASSERT_EQ(314, value); result = getValue(attributes, key, value); diff --git a/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlelement.cpp b/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlelement.cpp index a9890ab004..0c252e12a7 100644 --- a/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlelement.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlelement.cpp @@ -37,12 +37,18 @@ #define U8(s) static_cast(static_cast(s)) #endif -static const std::string text = "TEXT"; -static const std::string strXml1_ = R"( +static const std::string& text() +{ + static const std::string retval("TEXT"); + return retval; +} +static const auto& strXml() +{ + static const std::string strXml1_ = R"( )"; -static const std::string strXml2_ = R"( + static const std::string strXml2_ = R"( 314 3.14 @@ -51,7 +57,9 @@ static const std::string strXml2_ = R"( )"; -static const auto strXml = strXml1_ + text + strXml2_; + static const auto retval = strXml1_ + text() + strXml2_; + return retval; +} struct test_MinidomParser final { @@ -59,7 +67,7 @@ struct test_MinidomParser final const xml::lite::Element& getRootElement() const { io::StringStream ss; - ss.stream() << strXml; + ss.stream() << strXml(); xmlParser.parse(ss); return xml::lite::getRootElement(xmlParser.getDocument()); @@ -67,7 +75,7 @@ struct test_MinidomParser final xml::lite::Element& getRootElement() { io::StringStream ss; - ss.stream() << strXml; + ss.stream() << strXml(); xmlParser.parse(ss); return xml::lite::getRootElement(xmlParser.getDocument()); @@ -77,8 +85,8 @@ struct test_MinidomParser final TEST_CASE(test_getRootElement) { io::StringStream ss; - ss.stream() << strXml; - TEST_ASSERT_EQ(ss.stream().str(), strXml); + ss.stream() << strXml(); + TEST_ASSERT_EQ(ss.stream().str(), strXml()); xml::lite::MinidomParser xmlParser; xmlParser.parse(ss); @@ -97,7 +105,7 @@ TEST_CASE(test_getElementsByTagName) const auto& a = *(aElements[0]); const auto characterData = a.getCharacterData(); - TEST_ASSERT_EQ(characterData, text); + TEST_ASSERT_EQ(characterData, text()); } const auto docElements = root.getElementsByTagName("doc"); @@ -109,7 +117,7 @@ TEST_CASE(test_getElementsByTagName) const auto& a = *(aElements[0]); const auto characterData = a.getCharacterData(); - TEST_ASSERT_EQ(characterData, text); + TEST_ASSERT_EQ(characterData, text()); } } @@ -148,14 +156,14 @@ TEST_CASE(test_getElementByTagName) { const auto& a = root.getElementByTagName("a", true /*recurse*/); const auto characterData = a.getCharacterData(); - TEST_ASSERT_EQ(characterData, text); + TEST_ASSERT_EQ(characterData, text()); } const auto& doc = root.getElementByTagName("doc"); { const auto& a = doc.getElementByTagName("a"); const auto characterData = a.getCharacterData(); - TEST_ASSERT_EQ(characterData, text); + TEST_ASSERT_EQ(characterData, text()); } } diff --git a/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlparser.cpp b/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlparser.cpp index 6a4ff8bf18..b0e88e33b3 100644 --- a/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlparser.cpp +++ b/externals/coda-oss/modules/c++/xml.lite/unittests/test_xmlparser.cpp @@ -43,22 +43,71 @@ static inline std::u8string fromUtf8(const std::string& utf8) return str::EncodedStringView::fromUtf8(utf8).u8string(); } -static const std::string text("TEXT"); -static const std::string strXml = "" + text + ""; -static const std::u8string text8 = fromUtf8(text); +static const std::string& text() +{ + static const std::string retval("TEXT"); + return retval; +} +static const std::string& strXml() +{ + static const std::string retval = "" + text() + ""; + return retval; +} +static const std::u8string& text8() +{ + static const auto retval = fromUtf8(text()); + return retval; +} + +static const str::EncodedString& iso88591Text() +{ + static const str::EncodedString retval(str::cast("T\xc9XT")); // ISO8859-1, "TÉXT" + return retval; +} +static const auto& iso88591Text1252() +{ + static const auto retval = str::EncodedStringView::details::w1252string(iso88591Text().view()); + return retval; +} +static auto pIso88591Text_() +{ + static const auto retval = str::c_str(iso88591Text1252()); + return retval; +} -static const str::EncodedString iso88591Text(str::cast("T\xc9XT")); // ISO8859-1, "TÉXT" -static const auto iso88591Text1252 = str::EncodedStringView::details::w1252string(iso88591Text.view()); -static const auto pIso88591Text_ = str::c_str(iso88591Text1252); +static const str::EncodedString& utf8Text() +{ + static const str::EncodedString retval(str::cast("T\xc3\x89XT")); // UTF-8, "TÉXT" + return retval; +} -static const str::EncodedString utf8Text(str::cast("T\xc3\x89XT")); // UTF-8, "TÉXT" -static const auto utf8Text8 = utf8Text.u8string(); -static const auto pUtf8Text_ = str::c_str(utf8Text8); +static const auto& utf8Text8() +{ + static const auto retval = utf8Text().u8string(); + return retval; +} +static const auto pUtf8Text_() +{ + static const auto retval = str::c_str(utf8Text8()); + return retval; +} -static const auto strUtf8Xml8 = fromUtf8("") + utf8Text8 + fromUtf8(""); -static const std::string strUtf8Xml = str::c_str(strUtf8Xml8); +static const auto& strUtf8Xml8() +{ + static const auto retval = fromUtf8("") + utf8Text8() + fromUtf8(""); + return retval; +} +static const std::string& strUtf8Xml() +{ + static const std::string retval = str::c_str(strUtf8Xml8()); + return retval; +} -static const std::string platfromText_ = sys::Platform == sys::PlatformType::Windows ? pIso88591Text_ : pUtf8Text_; +static const std::string platfromText_() +{ + static const std::string retval = sys::Platform == sys::PlatformType::Windows ? pIso88591Text_() : pUtf8Text_(); + return retval; +} static std::filesystem::path find_unittest_file(const std::filesystem::path& name) { @@ -73,13 +122,13 @@ static void test_a_element(const std::string& testName, const xml::lite::Element const auto& a = *(aElements[0]); const auto characterData = a.getCharacterData(); - TEST_ASSERT_EQ(characterData, text); + TEST_ASSERT_EQ(characterData, text()); } TEST_CASE(testXmlParseSimple) { io::StringStream ss; - ss.stream() << strXml; - TEST_ASSERT_EQ(ss.stream().str(), strXml); + ss.stream() << strXml(); + TEST_ASSERT_EQ(ss.stream().str(), strXml()); xml::lite::MinidomParser xmlParser; xmlParser.parse(ss); @@ -95,8 +144,8 @@ TEST_CASE(testXmlParseSimple) TEST_CASE(testXmlPreserveCharacterData) { io::StringStream stream; - stream.stream() << strUtf8Xml; - TEST_ASSERT_EQ(stream.stream().str(), strUtf8Xml); + stream.stream() << strUtf8Xml(); + TEST_ASSERT_EQ(stream.stream().str(), strUtf8Xml()); xml::lite::MinidomParser xmlParser; // This is needed in Windows, because the default locale is *.1252 (more-or-less ISO8859-1) @@ -111,7 +160,7 @@ TEST_CASE(testXmlPreserveCharacterData) static xml::lite::Element& testXmlUtf8_(xml::lite::MinidomParser& xmlParser) { io::StringStream stream; - stream.stream() << strUtf8Xml; + stream.stream() << strUtf8Xml(); xmlParser.preserveCharacterData(true); xmlParser.parse(stream); @@ -127,7 +176,7 @@ TEST_CASE(testXmlUtf8_u8string) const auto& a = testXmlUtf8_(xmlParser); const auto actual = getCharacterData(a); - TEST_ASSERT_EQ(actual, utf8Text8); + TEST_ASSERT_EQ(actual, utf8Text8()); } TEST_CASE(testXmlUtf8) @@ -136,7 +185,7 @@ TEST_CASE(testXmlUtf8) const auto& a = testXmlUtf8_(xmlParser); auto actual = a.getCharacterData(); - const auto expected = platfromText_; + const auto expected = platfromText_(); TEST_ASSERT_EQ(actual, expected); } @@ -144,7 +193,7 @@ TEST_CASE(testXml_setCharacterData) { xml::lite::MinidomParser xmlParser; auto& a = testXmlUtf8_(xmlParser); - a.setCharacterData(utf8Text8); + a.setCharacterData(utf8Text8()); TEST_ASSERT_TRUE(true); // need to use hidden "testName" parameter } @@ -163,7 +212,7 @@ static std::string testXmlPrint_(std::string& expected, const std::string& chara TEST_CASE(testXmlPrintSimple) { std::string expected; - const auto actual = testXmlPrint_(expected, text); + const auto actual = testXmlPrint_(expected, text()); TEST_ASSERT_EQ(actual, expected); } @@ -177,12 +226,12 @@ TEST_CASE(testXmlPrintUtf8) { static const xml::lite::QName root(xml::lite::Uri(), "root"); - const auto expected = std::string("") + pUtf8Text_ + ""; + const auto expected = std::string("") + pUtf8Text_() + ""; { xml::lite::MinidomParser xmlParser; auto& document = getDocument(xmlParser); - const auto s8_w1252 = fromWindows1252(pIso88591Text_); + const auto s8_w1252 = fromWindows1252(pIso88591Text_()); const auto pRootElement = document.createElement(root, s8_w1252); io::StringStream output; @@ -194,7 +243,7 @@ TEST_CASE(testXmlPrintUtf8) xml::lite::MinidomParser xmlParser; auto& document = getDocument(xmlParser); - const auto pRootElement = document.createElement(root, utf8Text8); + const auto pRootElement = document.createElement(root, utf8Text8()); io::StringStream output; pRootElement->print(output); @@ -205,7 +254,7 @@ TEST_CASE(testXmlPrintUtf8) xml::lite::MinidomParser xmlParser; auto& document = getDocument(xmlParser); - const auto pRootElement = document.createElement(root, platfromText_); + const auto pRootElement = document.createElement(root, platfromText_()); io::StringStream output; pRootElement->print(output); @@ -218,12 +267,12 @@ TEST_CASE(testXmlConsoleOutput) { static const xml::lite::QName root(xml::lite::Uri(), "root"); - const auto expected = "" + platfromText_ + ""; + const auto expected = "" + platfromText_() + ""; { xml::lite::MinidomParser xmlParser; auto& document = getDocument(xmlParser); - const auto s8_w1252 = fromWindows1252(pIso88591Text_); + const auto s8_w1252 = fromWindows1252(pIso88591Text_()); const auto pRootElement = document.createElement(root, s8_w1252); io::StringStream output; @@ -235,7 +284,7 @@ TEST_CASE(testXmlConsoleOutput) xml::lite::MinidomParser xmlParser; auto& document = getDocument(xmlParser); - const auto pRootElement = document.createElement(root, utf8Text8); + const auto pRootElement = document.createElement(root, utf8Text8()); io::StringStream output; pRootElement->consoleOutput_(output); @@ -246,7 +295,7 @@ TEST_CASE(testXmlConsoleOutput) xml::lite::MinidomParser xmlParser; auto& document = getDocument(xmlParser); - const auto pRootElement = document.createElement(root, platfromText_); + const auto pRootElement = document.createElement(root, platfromText_()); io::StringStream output; pRootElement->consoleOutput_(output); @@ -258,7 +307,7 @@ TEST_CASE(testXmlConsoleOutput) TEST_CASE(testXmlParseAndPrintUtf8) { io::StringStream input; - input.stream() << strUtf8Xml; + input.stream() << strUtf8Xml(); xml::lite::MinidomParser xmlParser; xmlParser.preserveCharacterData(true); @@ -268,7 +317,7 @@ TEST_CASE(testXmlParseAndPrintUtf8) io::StringStream output; pRootElement->print(output); const auto actual = output.stream().str(); - TEST_ASSERT_EQ(actual, strUtf8Xml); + TEST_ASSERT_EQ(actual, strUtf8Xml()); } static void testReadEncodedXmlFile(const std::string& testName, const std::string& xmlFile, bool preserveCharacterData, @@ -308,12 +357,12 @@ static void testReadEncodedXmlFile(const std::string& testName, const std::strin TEST_CASE(testReadEncodedXmlFiles) { // these have "" - testReadEncodedXmlFile(testName, "encoding_utf-8.xml", true /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadEncodedXmlFile(testName, "encoding_utf-8.xml", false /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadEncodedXmlFile(testName, "encoding_windows-1252.xml", true /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadEncodedXmlFile(testName, "encoding_windows-1252.xml", false /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadEncodedXmlFile(testName, "ascii_encoding_utf-8.xml", true /*preserveCharacterData*/, text , text8); - testReadEncodedXmlFile(testName, "ascii_encoding_utf-8.xml", false /*preserveCharacterData*/, text , text8); + testReadEncodedXmlFile(testName, "encoding_utf-8.xml", true /*preserveCharacterData*/, platfromText_() , utf8Text8()); + testReadEncodedXmlFile(testName, "encoding_utf-8.xml", false /*preserveCharacterData*/, platfromText_(), utf8Text8()); + testReadEncodedXmlFile(testName, "encoding_windows-1252.xml", true /*preserveCharacterData*/, platfromText_(), utf8Text8()); + testReadEncodedXmlFile(testName, "encoding_windows-1252.xml", false /*preserveCharacterData*/, platfromText_(), utf8Text8()); + testReadEncodedXmlFile(testName, "ascii_encoding_utf-8.xml", true /*preserveCharacterData*/, text() , text8()); + testReadEncodedXmlFile(testName, "ascii_encoding_utf-8.xml", false /*preserveCharacterData*/, text(), text8()); } static void testReadXmlFile(const std::string& testName, const std::string& xmlFile, bool preserveCharacterData, @@ -357,12 +406,12 @@ static void testReadXmlFile(const std::string& testName, const std::string& xmlF TEST_CASE(testReadXmlFiles) { // These do NOT have "" - testReadXmlFile(testName, "utf-8.xml", true /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadXmlFile(testName, "utf-8.xml", false /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadXmlFile(testName, "windows-1252.xml", true /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadXmlFile(testName, "windows-1252.xml", false /*preserveCharacterData*/, platfromText_ , utf8Text8); - testReadXmlFile(testName, "ascii.xml", true /*preserveCharacterData*/, text , text8); - testReadXmlFile(testName, "ascii.xml", false /*preserveCharacterData*/, text , text8); + testReadXmlFile(testName, "utf-8.xml", true /*preserveCharacterData*/, platfromText_() , utf8Text8()); + testReadXmlFile(testName, "utf-8.xml", false /*preserveCharacterData*/, platfromText_(), utf8Text8()); + testReadXmlFile(testName, "windows-1252.xml", true /*preserveCharacterData*/, platfromText_(), utf8Text8()); + testReadXmlFile(testName, "windows-1252.xml", false /*preserveCharacterData*/, platfromText_(), utf8Text8()); + testReadXmlFile(testName, "ascii.xml", true /*preserveCharacterData*/, text(), text8()); + testReadXmlFile(testName, "ascii.xml", false /*preserveCharacterData*/, text(), text8()); } static bool find_string(io::FileInputStream& stream, const std::string& s) diff --git a/externals/coda-oss/modules/c++/zip/source/GZipInputStream.cpp b/externals/coda-oss/modules/c++/zip/source/GZipInputStream.cpp index 2fa47bcda0..9a3fd3b397 100644 --- a/externals/coda-oss/modules/c++/zip/source/GZipInputStream.cpp +++ b/externals/coda-oss/modules/c++/zip/source/GZipInputStream.cpp @@ -27,7 +27,7 @@ using namespace zip; GZipInputStream::GZipInputStream(const std::string& file) { mFile = gzopen(file.c_str(), "rb"); - if (mFile == NULL) + if (mFile == nullptr) { throw except::IOException(Ctxt( "Failed to open gzip stream [" + file + "]")); @@ -37,7 +37,7 @@ GZipInputStream::GZipInputStream(const std::string& file) void GZipInputStream::close() { gzclose( mFile); - mFile = NULL; + mFile = nullptr; } sys::SSize_T GZipInputStream::readImpl(void* buffer, size_t len) diff --git a/externals/coda-oss/modules/c++/zip/source/GZipOutputStream.cpp b/externals/coda-oss/modules/c++/zip/source/GZipOutputStream.cpp index b14e540f8c..6c83a1fdfa 100644 --- a/externals/coda-oss/modules/c++/zip/source/GZipOutputStream.cpp +++ b/externals/coda-oss/modules/c++/zip/source/GZipOutputStream.cpp @@ -27,7 +27,7 @@ using namespace zip; GZipOutputStream::GZipOutputStream(const std::string& file) { mFile = gzopen(file.c_str(), "wb"); - if (mFile == NULL) + if (mFile == nullptr) { throw except::IOException(Ctxt( "Failed to open gzip stream [" + file + "]")); @@ -59,5 +59,5 @@ void GZipOutputStream::write(const void* buffer, size_t len) void GZipOutputStream::close() { gzclose( mFile); - mFile = NULL; + mFile = nullptr; } diff --git a/externals/coda-oss/modules/c++/zip/source/ZipEntry.cpp b/externals/coda-oss/modules/c++/zip/source/ZipEntry.cpp index 9f71cbef32..4c93526729 100644 --- a/externals/coda-oss/modules/c++/zip/source/ZipEntry.cpp +++ b/externals/coda-oss/modules/c++/zip/source/ZipEntry.cpp @@ -29,7 +29,7 @@ const static char* sZipFileMadeByStr[] = { "OpenVMS", "UNIX", "VM/CMS", "Atari ST", "OS/2 H.P.F.S.", "Macintosh", "Z-System", "CP/M", "Windows NTFS", "MVS (OS/390 - Z/OS)", "VSE", "Acorn Risc", "VFAT", "alternative MVS", "BeOS", "Tandem", "OS/400", - "OS/X (Darwin)", NULL }; + "OS/X (Darwin)", nullptr }; namespace zip { @@ -69,7 +69,7 @@ const char* ZipEntry::getVersionMadeByString() const { if (mVersionMadeBy >= 20) - return NULL; + return nullptr; return sZipFileMadeByStr[mVersionMadeBy]; } @@ -97,7 +97,7 @@ std::ostream& operator<<(std::ostream& os, const zip::ZipEntry& ze) { const char* madeBy = ze.getVersionMadeByString(); std::string asStr = "Unknown"; - if (madeBy != NULL) + if (madeBy != nullptr) { asStr = madeBy; } diff --git a/externals/coda-oss/modules/c++/zip/source/ZipOutputStream.cpp b/externals/coda-oss/modules/c++/zip/source/ZipOutputStream.cpp index 3f7302e3dc..f4e09e34c6 100644 --- a/externals/coda-oss/modules/c++/zip/source/ZipOutputStream.cpp +++ b/externals/coda-oss/modules/c++/zip/source/ZipOutputStream.cpp @@ -29,7 +29,7 @@ namespace zip ZipOutputStream::ZipOutputStream(const std::string& pathname) { mZip = zipOpen64(pathname.c_str(), APPEND_STATUS_CREATE); - if (mZip == NULL) + if (mZip == nullptr) throw except::IOException(Ctxt("Failed to open zip stream " + pathname)); @@ -52,14 +52,14 @@ void ZipOutputStream::createFileInZip(const std::string& pathname, 0, NULL, 0, - comment.empty() ? NULL : comment.c_str(), + comment.empty() ? nullptr : comment.c_str(), Z_DEFLATED, Z_DEFAULT_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - password.empty() ? NULL : password.c_str(), + password.empty() ? nullptr : password.c_str(), 0, 0); @@ -96,7 +96,7 @@ void ZipOutputStream::write(const void* buffer, size_t len) void ZipOutputStream::close() { - sys::Int32_T results = zipClose(mZip, NULL); + sys::Int32_T results = zipClose(mZip, nullptr); if (results != Z_OK) throw except::IOException(Ctxt("Failed to save zip file.")); } diff --git a/externals/coda-oss/modules/drivers/j2k/openjpeg/CMakeLists.txt b/externals/coda-oss/modules/drivers/j2k/openjpeg/CMakeLists.txt index 51338f6c50..ea00968039 100644 --- a/externals/coda-oss/modules/drivers/j2k/openjpeg/CMakeLists.txt +++ b/externals/coda-oss/modules/drivers/j2k/openjpeg/CMakeLists.txt @@ -59,12 +59,12 @@ else() set(SOURCE_DIR "${${CMAKE_PROJECT_NAME}_${TARGET_NAME}_SOURCE_DIR}") - check_include_file("stdint.h" OPJ_HAVE_STDINT_H) + set(OPJ_HAVE_STDINT_H true) set(OPENJPEG_VERSION_MAJOR 2) set(OPENJPEG_VERSION_MINOR 3) set(OPENJPEG_VERSION_BUILD 1) - check_include_file("inttypes.h" OPJ_HAVE_INTTYPES_H) + set(OPJ_HAVE_INTTYPES_H true) set(PACKAGE_VERSION 2.3.1) set(_FILE_OFFSET_BITS 64) set(_LARGEFILE_SOURCE 1) @@ -72,7 +72,7 @@ else() set(CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE) check_symbol_exists("fseeko" "stdio.h" OPJ_HAVE_FSEEKO) unset(CMAKE_REQUIRED_DEFINITIONS) - check_include_file("malloc.h" OPJ_HAVE_MALLOC_H) + set(OPJ_HAVE_MALLOC_H true) check_symbol_exists("aligned_alloc" "malloc.h" OPJ_HAVE_ALIGNED_ALLOC) check_symbol_exists("_aligned_malloc" "malloc.h" OPJ_HAVE__ALIGNED_MALLOC) check_symbol_exists("memalign" "malloc.h" OPJ_HAVE_MEMALIGN) diff --git a/externals/coda-oss/modules/drivers/jpeg/CMakeLists.txt b/externals/coda-oss/modules/drivers/jpeg/CMakeLists.txt index 39b773bd71..dea7767094 100644 --- a/externals/coda-oss/modules/drivers/jpeg/CMakeLists.txt +++ b/externals/coda-oss/modules/drivers/jpeg/CMakeLists.txt @@ -53,13 +53,11 @@ else() HASH "SHA256=898C46BFE9152D51220C6679E905DE4DF75D2A67DCF315BF80459673AB1EB797" ) set(HAVE_PROTOTYPES 1) - check_cxx_source_compiles("int main() { unsigned short; return 0; }" - HAVE_UNSIGNED_SHORT) - check_cxx_source_compiles("int main() { unsigned char; return 0; }" - HAVE_UNSIGNED_CHAR) - check_include_file("stddef.h" HAVE_STDDEF_H) - check_include_file("stdlib.h" HAVE_STDLIB_H) - check_include_file("locale.h" HAVE_LOCALE_H) + set(HAVE_UNSIGNED_SHORT true) + set(HAVE_UNSIGNED_CHAR true) + set(HAVE_STDDEF_H true) + set(HAVE_STDLIB_H true) + set(HAVE_STDLIB_H true) set(SOURCE_DIR "${${CMAKE_PROJECT_NAME}_${TARGET_NAME}_SOURCE_DIR}") foreach(src "cdjpeg.c" "jaricom.c" "jcapimin.c" "jcapistd.c" diff --git a/externals/coda-oss/modules/drivers/pcre/CMakeLists.txt b/externals/coda-oss/modules/drivers/pcre/CMakeLists.txt index a1fe672848..ac2c2960a3 100644 --- a/externals/coda-oss/modules/drivers/pcre/CMakeLists.txt +++ b/externals/coda-oss/modules/drivers/pcre/CMakeLists.txt @@ -54,10 +54,10 @@ else() ) check_symbol_exists("bcopy" "strings.h" HAVE_BCOPY) - check_include_file("inttypes.h" HAVE_INTTYPES_H) - check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE) - check_include_file("stdint.h" HAVE_STDINT_H) - check_symbol_exists("strerror" "string.h" HAVE_STRERROR) + set(HAVE_INTTYPES_H true) + set(HAVE_MEMMOVE true) + set(HAVE_STDINT_H true) + set(HAVE_STRERROR true) set(SUPPORT_PCRE2_8 1) set(PCRE2_LINK_SIZE 2) set(PCRE2_MATCH_LIMIT 10000000) diff --git a/externals/coda-oss/modules/drivers/uuid/CMakeLists.txt b/externals/coda-oss/modules/drivers/uuid/CMakeLists.txt index 7885376cd5..319b35d55c 100644 --- a/externals/coda-oss/modules/drivers/uuid/CMakeLists.txt +++ b/externals/coda-oss/modules/drivers/uuid/CMakeLists.txt @@ -47,7 +47,7 @@ else() set(SOURCE_DIR "${${CMAKE_PROJECT_NAME}_${TARGET_NAME}_SOURCE_DIR}") - check_include_file("inttypes.h" HAVE_INTTYPES_H) + set(HAVE_INTTYPES_H true) check_type_size("int" SIZEOF_INT) check_type_size("short" SIZEOF_SHORT) check_type_size("long" SIZEOF_LONG) diff --git a/externals/coda-oss/modules/drivers/xml/xerces/CMakeLists.txt b/externals/coda-oss/modules/drivers/xml/xerces/CMakeLists.txt index c1de78a61a..664d68d0d4 100644 --- a/externals/coda-oss/modules/drivers/xml/xerces/CMakeLists.txt +++ b/externals/coda-oss/modules/drivers/xml/xerces/CMakeLists.txt @@ -63,48 +63,48 @@ else() HASH "SHA256=61981c7a464e33913a093e0dfe7daf8a45f21e46b1924eb97f92bdbb746e2e6e" ) - check_include_file("inttypes.h" HAVE_INTTYPES_H) + set(HAVE_INTTYPES_H true) check_include_file("netinet/in.h" HAVE_NETINET_IN_H) check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) check_include_file("netdb.h" HAVE_NETDB_H) check_include_file("intrin.h" HAVE_INTRIN_H) - check_include_file("emmintrin.h" HAVE_EMMINTRIN_H) - check_include_file("wchar.h" HAVE_WCHAR_H) - check_include_file("stdint.h" HAVE_STDINT_H) - check_include_file("stdio.h" HAVE_STDIO_H) + set(HAVE_EMMINTRIN_H true) + set(HAVE_WCHAR_H true) + set(HAVE_STDINT_H true) + set(HAVE_STDIO_H true) check_include_file("langinfo.h" HAVE_LANGINFO_H) check_include_file("iconv.h" HAVE_ICONV_H) check_include_file("nl_types.h" HAVE_NL_TYPES_H) - check_include_file("ctype.h" HAVE_CTYPE_H) - check_include_file("wctype.h" HAVE_WCTYPE_H) + set(HAVE_CTYPE_H true) + set(HAVE_WCTYPE_H true) check_include_file("cpuid.h" HAVE_CPUID_H) check_include_file("endian.h" HAVE_ENDIAN_H) check_include_file("machine/endian.h" HAVE_MACHINE_ENDIAN_H) check_include_file("arpa/nameser_compat.h" HAVE_ARPA_NAMESER_COMPAT_H) - check_include_file("errno.h" HAVE_ERRNO_H) - check_include_file("float.h" HAVE_FLOAT_H) - check_include_file("locale.h" HAVE_LOCALE_H) + set(HAVE_ERRNO_H true) + set(HAVE_FLOAT_H true) + set(HAVE_LOCALE_H true) check_include_file("sys/param.h" HAVE_SYS_PARAM_H) check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) - check_include_file("sys/stat.h" HAVE_SYS_STAT_H) - check_include_file("sys/timeb.h" HAVE_SYS_TIMEB_H) - check_include_file("sys/types.h" HAVE_SYS_TYPES_H) + set(HAVE_SYS_STAT_H true) + set(HAVE_SYS_TIMEB_H true) + set(HAVE_SYS_TYPES_H true) - check_symbol_exists("mblen" "stdlib.h" HAVE_MBLEN) + set(HAVE_MBLEN true) check_symbol_exists("mbrlen" "stdlib.h" HAVE_MBRLEN) check_symbol_exists("mbsrtowcs" "stdlib.h" HAVE_MBSRTOWCS) - check_symbol_exists("mbstowcs" "stdlib.h" HAVE_MBSTOWCS) - check_symbol_exists("wsctombs" "stdlib.h" HAVE_WCSTOMBS) + set(HAVE_MBSTOWCS true) + set(HAVE_WCSTOMBS true) check_symbol_exists("wcsrtombs" "stdlib.h" HAVE_WCSRTOMBS) check_symbol_exists("realpath" "stdlib.h" HAVE_REALPATH) - check_symbol_exists("strchr" "string.h" HAVE_STRCHR) - check_symbol_exists("strdup" "string.h" HAVE_STRDUP) + set(HAVE_STRCHR true) + set(HAVE_STRDUP true) check_symbol_exists("stricmp" "string.h" HAVE_STRICMP) check_symbol_exists("strnicmp" "string.h" HAVE_STRNICMP) check_symbol_exists("strrcmp" "string.h" HAVE_STRRCMP) - check_symbol_exists("strstr" "string.h" HAVE_STRSTR) - check_symbol_exists("strtol" "string.h" HAVE_STRTOL) - check_symbol_exists("strtoul" "string.h" HAVE_STRTOUL) + set(HAVE_STRSTR true) + set(HAVE_STRTOL true) + set(HAVE_STRTOUL true) check_symbol_exists("strcasecmp" "strings.h" HAVE_STRCASECMP) check_symbol_exists("strncasecmp" "strings.h" HAVE_STRNCASECMP) check_symbol_exists("pathconf" "unistd.h" HAVE_PATHCONF) @@ -112,15 +112,15 @@ else() check_symbol_exists("iconv" "iconv.h" HAVE_ICONV) check_symbol_exists("iconv_close" "iconv.h" HAVE_ICONV_CLOSE) check_symbol_exists("iconv_open" "iconv.h" HAVE_ICONV_OPEN) - check_symbol_exists("towupper" "wctype.h" HAVE_TOWUPPER) - check_symbol_exists("towlower" "wctype.h" HAVE_TOWLOWER) + set(HAVE_TOWUPPER true) + set(HAVE_TOWLOWER true) check_symbol_exists("catclose" "nl_types.h" HAVE_CATCLOSE) check_symbol_exists("catgets" "nl_types.h" HAVE_CATGETS) check_symbol_exists("catopen" "nl_types.h" HAVE_CATOPEN) - check_symbol_exists("localeconv" "locale.h" HAVE_LOCALECONV) - check_symbol_exists("setlocale" "locale.h" HAVE_SETLOCALE) + set(HAVE_LOCALECONV true) + set(HAVE_SETLOCALE true) check_symbol_exists("socket" "sys/socket.h" HAVE_SOCKET) - check_symbol_exists("ftime" "sys/timeb.h" HAVE_FTIME) + set(HAVE_FTIME true) check_symbol_exists("getaddrinfo" "netdb.h" HAVE_GETADDRINFO) find_library(NSL_LIB nsl) @@ -130,7 +130,7 @@ else() check_include_file("unistd.h" HAVE_UNISTD_H) check_include_file("sys/time.h" HAVE_SYS_TIME_H) - check_include_file("limits.h" HAVE_LIMITS_H) + set(HAVE_LIMITS_H true) check_include_file("strings.h" HAVE_STRINGS_H) # extra defines for config.h diff --git a/externals/nitro/.github/workflows/frequent_check.yml b/externals/nitro/.github/workflows/frequent_check.yml index 28857d3e73..1a05c1c661 100644 --- a/externals/nitro/.github/workflows/frequent_check.yml +++ b/externals/nitro/.github/workflows/frequent_check.yml @@ -4,9 +4,12 @@ on: [push] jobs: - build-windows: - name: Windows - runs-on: [windows-latest] + build-cmake-windows: + strategy: + matrix: + os: [windows-latest] + name: ${{ matrix.os }}-CMake + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -16,22 +19,36 @@ jobs: python-version: '3.7' - name: configure run: | - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=installWindows-Github -DPYTHON_VERSION="3.7" .. + mkdir target-Release + cd target-Release + cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION="3.7" .. - name: make run: | - cd build + cd target-Release cmake --build . --config Release -j cmake --build . --config Release --target install - name: test run: | - cd build + cd target-Release ctest -C Release --output-on-failure + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + with: + msbuild-architecture: x64 + - name: msbuild + run: | + msbuild nitro.sln /p:configuration=Release + #- name: mstest + # run: | + # mstest /testcontainer:${RUNNER_WORKSPACE}\coda-oss\x64\Releast\Test.dll + # mstest /testcontainer:${RUNNER_WORKSPACE}\coda-oss\x64\Releast\Test++.dll - build-linux: - name: Linux - runs-on: [ubuntu-latest] + build-linux-cmake: + strategy: + matrix: + os: [ubuntu-latest] + name: ${{ matrix.os }}-CMake + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -41,16 +58,16 @@ jobs: python-version: '3.7' - name: configure run: | - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=installLinux-Github -DPYTHON_VERSION=3.7 .. + mkdir target-Release + cd target-Release + cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.7 .. - name: make run: | - cd build + cd target-Release # using the default number of threads (-j) causes G++ to crash cmake --build . -j 6 cmake --build . --target install - name: test run: | - cd build + cd target-Release ctest --output-on-failure diff --git a/externals/nitro/.github/workflows/main.yml b/externals/nitro/.github/workflows/main.yml index 8df40ccc1c..5151ecc5c1 100644 --- a/externals/nitro/.github/workflows/main.yml +++ b/externals/nitro/.github/workflows/main.yml @@ -6,11 +6,13 @@ on: pull_request: branches: main - jobs: - build-windows: - name: Windows - runs-on: [windows-latest] + build-cmake-windows: + strategy: + matrix: + os: [windows-latest] + name: ${{ matrix.os }}-CMake + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -20,22 +22,36 @@ jobs: python-version: '3.7' - name: configure run: | - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=installWindows-Github -DPYTHON_VERSION="3.7" .. + mkdir target-Release + cd target-Release + cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION="3.7" .. - name: make run: | - cd build + cd target-Release cmake --build . --config Release -j cmake --build . --config Release --target install - name: test run: | - cd build - ctest -C Release + cd target-Release + ctest -C Release --output-on-failure + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + with: + msbuild-architecture: x64 + - name: msbuild + run: | + msbuild nitro.sln /p:configuration=Release + #- name: mstest + # run: | + # mstest /testcontainer:${RUNNER_WORKSPACE}\coda-oss\x64\Releast\Test.dll + # mstest /testcontainer:${RUNNER_WORKSPACE}\coda-oss\x64\Releast\Test++.dll - build-linux: - name: Linux - runs-on: [ubuntu-latest] + build-linux-cmake: + strategy: + matrix: + os: [ubuntu-latest] + name: ${{ matrix.os }}-CMake + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -45,18 +61,18 @@ jobs: python-version: '3.7' - name: configure run: | - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=installLinux-Github -DPYTHON_VERSION=3.7 .. + mkdir target-Release + cd target-Release + cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.7 .. - name: make run: | - cd build + cd target-Release # using the default number of threads (-j) causes G++ to crash cmake --build . -j 6 cmake --build . --target install - name: test run: | - cd build - ctest + cd target-Release + ctest --output-on-failure diff --git a/externals/nitro/CMakeLists.txt b/externals/nitro/CMakeLists.txt index eb788b537b..6bd74b7352 100644 --- a/externals/nitro/CMakeLists.txt +++ b/externals/nitro/CMakeLists.txt @@ -36,12 +36,6 @@ if (${CMAKE_PROJECT_NAME} STREQUAL nitro) coda_initialize_build() else() # build coda-oss ourselves - - # disable some unneeded drivers from coda-oss - set(ENABLE_PCRE OFF CACHE BOOL "enable PCRE library" FORCE) - set(ENABLE_UUID OFF CACHE BOOL "enable uuid library" FORCE) - set(ENABLE_ZIP OFF CACHE BOOL "enable ZIP library" FORCE) - set(CODA_OSS_DIR "coda-oss") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/${CODA_OSS_DIR}/cmake") diff --git a/externals/nitro/Test++/Test++.vcxproj b/externals/nitro/Test++/Test++.vcxproj index d1d7e03969..19fff43f6b 100644 --- a/externals/nitro/Test++/Test++.vcxproj +++ b/externals/nitro/Test++/Test++.vcxproj @@ -57,7 +57,7 @@ Use EnableAllWarnings true - $(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)modules\c\;$(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + $(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)modules\c\;$(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories);$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ _DEBUG;%(PreprocessorDefinitions) true pch.h @@ -68,10 +68,11 @@ true true ProgramDatabase + AdvancedVectorExtensions2 Windows - $(VCInstallDir)UnitTest\lib;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\;%(AdditionalLibraryDirectories) + $(VCInstallDir)UnitTest\lib;$(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\;%(AdditionalLibraryDirectories) @@ -81,7 +82,7 @@ true true true - $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories);$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -89,12 +90,13 @@ Guard true true + AdvancedVectorExtensions2 Windows true true - $(VCInstallDir)UnitTest\lib;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\;%(AdditionalLibraryDirectories) + $(VCInstallDir)UnitTest\lib;$(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\;%(AdditionalLibraryDirectories) diff --git a/externals/nitro/Test/Test.vcxproj b/externals/nitro/Test/Test.vcxproj index ff357b9bbd..3f37235948 100644 --- a/externals/nitro/Test/Test.vcxproj +++ b/externals/nitro/Test/Test.vcxproj @@ -57,7 +57,7 @@ Use EnableAllWarnings true - $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) _DEBUG;%(PreprocessorDefinitions) true pch.h @@ -68,10 +68,11 @@ true true ProgramDatabase + AdvancedVectorExtensions2 Windows - $(VCInstallDir)UnitTest\lib;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\;%(AdditionalLibraryDirectories) + $(VCInstallDir)UnitTest\lib;$(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\;%(AdditionalLibraryDirectories) @@ -81,7 +82,7 @@ true true true - $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) + $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -89,12 +90,13 @@ Guard true true + AdvancedVectorExtensions2 Windows true true - $(VCInstallDir)UnitTest\lib;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\;%(AdditionalLibraryDirectories) + $(VCInstallDir)UnitTest\lib;$(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\;%(AdditionalLibraryDirectories) diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj b/externals/nitro/modules/c++/nitf-c++.vcxproj index 37f4339fb9..7a96691719 100644 --- a/externals/nitro/modules/c++/nitf-c++.vcxproj +++ b/externals/nitro/modules/c++/nitf-c++.vcxproj @@ -219,7 +219,7 @@ true _DEBUG;%(PreprocessorDefinitions) true - $(ProjectDir)nitf\include\;$(ProjectDir)..\c\nrt\include\;$(ProjectDir)..\c\nitf\include\;$(ProjectDir)..\c\j2k\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\ + $(ProjectDir)nitf\include\;$(ProjectDir)..\c\nrt\include\;$(ProjectDir)..\c\nitf\include\;$(ProjectDir)..\c\j2k\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ Use pch.h pch.h @@ -233,6 +233,7 @@ true MultiThreadedDebugDLL true + AdvancedVectorExtensions2 @@ -251,7 +252,7 @@ true NDEBUG;%(PreprocessorDefinitions) true - $(ProjectDir)nitf\include\;$(ProjectDir)..\c\nrt\include\;$(ProjectDir)..\c\nitf\include\;$(ProjectDir)..\c\j2k\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\ + $(ProjectDir)nitf\include\;$(ProjectDir)..\c\nrt\include\;$(ProjectDir)..\c\nitf\include\;$(ProjectDir)..\c\j2k\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ Use pch.h pch.h @@ -260,6 +261,7 @@ Speed true Level3 + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj index 45e85e475b..1ab273b982 100644 --- a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj +++ b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj @@ -51,7 +51,7 @@ true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true - $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\ + $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ Use pch.h pch.h @@ -64,11 +64,12 @@ true MultiThreadedDebugDLL true + AdvancedVectorExtensions2 Console true - $(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\ + $(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ @@ -78,7 +79,7 @@ true NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true - $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\ + $(SolutionDir)modules\c\nrt\include\;$(SolutionDir)modules\c\nitf\include\;$(SolutionDir)modules\c\jpeg\include\;$(SolutionDir)modules\c\j2k\include\;$(SolutionDir)modules\c\cgm\include;$(SolutionDir)modules\c\;$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\nitf\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\ Use pch.h pch.h @@ -87,13 +88,14 @@ Guard true Level3 + AdvancedVectorExtensions2 Console true true true - $(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\ + $(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ diff --git a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj index 5acb00e8ef..80e6ea5317 100644 --- a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj @@ -75,12 +75,13 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 true - $(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\ + $(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ openjpeg.lib;%(AdditionalDependencies) @@ -98,6 +99,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 @@ -105,7 +107,7 @@ true true true - $(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\ + $(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ openjpeg.lib;%(AdditionalDependencies) diff --git a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj index 12c9a8c2bc..2010203c4d 100644 --- a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj @@ -75,12 +75,13 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 true - $(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\ + $(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ openjpeg.lib;%(AdditionalDependencies) @@ -98,6 +99,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 @@ -105,7 +107,7 @@ true true true - $(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\lib\ + $(SolutionDir)out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\lib\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\lib\ openjpeg.lib;%(AdditionalDependencies) diff --git a/externals/nitro/modules/c/nitf-c.vcxproj b/externals/nitro/modules/c/nitf-c.vcxproj index d8961a150b..45fa8fa678 100644 --- a/externals/nitro/modules/c/nitf-c.vcxproj +++ b/externals/nitro/modules/c/nitf-c.vcxproj @@ -52,7 +52,7 @@ true _DEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H true - $(ProjectDir)nrt\include\;$(ProjectDir)nitf\include\;$(ProjectDir)jpeg\include\;$(ProjectDir)j2k\include\;$(ProjectDir)cgm\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;%(AdditionalIncludeDirectories) + $(ProjectDir)nrt\include\;$(ProjectDir)nitf\include\;$(ProjectDir)jpeg\include\;$(ProjectDir)j2k\include\;$(ProjectDir)cgm\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\;%(AdditionalIncludeDirectories) Use pch.h pch.h @@ -65,6 +65,7 @@ MultiThreadedDebugDLL true true + AdvancedVectorExtensions2 @@ -79,7 +80,7 @@ true NDEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H true - $(ProjectDir)nrt\include\;$(ProjectDir)nitf\include\;$(ProjectDir)jpeg\include\;$(ProjectDir)j2k\include\;$(ProjectDir)cgm\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\;%(AdditionalIncludeDirectories) + $(ProjectDir)nrt\include\;$(ProjectDir)nitf\include\;$(ProjectDir)jpeg\include\;$(ProjectDir)j2k\include\;$(ProjectDir)cgm\include\;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)\target-$(Configuration)\installwindows-latestCMake-Github\include\;%(AdditionalIncludeDirectories) Use pch.h pch.h @@ -88,6 +89,7 @@ Speed true Level3 + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj index 00cf593d4e..cf18d23902 100644 --- a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj index 5a0dfc6dd8..20212f3d20 100644 --- a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/ACFTA.vcxproj b/externals/nitro/modules/c/nitf/ACFTA.vcxproj index 25e8dbf96f..05e79a2de1 100644 --- a/externals/nitro/modules/c/nitf/ACFTA.vcxproj +++ b/externals/nitro/modules/c/nitf/ACFTA.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj index 1658fcd913..0f70aa7c9b 100644 --- a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj +++ b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj index ed2deb6e3c..c737b6b4b3 100644 --- a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj +++ b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj index f86f3a4085..9712bafcda 100644 --- a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj +++ b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj @@ -75,7 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase - stdc11 + AdvancedVectorExtensions2 @@ -97,7 +97,7 @@ CompileAsCpp Guard true - stdc11 + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj index a44d75b6fe..aaa8673444 100644 --- a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj +++ b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/HISTOA.vcxproj b/externals/nitro/modules/c/nitf/HISTOA.vcxproj index 25e0589630..f186bc6c9a 100644 --- a/externals/nitro/modules/c/nitf/HISTOA.vcxproj +++ b/externals/nitro/modules/c/nitf/HISTOA.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/JITCID.vcxproj b/externals/nitro/modules/c/nitf/JITCID.vcxproj index e4982a9d71..37b29b98e6 100644 --- a/externals/nitro/modules/c/nitf/JITCID.vcxproj +++ b/externals/nitro/modules/c/nitf/JITCID.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj index 03a08a5a1b..d0a975671a 100644 --- a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj +++ b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj index c57006a40c..a2858247eb 100644 --- a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj +++ b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj index af32e16dff..a243a545b4 100644 --- a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj +++ b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj @@ -75,6 +75,7 @@ MultiThreadedDebugDLL true ProgramDatabase + AdvancedVectorExtensions2 @@ -96,6 +97,7 @@ CompileAsCpp Guard true + AdvancedVectorExtensions2 diff --git a/externals/nitro/nitro.sln b/externals/nitro/nitro.sln index edc29f5c5b..d7e22ef783 100644 --- a/externals/nitro/nitro.sln +++ b/externals/nitro/nitro.sln @@ -65,6 +65,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSEXRB", "modules\c\nitf\CSEXRB.vcxproj", "{0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "externals", "externals", "{7D26D571-0014-4C50-BF86-612E743E64B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coda-oss", "externals\coda-oss\modules\c++\coda-oss.vcxproj", "{9997E895-5161-4DDF-8F3F-099894CB2F21}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -147,6 +151,10 @@ Global {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Debug|x64.Build.0 = Debug|x64 {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Release|x64.ActiveCfg = Release|x64 {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Release|x64.Build.0 = Release|x64 + {9997E895-5161-4DDF-8F3F-099894CB2F21}.Debug|x64.ActiveCfg = Debug|x64 + {9997E895-5161-4DDF-8F3F-099894CB2F21}.Debug|x64.Build.0 = Debug|x64 + {9997E895-5161-4DDF-8F3F-099894CB2F21}.Release|x64.ActiveCfg = Release|x64 + {9997E895-5161-4DDF-8F3F-099894CB2F21}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -168,6 +176,7 @@ Global {A45CB073-25A7-411D-A7E7-589BCC8AF547} = {5C5727E7-0CFF-42B4-8F5A-D31B3BC81F21} {AC22B9D3-0749-486F-A8F2-D6977BF9505D} = {A45CB073-25A7-411D-A7E7-589BCC8AF547} {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E} = {27A2685A-E869-42A2-956D-92994F60C536} + {9997E895-5161-4DDF-8F3F-099894CB2F21} = {7D26D571-0014-4C50-BF86-612E743E64B6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2D7AC542-BBB6-4BAC-8BF1-7E76C714BBA4} diff --git a/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h b/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h index 395efa892f..4892352631 100644 --- a/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h +++ b/six/modules/c++/six.sidd/include/six/sidd/GeoTIFFReadControl.h @@ -34,7 +34,9 @@ namespace sidd struct GeoTIFFReadControl : public ReadControl { - GeoTIFFReadControl() = default; + GeoTIFFReadControl() noexcept(false) {} + + virtual ~GeoTIFFReadControl() noexcept {} GeoTIFFReadControl(const GeoTIFFReadControl&) = delete; GeoTIFFReadControl operator=(const GeoTIFFReadControl&) = delete; From 8e27f73772865f3b85cc6d3c45d7103fc2a8424e Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 10 Jul 2023 17:07:20 -0400 Subject: [PATCH 4/4] latest from CODA-OSS and NITRO --- externals/coda-oss/modules/c++/coda-oss.vcxproj | 1 + externals/coda-oss/modules/c++/pch.h | 1 + externals/nitro/Test++/Test++.vcxproj | 6 ++++++ externals/nitro/Test/Test.vcxproj | 6 ++++++ externals/nitro/modules/c++/nitf-c++.vcxproj | 6 ++++++ .../modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj | 6 ++++++ externals/nitro/modules/c/j2k/J2KCompress.vcxproj | 6 ++++++ externals/nitro/modules/c/j2k/J2KDecompress.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf-c.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ACCHZB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ACCPOB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ACFTA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/AIMIDB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/CSCRNA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/CSEXRB.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/ENGRDA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/HISTOA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/JITCID.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/PTPRAA.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/RPFHDR.vcxproj | 6 ++++++ externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj | 6 ++++++ 21 files changed, 116 insertions(+) diff --git a/externals/coda-oss/modules/c++/coda-oss.vcxproj b/externals/coda-oss/modules/c++/coda-oss.vcxproj index 92ae5f065f..e35e63f9b3 100644 --- a/externals/coda-oss/modules/c++/coda-oss.vcxproj +++ b/externals/coda-oss/modules/c++/coda-oss.vcxproj @@ -587,6 +587,7 @@ true AdvancedVectorExtensions2 true + stdcpp17 diff --git a/externals/coda-oss/modules/c++/pch.h b/externals/coda-oss/modules/c++/pch.h index f39484bc24..5cca8aa101 100644 --- a/externals/coda-oss/modules/c++/pch.h +++ b/externals/coda-oss/modules/c++/pch.h @@ -46,6 +46,7 @@ CODA_OSS_disable_warning_pop #pragma warning(disable: 6011) // Dereferencing NULL pointer '...'. #pragma warning(disable: 6313) // Incorrect operator. Use an equality test to check for zero-valued flags. #pragma warning(disable: 6389) // Move '...' to anonymous namespace or put a forward declaration in a common header included in this file. +#pragma warning(disable: 4866) // compiler may not enforce left-to-right evaluation order for call to '...' #pragma warning(disable: 26432) // If you define or delete any default operation in the type '...', define or delete them all (c.21). #pragma warning(disable: 26429) // Symbol '...' is never tested for nullness, it can be marked as not_null (f.23). diff --git a/externals/nitro/Test++/Test++.vcxproj b/externals/nitro/Test++/Test++.vcxproj index 19fff43f6b..956d9b5995 100644 --- a/externals/nitro/Test++/Test++.vcxproj +++ b/externals/nitro/Test++/Test++.vcxproj @@ -69,6 +69,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows @@ -91,6 +94,9 @@ true true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows diff --git a/externals/nitro/Test/Test.vcxproj b/externals/nitro/Test/Test.vcxproj index 3f37235948..0d826bcb26 100644 --- a/externals/nitro/Test/Test.vcxproj +++ b/externals/nitro/Test/Test.vcxproj @@ -69,6 +69,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows @@ -91,6 +94,9 @@ true true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Windows diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj b/externals/nitro/modules/c++/nitf-c++.vcxproj index 7a96691719..d7d9d60a7d 100644 --- a/externals/nitro/modules/c++/nitf-c++.vcxproj +++ b/externals/nitro/modules/c++/nitf-c++.vcxproj @@ -234,6 +234,9 @@ MultiThreadedDebugDLL true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -262,6 +265,9 @@ true Level3 AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj index 1ab273b982..0c6038085d 100644 --- a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj +++ b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj @@ -65,6 +65,9 @@ MultiThreadedDebugDLL true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Console @@ -89,6 +92,9 @@ true Level3 AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true Console diff --git a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj index 80e6ea5317..48c8b1cc42 100644 --- a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -100,6 +103,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj index 2010203c4d..44a16714c8 100644 --- a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -100,6 +103,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf-c.vcxproj b/externals/nitro/modules/c/nitf-c.vcxproj index 45fa8fa678..cbb0f86899 100644 --- a/externals/nitro/modules/c/nitf-c.vcxproj +++ b/externals/nitro/modules/c/nitf-c.vcxproj @@ -66,6 +66,9 @@ true true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -90,6 +93,9 @@ true Level3 AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj index cf18d23902..ce2b47ab34 100644 --- a/externals/nitro/modules/c/nitf/ACCHZB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCHZB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj index 20212f3d20..40ab797e7e 100644 --- a/externals/nitro/modules/c/nitf/ACCPOB.vcxproj +++ b/externals/nitro/modules/c/nitf/ACCPOB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ACFTA.vcxproj b/externals/nitro/modules/c/nitf/ACFTA.vcxproj index 05e79a2de1..0739a7efc0 100644 --- a/externals/nitro/modules/c/nitf/ACFTA.vcxproj +++ b/externals/nitro/modules/c/nitf/ACFTA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj index 0f70aa7c9b..6d1f065e0d 100644 --- a/externals/nitro/modules/c/nitf/AIMIDB.vcxproj +++ b/externals/nitro/modules/c/nitf/AIMIDB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj index c737b6b4b3..94dda178a5 100644 --- a/externals/nitro/modules/c/nitf/CSCRNA.vcxproj +++ b/externals/nitro/modules/c/nitf/CSCRNA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj index 9712bafcda..b926fcec29 100644 --- a/externals/nitro/modules/c/nitf/CSEXRB.vcxproj +++ b/externals/nitro/modules/c/nitf/CSEXRB.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj index aaa8673444..485b3d1e70 100644 --- a/externals/nitro/modules/c/nitf/ENGRDA.vcxproj +++ b/externals/nitro/modules/c/nitf/ENGRDA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/HISTOA.vcxproj b/externals/nitro/modules/c/nitf/HISTOA.vcxproj index f186bc6c9a..9875bc74cc 100644 --- a/externals/nitro/modules/c/nitf/HISTOA.vcxproj +++ b/externals/nitro/modules/c/nitf/HISTOA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/JITCID.vcxproj b/externals/nitro/modules/c/nitf/JITCID.vcxproj index 37b29b98e6..8361a3eff4 100644 --- a/externals/nitro/modules/c/nitf/JITCID.vcxproj +++ b/externals/nitro/modules/c/nitf/JITCID.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj index d0a975671a..f504de3489 100644 --- a/externals/nitro/modules/c/nitf/PTPRAA.vcxproj +++ b/externals/nitro/modules/c/nitf/PTPRAA.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj index a2858247eb..308b65e848 100644 --- a/externals/nitro/modules/c/nitf/RPFHDR.vcxproj +++ b/externals/nitro/modules/c/nitf/RPFHDR.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true diff --git a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj index a243a545b4..07d96936e3 100644 --- a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj +++ b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj @@ -76,6 +76,9 @@ true ProgramDatabase AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true @@ -98,6 +101,9 @@ Guard true AdvancedVectorExtensions2 + stdcpp17 + stdc11 + true