Skip to content

Commit b7e7852

Browse files
JoeHowsealalek
authored andcommitted
Merge pull request #2046 from JoeHowse/master
Minor changes to the quality module to support Visual Studio 2013 (#2046) * quality: revise syntax to support Visual C++ 2013 * quality: changes to standardize constness between Visual C++ 2013 and other compilers
1 parent f2618a4 commit b7e7852

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/quality/include/opencv2/quality/qualitypsnr.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ class CV_EXPORTS_W QualityPSNR
2323
public:
2424

2525
/** @brief Default maximum pixel value */
26-
static CV_CONSTEXPR const double MAX_PIXEL_VALUE_DEFAULT = 255.;
26+
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900/*MSVS 2015*/)
27+
static constexpr double MAX_PIXEL_VALUE_DEFAULT = 255.;
28+
#else
29+
// support MSVS 2013
30+
static const int MAX_PIXEL_VALUE_DEFAULT = 255;
31+
#endif
2732

2833
/**
2934
@brief Create an object which calculates quality via mean square error

0 commit comments

Comments
 (0)