Skip to content

Commit c9ec4ea

Browse files
committed
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)
1 parent dd1ec99 commit c9ec4ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/EEPROM/EEPROM.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@ struct EEPROMClass{
154154
}
155155
};
156156

157-
extern EEPROMClass EEPROM;
157+
static EEPROMClass EEPROM;
158158
#endif

0 commit comments

Comments
 (0)