Skip to content

Commit b066dd3

Browse files
committed
Fixed uninitialized class fields
1 parent d30a0c6 commit b066dd3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/dnn/src/darknet/darknet_io.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ namespace cv {
9999
std::map<int, std::map<std::string, std::string> > layers_cfg;
100100
std::map<std::string, std::string> net_cfg;
101101

102+
NetParameter() : width(0), height(0), channels(0) {}
103+
102104
int layer_size() const { return layers.size(); }
103105

104106
int input_size() const { return 1; }

modules/dnn/src/layers/eltwise_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class EltwiseLayerImpl : public EltwiseLayer
122122
int channels;
123123
size_t planeSize;
124124

125-
EltwiseInvoker() : srcs(0), nsrcs(0), dst(0), coeffs(0), op(EltwiseLayer::PROD), nstripes(0), activ(0) {}
125+
EltwiseInvoker() : srcs(0), nsrcs(0), dst(0), coeffs(0), op(EltwiseLayer::PROD), nstripes(0), activ(0), channels(0), planeSize(0) {}
126126

127127
static void run(const Mat** srcs, int nsrcs, Mat& dst,
128128
const std::vector<float>& coeffs, EltwiseOp op,

0 commit comments

Comments
 (0)