diff --git a/src/common/sy_common.h b/src/common/sy_common.h index 7c00157..60a3d2e 100644 --- a/src/common/sy_common.h +++ b/src/common/sy_common.h @@ -49,8 +49,8 @@ enum sy_format { #define __SY_POINT__ typedef struct sy_point { - int x_; - int y_; + int x_{0}; + int y_{0}; sy_point(int m_x, int m_y) :x_(m_x), y_(m_y) {}; sy_point() {}; } sy_point; @@ -62,10 +62,10 @@ typedef struct sy_point #define __SY_RECT__ typedef struct sy_rect { - int left_; - int top_; - int width_; - int height_; + int left_{0}; + int top_{0}; + int width_{0}; + int height_{0}; sy_rect(int m_left, int m_top, int m_width, int m_height) :left_(m_left), top_(m_top), width_(m_width), height_(m_height) {}; sy_rect() {}; } sy_rect; @@ -77,10 +77,10 @@ typedef struct sy_rect #define __SY_IMG__ typedef struct sy_img { - unsigned char * data_; - int w_; - int h_; - int c_; + unsigned char * data_{nullptr}; + int w_{0}; + int h_{0}; + int c_{0}; void set_data(int m_w, int m_h, int m_c, unsigned char * m_data) { w_ = m_w;