Skip to content

Commit 363097e

Browse files
committed
sfm: Fixed build for MSVC: snprintf only in VS2015 and above
1 parent 204db71 commit 363097e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

modules/sfm/src/libmv_light/libmv/logging/logging.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424
#include <glog/logging.h>
2525

26+
27+
#if defined _MSC_VER && _MSC_VER < 1900
28+
# define snprintf _snprintf
29+
#endif
30+
2631
#define LG LOG(INFO)
2732
#define V0 LOG(INFO)
2833
#define V1 LOG(INFO)

modules/sfm/src/libmv_light/libmv/simple_pipeline/pipeline.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
#include "libmv/simple_pipeline/tracks.h"
3131
#include "libmv/simple_pipeline/camera_intrinsics.h"
3232

33-
#ifdef _MSC_VER
34-
# define snprintf _snprintf
35-
#endif
36-
3733
namespace libmv {
3834
namespace {
3935

0 commit comments

Comments
 (0)