Sfoglia il codice sorgente

Compile for either C++11 or C++0x

main
PaulStoffregen 9 anni fa
parent
commit
69faa42dae
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +2
    -2
      teensy3/WString.cpp
  2. +2
    -2
      teensy3/WString.h

+ 2
- 2
teensy3/WString.cpp Vedi File

@@ -44,7 +44,7 @@ String::String(const String &value)
*this = value;
}

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String::String(String &&rval)
{
init();
@@ -198,7 +198,7 @@ String & String::operator = (const String &rhs)
return copy(rhs.buffer, rhs.len);
}

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & String::operator = (String &&rval)
{
if (this != &rval) move(rval);

+ 2
- 2
teensy3/WString.h Vedi File

@@ -53,7 +53,7 @@ public:
String(const char *cstr = (const char *)NULL);
String(const __FlashStringHelper *pgmstr);
String(const String &str);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String(String &&rval);
String(StringSumHelper &&rval);
#endif
@@ -78,7 +78,7 @@ public:
String & operator = (const String &rhs);
String & operator = (const char *cstr);
String & operator = (const __FlashStringHelper *pgmstr);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & operator = (String &&rval);
String & operator = (StringSumHelper &&rval);
#endif

Loading…
Annulla
Salva