Merge pull request #40 from ramapcsx2/various

various: forward declaration for "T" type used in EEPROM functions
This commit is contained in:
sanni 2019-09-02 20:17:20 +02:00 committed by GitHub
commit 80e5a2ad81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,6 +90,10 @@ char ver[5] = "3.5";
// AVR Eeprom
#include <EEPROM.h>
// forward declarations for "T" (for non Arduino IDE)
template <class T> int EEPROM_writeAnything(int ee, const T& value);
template <class T> int EEPROM_readAnything(int ee, T& value);
template <class T> int EEPROM_writeAnything(int ee, const T& value)
{
const byte* p = (const byte*)(const void*)&value;