diff options
author | Chris--A <chris@genx.biz> | 2015-03-18 18:56:08 +1000 |
---|---|---|
committer | Chris--A <chris@genx.biz> | 2015-03-18 18:56:08 +1000 |
commit | c9ec4eabdab373c756a624f42660acaf0ec6812d (patch) | |
tree | 412625e5164a03e2a89d18f7c64edee7bccb5512 /libraries/EEPROM | |
parent | dd1ec9920b8fd6b445cdcc943f53333990b34428 (diff) |
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)
Diffstat (limited to 'libraries/EEPROM')
-rw-r--r-- | libraries/EEPROM/EEPROM.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/EEPROM/EEPROM.h b/libraries/EEPROM/EEPROM.h index 1b528f7..ae2645e 100644 --- a/libraries/EEPROM/EEPROM.h +++ b/libraries/EEPROM/EEPROM.h @@ -154,5 +154,5 @@ struct EEPROMClass{ } }; -extern EEPROMClass EEPROM; +static EEPROMClass EEPROM; #endif
\ No newline at end of file |