Skip to content

Commit feaddfa

Browse files
committed
warning cleanup: reorder constructor initialization list
Constructors should initialize members in the order they are declared in the class definition. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
1 parent 41aa393 commit feaddfa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/Camera/src/camera.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ uint8_t *FrameBuffer::getBuffer() {
4343
return NULL;
4444
}
4545

46-
Camera::Camera() : vdev(NULL), byte_swap(false), yuv_to_gray(false) {
46+
Camera::Camera() : byte_swap(false), yuv_to_gray(false), vdev(NULL) {
4747
for (size_t i = 0; i < ARRAY_SIZE(this->vbuf); i++) {
4848
this->vbuf[i] = NULL;
4949
}

libraries/Wire/Wire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static struct i2c_target_callbacks target_callbacks = {
4848
.stop = i2c_target_stop_cb,
4949
};
5050

51-
arduino::ZephyrI2C::ZephyrI2C(const struct device *i2c) : i2c_dev(i2c), i2c_cfg({0}) {
51+
arduino::ZephyrI2C::ZephyrI2C(const struct device *i2c) : i2c_cfg({0}), i2c_dev(i2c) {
5252
ring_buf_init(&txRingBuffer.rb, sizeof(txRingBuffer.buffer), txRingBuffer.buffer);
5353
ring_buf_init(&rxRingBuffer.rb, sizeof(rxRingBuffer.buffer), rxRingBuffer.buffer);
5454
}

0 commit comments

Comments
 (0)