1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Use direct member initialization instead of ctr initialisation (#7556)

This removes a bit of code repetition.
This commit is contained in:
Dirk Mueller
2020-08-28 16:23:05 +02:00
committed by GitHub
parent c366f84520
commit 59873908c4
4 changed files with 25 additions and 38 deletions

View File

@ -30,12 +30,12 @@ extern "C" uint32_t _FS_start;
extern "C" uint32_t _FS_end;
ESP8266HTTPUpdate::ESP8266HTTPUpdate(void)
: _httpClientTimeout(8000), _followRedirects(HTTPC_DISABLE_FOLLOW_REDIRECTS), _ledPin(-1)
: _httpClientTimeout(8000)
{
}
ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpClientTimeout)
: _httpClientTimeout(httpClientTimeout), _followRedirects(HTTPC_DISABLE_FOLLOW_REDIRECTS), _ledPin(-1)
: _httpClientTimeout(httpClientTimeout)
{
}

View File

@ -184,7 +184,7 @@ protected:
private:
int _httpClientTimeout;
followRedirects_t _followRedirects;
followRedirects_t _followRedirects = HTTPC_DISABLE_FOLLOW_REDIRECTS;
// Callbacks
HTTPUpdateStartCB _cbStart;
@ -192,7 +192,7 @@ private:
HTTPUpdateErrorCB _cbError;
HTTPUpdateProgressCB _cbProgress;
int _ledPin;
int _ledPin = -1;
uint8_t _ledOn;
};