mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-15 20:37:07 +08:00
Merge pull request #4010 from Kumataro:fixC4009
fix build warnings for GCC 15
This commit is contained in:
@@ -1891,6 +1891,7 @@ public:
|
|||||||
N(_Num),
|
N(_Num),
|
||||||
members(_members),
|
members(_members),
|
||||||
postprocessfn(NULL),
|
postprocessfn(NULL),
|
||||||
|
distfn(NULL),
|
||||||
V(NULL)
|
V(NULL)
|
||||||
{
|
{
|
||||||
switch (method) {
|
switch (method) {
|
||||||
|
@@ -208,7 +208,7 @@ public:
|
|||||||
vector<int> spaces_start;
|
vector<int> spaces_start;
|
||||||
vector<int> spaces_end;
|
vector<int> spaces_end;
|
||||||
int space_count=0;
|
int space_count=0;
|
||||||
int last_one_idx;
|
int last_one_idx=0;
|
||||||
|
|
||||||
int s_init = 0, s_end=vector_w.cols;
|
int s_init = 0, s_end=vector_w.cols;
|
||||||
for (int s=0; s<vector_w.cols; s++)
|
for (int s=0; s<vector_w.cols; s++)
|
||||||
@@ -456,7 +456,7 @@ public:
|
|||||||
vector<int> spaces_start;
|
vector<int> spaces_start;
|
||||||
vector<int> spaces_end;
|
vector<int> spaces_end;
|
||||||
int space_count=0;
|
int space_count=0;
|
||||||
int last_one_idx;
|
int last_one_idx=0;
|
||||||
|
|
||||||
int s_init = 0, s_end=vector_w.cols;
|
int s_init = 0, s_end=vector_w.cols;
|
||||||
for (int s=0; s<vector_w.cols; s++)
|
for (int s=0; s<vector_w.cols; s++)
|
||||||
|
@@ -26,14 +26,18 @@ void ByteMatrix::init(int _width, int _height) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteMatrix::ByteMatrix(int dimension) { init(dimension, dimension); }
|
ByteMatrix::ByteMatrix(int dimension) : bytes(nullptr) { init(dimension, dimension); }
|
||||||
|
|
||||||
ByteMatrix::ByteMatrix(int _width, int _height) { init(_width, _height); }
|
ByteMatrix::ByteMatrix(int _width, int _height) : bytes(nullptr) { init(_width, _height); }
|
||||||
|
|
||||||
ByteMatrix::ByteMatrix(int _width, int _height, ArrayRef<char> source) {
|
ByteMatrix::ByteMatrix(int _width, int _height, ArrayRef<char> source) : bytes(nullptr) {
|
||||||
init(_width, _height);
|
init(_width, _height);
|
||||||
int size = _width * _height;
|
|
||||||
memcpy(&bytes[0], &source[0], size);
|
if( bytes != nullptr)
|
||||||
|
{
|
||||||
|
const size_t size = _width * _height;
|
||||||
|
memcpy(&bytes[0], &source[0], size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteMatrix::~ByteMatrix() {
|
ByteMatrix::~ByteMatrix() {
|
||||||
|
Reference in New Issue
Block a user