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

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

* Use direct member initialization instead of ctr initialisation

This removes a bit of code repetition.

* Add symbolic names for member initializers
This commit is contained in:
Dirk Mueller
2020-10-05 22:56:08 +02:00
committed by GitHub
parent 8b8639e833
commit 4aeb0f5cca
12 changed files with 58 additions and 131 deletions

View File

@ -35,17 +35,11 @@ extern "C" uint32_t _EEPROM_start;
EEPROMClass::EEPROMClass(uint32_t sector)
: _sector(sector)
, _data(0)
, _size(0)
, _dirty(false)
{
}
EEPROMClass::EEPROMClass(void)
: _sector((((uint32_t)&_EEPROM_start - 0x40200000) / SPI_FLASH_SEC_SIZE))
, _data(0)
, _size(0)
, _dirty(false)
{
}