Commit ea3dc789 authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed warnings produced by clang-9.0.0

parent e2dbf054
...@@ -320,7 +320,7 @@ public: ...@@ -320,7 +320,7 @@ public:
BASE64 = 64, //!< flag, write rawdata in Base64 by default. (consider using WRITE_BASE64) BASE64 = 64, //!< flag, write rawdata in Base64 by default. (consider using WRITE_BASE64)
WRITE_BASE64 = BASE64 | WRITE, //!< flag, enable both WRITE and BASE64 WRITE_BASE64 = BASE64 | WRITE, //!< flag, enable both WRITE and BASE64
}; };
enum enum State
{ {
UNDEFINED = 0, UNDEFINED = 0,
VALUE_EXPECTED = 1, VALUE_EXPECTED = 1,
......
...@@ -342,14 +342,6 @@ static inline void writeReal(uchar* p, double fval) ...@@ -342,14 +342,6 @@ static inline void writeReal(uchar* p, double fval)
class FileStorage::Impl : public FileStorage_API class FileStorage::Impl : public FileStorage_API
{ {
public: public:
enum State
{
UNDEFINED = 0,
VALUE_EXPECTED = 1,
NAME_EXPECTED = 2,
INSIDE_MAP = 4
};
void init() void init()
{ {
flags = 0; flags = 0;
......
...@@ -160,7 +160,14 @@ TEST(Core_Ptr, assignment) ...@@ -160,7 +160,14 @@ TEST(Core_Ptr, assignment)
{ {
Ptr<Reporter> p1(new Reporter(&deleted1)); Ptr<Reporter> p1(new Reporter(&deleted1));
#if defined(__clang__) && (__clang_major__ >= 9) && !defined(__APPLE__)
CV_DO_PRAGMA(GCC diagnostic push)
CV_DO_PRAGMA(GCC diagnostic ignored "-Wself-assign-overloaded")
#endif
p1 = p1; p1 = p1;
#if defined(__clang__) && (__clang_major__ >= 9) && !defined(__APPLE__)
CV_DO_PRAGMA(GCC diagnostic pop)
#endif
EXPECT_FALSE(deleted1); EXPECT_FALSE(deleted1);
} }
......
...@@ -78,7 +78,7 @@ template<typename T> struct tuple_wrap_helper ...@@ -78,7 +78,7 @@ template<typename T> struct tuple_wrap_helper
template<typename... Objs> template<typename... Objs>
struct tuple_wrap_helper<std::tuple<Objs...>> struct tuple_wrap_helper<std::tuple<Objs...>>
{ {
static std::tuple<Objs...> get(std::tuple<Objs...>&& objs) { return objs; } static std::tuple<Objs...> get(std::tuple<Objs...>&& objs) { return std::forward<std::tuple<Objs...>>(objs); }
}; };
template<typename, typename, typename> template<typename, typename, typename>
......
...@@ -66,7 +66,7 @@ Mat CameraParams::K() const ...@@ -66,7 +66,7 @@ Mat CameraParams::K() const
Mat_<double> k = Mat::eye(3, 3, CV_64F); Mat_<double> k = Mat::eye(3, 3, CV_64F);
k(0,0) = focal; k(0,2) = ppx; k(0,0) = focal; k(0,2) = ppx;
k(1,1) = focal * aspect; k(1,2) = ppy; k(1,1) = focal * aspect; k(1,2) = ppy;
return k; return std::move(k);
} }
} // namespace detail } // namespace detail
......
...@@ -52,12 +52,12 @@ CV_EXPORTS_W Mat readOpticalFlow( const String& path ) ...@@ -52,12 +52,12 @@ CV_EXPORTS_W Mat readOpticalFlow( const String& path )
Mat_<Point2f> flow; Mat_<Point2f> flow;
std::ifstream file(path.c_str(), std::ios_base::binary); std::ifstream file(path.c_str(), std::ios_base::binary);
if ( !file.good() ) if ( !file.good() )
return flow; // no file - return empty matrix return std::move(flow); // no file - return empty matrix
float tag; float tag;
file.read((char*) &tag, sizeof(float)); file.read((char*) &tag, sizeof(float));
if ( tag != FLOW_TAG_FLOAT ) if ( tag != FLOW_TAG_FLOAT )
return flow; return std::move(flow);
int width, height; int width, height;
...@@ -76,14 +76,14 @@ CV_EXPORTS_W Mat readOpticalFlow( const String& path ) ...@@ -76,14 +76,14 @@ CV_EXPORTS_W Mat readOpticalFlow( const String& path )
if ( !file.good() ) if ( !file.good() )
{ {
flow.release(); flow.release();
return flow; return std::move(flow);
} }
flow(i, j) = u; flow(i, j) = u;
} }
} }
file.close(); file.close();
return flow; return std::move(flow);
} }
CV_EXPORTS_W bool writeOpticalFlow( const String& path, InputArray flow ) CV_EXPORTS_W bool writeOpticalFlow( const String& path, InputArray flow )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment