Skip to content

Commit 22d2207

Browse files
committed
flann: fix build with MSVC /sdl option
1 parent b991665 commit 22d2207

File tree

1 file changed

+5
-0
lines changed
  • modules/flann/include/opencv2/flann

1 file changed

+5
-0
lines changed

modules/flann/include/opencv2/flann/logger.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ class Logger
6363
stream = stdout;
6464
}
6565
else {
66+
#ifdef _MSC_VER
67+
if (fopen_s(&stream, name, "w") != 0)
68+
stream = NULL;
69+
#else
6670
stream = fopen(name,"w");
71+
#endif
6772
if (stream == NULL) {
6873
stream = stdout;
6974
}

0 commit comments

Comments
 (0)