disable warning must eb defined before includes

This commit is contained in:
Guillaume Damiand 2023-12-28 08:47:22 +01:00
parent ca296d548a
commit 089f0535e2
1 changed files with 4 additions and 2 deletions

View File

@ -14,6 +14,8 @@
#ifndef CGAL_BASIC_VIEWER_H
#define CGAL_BASIC_VIEWER_H
#define _CRT_SECURE_NO_WARNINGS
// TODO #include <CGAL/license/GraphicsView.h>
#include <cstring>
#include <iostream>
@ -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