mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Updated EEPROM storage class
To avoid having a .cpp just for an extern variable definition, `static` has been chosen over `extern`. As the `EEPROMClass` class simply wraps functionality located elsewhere, it is completely compiled away. Even though each translation unit which includes the header will get a copy with internal linkage, there is no associated overhead. More info [here](http://stackoverflow.com/questions/29098518/extern-variable-only-in-header-unexpectedly-working-why)
This commit is contained in:
parent
80f01fbab1
commit
d6637e7f08
@ -154,5 +154,5 @@ struct EEPROMClass{
|
||||
}
|
||||
};
|
||||
|
||||
extern EEPROMClass EEPROM;
|
||||
static EEPROMClass EEPROM;
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user