Skip to content

Commit a74f83f

Browse files
committed
fix
1 parent e6242dd commit a74f83f

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/libYARP_sig/src/yarp/sig/LayeredImage.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,33 @@ class YARP_sig_API yarp::sig::ImageLayer
2525
public:
2626
yarp::sig::FlexImage layer;
2727
bool enable=true;
28-
struct colorkey_s
28+
class colorkey_s
2929
{
30-
bool enable = true;
31-
int value=0;
30+
public:
31+
bool enable;
32+
int value;
3233

3334
//default constructor
34-
colorkey_s() = default;
35-
} colorkey;
35+
colorkey_s() : enable(true), value(0) {}
36+
};
37+
colorkey_s colorkey;
3638

37-
struct alpha_s
39+
class alpha_s
3840
{
39-
bool enable = true;
40-
float value=1.0;
41+
public:
42+
bool enable;
43+
float value;
4144

42-
//default constructor
43-
alpha_s() = default;
44-
} alpha;
45+
// default constructor
46+
alpha_s() : enable(true), value(1.0) {}
47+
};
48+
alpha_s alpha;
4549

4650
bool can_be_compressed = true;
4751
int offset_x=0;
4852
int offset_y=0;
4953

50-
ImageLayer(const yarp::sig::FlexImage& img, bool ena = true, colorkey_s ckey = colorkey_s {}, alpha_s alph = alpha_s {}, bool compress=true, int off_x = 0, int off_y = 0)
54+
ImageLayer(const yarp::sig::FlexImage& img, bool ena = true, colorkey_s ckey = colorkey_s(), alpha_s alph = alpha_s(), bool compress = true, int off_x = 0, int off_y = 0)
5155
{
5256
layer = img;
5357
enable = ena;

0 commit comments

Comments
 (0)