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:
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user