From c9ec4eabdab373c756a624f42660acaf0ec6812d Mon Sep 17 00:00:00 2001 From: Chris--A Date: Wed, 18 Mar 2015 18:56:08 +1000 Subject: 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) --- libraries/EEPROM/EEPROM.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries/EEPROM') 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 -- cgit v1.2.3-18-g5258