Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp

Issue 2897603003: Get and return String by const-ref if used as rvalue (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp
index 3ee233593707304de1a1511dcd798c84ff548f0b..c62859279d720e37d4dd1d5c37d06fff1c39547b 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.cpp
@@ -36,18 +36,18 @@ BooleanOrString BooleanOrString::fromBoolean(bool value) {
return container;
}
-String BooleanOrString::getAsString() const {
+const String& BooleanOrString::getAsString() const {
DCHECK(isString());
return m_string;
}
-void BooleanOrString::setString(String value) {
+void BooleanOrString::setString(const String& value) {
DCHECK(isNull());
m_string = value;
m_type = SpecificTypeString;
}
-BooleanOrString BooleanOrString::fromString(String value) {
+BooleanOrString BooleanOrString::fromString(const String& value) {
BooleanOrString container;
container.setString(value);
return container;
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698