浏览代码

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

main
PaulStoffregen 9 年前
父节点
当前提交
69faa42dae
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. +2
    -2
      teensy3/WString.cpp
  2. +2
    -2
      teensy3/WString.h

+ 2
- 2
teensy3/WString.cpp 查看文件

@@ -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 查看文件

@@ -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

正在加载...
取消
保存