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

Side by Side Diff: Source/platform/exported/WebString.cpp

Issue 141273002: Code problems detected by cppcheck (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 return String(data, length); 115 return String(data, length);
116 } 116 }
117 117
118 bool WebString::equals(const WebString& s) const 118 bool WebString::equals(const WebString& s) const
119 { 119 {
120 return equal(m_private.get(), s.m_private.get()); 120 return equal(m_private.get(), s.m_private.get());
121 } 121 }
122 122
123 WebString::WebString(const WTF::String& s) 123 WebString::WebString(const WTF::String& s)
124 : m_private(s.impl())
124 { 125 {
125 m_private = s.impl();
126 } 126 }
127 127
128 WebString& WebString::operator=(const WTF::String& s) 128 WebString& WebString::operator=(const WTF::String& s)
129 { 129 {
130 assign(s.impl()); 130 assign(s.impl());
131 return *this; 131 return *this;
132 } 132 }
133 133
134 WebString::operator WTF::String() const 134 WebString::operator WTF::String() const
135 { 135 {
(...skipping 15 matching lines...) Expand all
151 { 151 {
152 return WTF::AtomicString(m_private.get()); 152 return WTF::AtomicString(m_private.get());
153 } 153 }
154 154
155 void WebString::assign(WTF::StringImpl* p) 155 void WebString::assign(WTF::StringImpl* p)
156 { 156 {
157 m_private = p; 157 m_private = p;
158 } 158 }
159 159
160 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/exported/WebHTTPLoadInfo.cpp ('k') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698