From 089f0535e2afadda279776c7ea898f6110c75a0e Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Thu, 28 Dec 2023 08:47:22 +0100 Subject: [PATCH] disable warning must eb defined before includes --- Basic_viewer/include/CGAL/Qt/Basic_viewer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h index 575b9fcfae3..b1959a29582 100644 --- a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h +++ b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h @@ -14,6 +14,8 @@ #ifndef CGAL_BASIC_VIEWER_H #define CGAL_BASIC_VIEWER_H +#define _CRT_SECURE_NO_WARNINGS + // TODO #include #include #include @@ -1550,11 +1552,9 @@ public: m_basic_viewer(nullptr), m_argc(1) { -#define _CRT_SECURE_NO_WARNINGS m_argv[0]=new char[strlen(title)+1]; strncpy(m_argv[0], title, strlen(title)); m_argv[1]=nullptr; -#undef _CRT_SECURE_NO_WARNINGS #if defined(CGAL_TEST_SUITE) bool cgal_test_suite = true; @@ -1657,4 +1657,6 @@ namespace CGAL #endif // CGAL_USE_BASIC_VIEWER +#undef _CRT_SECURE_NO_WARNINGS + #endif // CGAL_BASIC_VIEWER_H