Add lots of value constructors.

This commit is contained in:
Jared Boone
2016-11-26 16:50:44 -08:00
parent cd31ae86d7
commit 4eb0facacb
54 changed files with 194 additions and 217 deletions

View File

@@ -62,7 +62,7 @@ public:
}
private:
std::bitset<1408> data;
std::bitset<1408> data { };
Timestamp timestamp_ { };
size_t count { 0 };
};

View File

@@ -68,9 +68,9 @@ public:
private:
CaptureConfig* const config;
FIFO<StreamBuffer*>* fifo_buffers_for_baseband;
FIFO<StreamBuffer*>* fifo_buffers_for_application;
Thread* thread;
FIFO<StreamBuffer*>* fifo_buffers_for_baseband { nullptr };
FIFO<StreamBuffer*>* fifo_buffers_for_application { nullptr };
Thread* thread { nullptr };
static BufferExchange* obj;
void check_fifo_isr() {

View File

@@ -80,7 +80,7 @@ public:
private:
FIFO<uint8_t> fifo;
Mutex mutex_write;
Mutex mutex_write { };
Message* peek(std::array<uint8_t, Message::MAX_SIZE>& buf) {
Message* const p = reinterpret_cast<Message*>(buf.data());

View File

@@ -44,10 +44,10 @@ private:
static constexpr int width { 240 };
static constexpr int height { 320 };
File file;
File file { };
int scanline_count { 0 };
CRC<32, true, true> crc { 0x04c11db7, 0xffffffff, 0xffffffff };
Adler32 adler_32;
Adler32 adler_32 { };
void write_chunk_header(const size_t length, const std::array<uint8_t, 4>& type);
void write_chunk_content(const void* const p, const size_t count);

View File

@@ -46,7 +46,7 @@ public:
}
private:
FocusManager focus_manager_;
FocusManager focus_manager_ { };
};
class Widget {
@@ -161,7 +161,7 @@ public:
virtual std::string title() const;
protected:
std::vector<Widget*> children_;
std::vector<Widget*> children_ { };
void invalidate_child(Widget* const widget);
};
@@ -198,7 +198,7 @@ private:
class Button : public Widget {
public:
std::function<void(Button&)> on_select;
std::function<void(Button&)> on_select { };
Button(Rect parent_rect, std::string text);
@@ -243,7 +243,7 @@ private:
class ImageButton : public Image {
public:
std::function<void(ImageButton&)> on_select;
std::function<void(ImageButton&)> on_select { };
ImageButton(
const Rect parent_rect,
@@ -263,8 +263,8 @@ public:
using option_t = std::pair<name_t, value_t>;
using options_t = std::vector<option_t>;
std::function<void(size_t, value_t)> on_change;
std::function<void(void)> on_show_options;
std::function<void(size_t, value_t)> on_change { };
std::function<void(void)> on_show_options { };
OptionsField(Point parent_pos, size_t length, options_t options);
@@ -287,7 +287,7 @@ private:
class NumberField : public Widget {
public:
std::function<void(int32_t)> on_change;
std::function<void(int32_t)> on_change { };
using range_t = std::pair<int32_t, int32_t>;
@@ -309,7 +309,7 @@ private:
const int32_t step;
const size_t length_;
const char fill_char;
int32_t value_;
int32_t value_ { 0 };
int32_t clip_value(int32_t value);
};