Merge pull request #10883 from alalek:portable_stdint

pull/10873/merge
Alexander Alekhin 7 years ago
commit 8ffcc76011
  1. 1
      modules/calib3d/src/rho.cpp
  2. 1
      modules/calib3d/src/rho.h
  3. 44
      modules/core/include/opencv2/core/cvdef.h
  4. 12
      modules/core/include/opencv2/core/softfloat.hpp
  5. 4
      modules/core/src/persistence.hpp
  6. 1
      modules/dnn/src/precomp.hpp
  7. 3
      modules/imgcodecs/src/exif.cpp
  8. 1
      modules/imgcodecs/src/exif.hpp
  9. 2
      modules/imgproc/src/drawing.cpp

@ -48,7 +48,6 @@
#include <opencv2/core.hpp> #include <opencv2/core.hpp>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <stddef.h> #include <stddef.h>
#include <limits.h> #include <limits.h>

@ -51,7 +51,6 @@
/* Includes */ /* Includes */
#include <opencv2/core.hpp> #include <opencv2/core.hpp>
#include <stdint.h>

@ -452,6 +452,50 @@ Cv64suf;
# endif # endif
#endif #endif
// Integer types portatibility
#ifdef OPENCV_STDINT_HEADER
#include OPENCV_STDINT_HEADER
#else
#if defined(_MSC_VER) && _MSC_VER < 1600 /* MSVS 2010 */
namespace cv {
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
}
#elif defined(_MSC_VER) || __cplusplus >= 201103L
#include <cstdint>
namespace cv {
using std::int8_t;
using std::uint8_t;
using std::int16_t;
using std::uint16_t;
using std::int32_t;
using std::uint32_t;
using std::int64_t;
using std::uint64_t;
}
#else
#include <stdint.h>
namespace cv {
typedef ::int8_t int8_t;
typedef ::uint8_t uint8_t;
typedef ::int16_t int16_t;
typedef ::uint16_t uint16_t;
typedef ::int32_t int32_t;
typedef ::uint32_t uint32_t;
typedef ::int64_t int64_t;
typedef ::uint64_t uint64_t;
}
#endif
#endif
//! @} //! @}
#endif // OPENCV_CORE_CVDEF_H #endif // OPENCV_CORE_CVDEF_H

@ -45,18 +45,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cvdef.h" #include "cvdef.h"
// int32_t / uint32_t
#if defined(_MSC_VER) && _MSC_VER < 1600 /* MSVS 2010 */
namespace cv {
typedef signed int int32_t;
typedef unsigned int uint32_t;
}
#elif defined(_MSC_VER) || __cplusplus >= 201103L
#include <cstdint>
#else
#include <stdint.h>
#endif
namespace cv namespace cv
{ {

@ -8,13 +8,9 @@
#include "opencv2/core/types_c.h" #include "opencv2/core/types_c.h"
#include <deque> #include <deque>
#include <deque>
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <iterator> #include <iterator>
#ifdef _MSC_VER
#include <cstdint>
#endif // _MSC_VER
#define USE_ZLIB 1 #define USE_ZLIB 1
#if USE_ZLIB #if USE_ZLIB

@ -43,7 +43,6 @@
#include <opencv2/core/ocl.hpp> #include <opencv2/core/ocl.hpp>
#include <opencv2/core/opencl/ocl_defs.hpp> #include <opencv2/core/opencl/ocl_defs.hpp>
#include <opencv2/core/utils/trace.hpp> #include <opencv2/core/utils/trace.hpp>
#include <opencv2/core/softfloat.hpp> // int32_t (MSVS 2010-2013)
#include "cvconfig.h" #include "cvconfig.h"
#include <opencv2/dnn.hpp> #include <opencv2/dnn.hpp>
#include <opencv2/dnn/all_layers.hpp> #include <opencv2/dnn/all_layers.hpp>

@ -40,9 +40,8 @@
// //
//M*/ //M*/
#include "precomp.hpp"
#include "exif.hpp" #include "exif.hpp"
#include "opencv2/core/cvdef.h"
#include "opencv2/core/base.hpp"
namespace { namespace {

@ -48,7 +48,6 @@
#include <map> #include <map>
#include <utility> #include <utility>
#include <algorithm> #include <algorithm>
#include <stdint.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <iostream> #include <iostream>

@ -40,8 +40,6 @@
//M*/ //M*/
#include "precomp.hpp" #include "precomp.hpp"
#include <stdint.h>
namespace cv namespace cv
{ {

Loading…
Cancel
Save