Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove guards as we already require C++11#213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aentinger merged 1 commit intoarduino:masterfromjboynes:clang_tidy
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletionsapi/String.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,6 @@ String::String(const __FlashStringHelper *pstr)
*this = pstr;
}

#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String::String(String &&rval)
: buffer(rval.buffer)
, capacity(rval.capacity)
Expand All@@ -73,7 +72,6 @@ String::String(String &&rval)
rval.capacity = 0;
rval.len = 0;
}
#endif

String::String(char c)
{
Expand DownExpand Up@@ -213,7 +211,6 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
return *this;
}

#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
void String::move(String &rhs)
{
if (this != &rhs)
Expand All@@ -229,7 +226,6 @@ void String::move(String &rhs)
rhs.capacity = 0;
}
}
#endif

String & String::operator = (const String &rhs)
{
Expand All@@ -241,13 +237,11 @@ String & String::operator = (const String &rhs)
return *this;
}

#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & String::operator = (String &&rval)
{
move(rval);
return *this;
}
#endif

String & String::operator = (const char *cstr)
{
Expand Down
6 changes: 0 additions & 6 deletionsapi/String.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,9 +72,7 @@ class String
String(const uint8_t *cstr, unsigned int length) : String((const char*)cstr, length) {}
String(const String &str);
String(const __FlashStringHelper *str);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String(String &&rval);
#endif
explicit String(char c);
explicit String(unsigned char, unsigned char base=10);
explicit String(int, unsigned char base=10);
Expand All@@ -98,9 +96,7 @@ class String
String & operator = (const String &rhs);
String & operator = (const char *cstr);
String & operator = (const __FlashStringHelper *str);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & operator = (String &&rval);
#endif

// concatenate (works w/ built-in types)

Expand DownExpand Up@@ -231,9 +227,7 @@ class String
// copy and move
String & copy(const char *cstr, unsigned int length);
String & copy(const __FlashStringHelper *pstr, unsigned int length);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
void move(String &rhs);
#endif
};

class StringSumHelper : public String
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp