From 9faa2a7fd01fc8856dbedb4f133757e8aea194ec Mon Sep 17 00:00:00 2001 From: MYLS Date: Sun, 19 Jun 2016 02:44:39 +0800 Subject: [PATCH] solve warning for IOS Two test are still needed: 1. Verify the Base64 data. 2. Read an old YML file for compatibility test. --- modules/core/src/persistence.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 278ac6f0c9..ad8f9eaab1 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -298,7 +298,6 @@ namespace base64 bool flush(); private: static const size_t BUFFER_LEN = 120U; - uchar * dst_beg; uchar * dst_cur; uchar * dst_end; std::vector base64_buffer; @@ -6329,8 +6328,7 @@ bool base64::read_base64_header(std::string const & header, int & byte_size, std ***************************************************************************/ base64::Base64ContextParser::Base64ContextParser(uchar * buffer, size_t size) - : dst_beg(buffer) - , dst_cur(buffer) + : dst_cur(buffer) , dst_end(buffer + size) , base64_buffer(BUFFER_LEN) , src_beg(0) @@ -6840,7 +6838,7 @@ private: { size_t cnt = 0; char type = '\0'; - int offset = 0; + size_t offset = 0; std::istringstream iss(dt); while (!iss.eof()) { @@ -6888,7 +6886,7 @@ private: offset = static_cast(cvAlign(static_cast(offset), static_cast(size))); pack.offset = offset; - offset += static_cast(size); + offset += size; /* set type */ switch (type)