You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/EEPROM/src/EEPROM.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -85,15 +85,15 @@ class EEPROMClass {
85
85
//Functionality to 'get' and 'put' objects to and from EEPROM.
86
86
template< typename T > T &get( int id, T &t ){
87
87
static_assert(std::is_trivially_copyable<T>::value,"You can not use this type with EEPROM.get" ); // the code below only makes sense if you can "memcpy" T
88
-
_store.read(id, (uint8_t*)t, sizeof(T));
88
+
_store.read(id, (uint8_t*)&t, sizeof(T));
89
89
return t;
90
90
}
91
91
92
92
template< typename T > const T &put( int id, const T &t ){
93
93
static_assert(std::is_trivially_copyable<T>::value, "You can not use this type with EEPROM.put"); // the code below only makes sense if you can "memcpy" T
0 commit comments