1
0
Fork 0

Inititialize members in class declaration

Also added initializers for previously unintialized members.
This commit is contained in:
Jonathan Vander Mey 2021-06-12 19:04:13 -04:00 committed by JF002
parent d13b0a7ec5
commit 8031cd1b40
2 changed files with 12 additions and 22 deletions

View file

@ -111,16 +111,6 @@ Pinetime::Controllers::MusicService::MusicService(Pinetime::System::SystemTask&
serviceDefinition[0] = {
.type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = &msUuid.u, .characteristics = characteristicDefinition};
serviceDefinition[1] = {0};
artistName = "Waiting for";
albumName = "";
trackName = "track information..";
playing = false;
repeat = false;
shuffle = false;
playbackSpeed = 1.0f;
trackProgress = 0;
trackLength = 0;
}
void Pinetime::Controllers::MusicService::Init() {

View file

@ -69,23 +69,23 @@ namespace Pinetime {
struct ble_gatt_chr_def characteristicDefinition[14];
struct ble_gatt_svc_def serviceDefinition[2];
uint16_t eventHandle;
uint16_t eventHandle {};
std::string artistName;
std::string albumName;
std::string trackName;
std::string artistName {"Waiting for"};
std::string albumName {};
std::string trackName {"track information.."};
bool playing;
bool playing {false};
int trackProgress;
int trackLength;
int trackNumber;
int tracksTotal;
int trackProgress {0};
int trackLength {0};
int trackNumber {};
int tracksTotal {};
float playbackSpeed;
float playbackSpeed {1.0f};
bool repeat;
bool shuffle;
bool repeat {false};
bool shuffle {false};
Pinetime::System::SystemTask& m_system;
};