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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/path.cc

Issue 13106002: [NaCl SDK] A bunch of spelling fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix presubmit Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #include "nacl_io/path.h" 5 #include "nacl_io/path.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 size_t next = 0; 173 size_t next = 0;
174 174
175 if (path[0] == '/') { 175 if (path[0] == '/') {
176 offs = 1; 176 offs = 1;
177 components.push_back("/"); 177 components.push_back("/");
178 } 178 }
179 179
180 while (next != std::string::npos) { 180 while (next != std::string::npos) {
181 next = path.find('/', offs); 181 next = path.find('/', offs);
182 182
183 // Remove extra seperators 183 // Remove extra separators
184 if (next == offs) { 184 if (next == offs) {
185 ++offs; 185 ++offs;
186 continue; 186 continue;
187 } 187 }
188 188
189 std::string part = path.substr(offs, next - offs); 189 std::string part = path.substr(offs, next - offs);
190 if (!part.empty()) components.push_back(part); 190 if (!part.empty()) components.push_back(part);
191 offs = next + 1; 191 offs = next + 1;
192 } 192 }
193 return components; 193 return components;
194 } 194 }
195 195
196 Path& Path::operator =(const Path& p) { 196 Path& Path::operator =(const Path& p) {
197 paths_ = p.paths_; 197 paths_ = p.paths_;
198 return *this; 198 return *this;
199 } 199 }
200 200
201 Path& Path::operator =(const std::string& p) { 201 Path& Path::operator =(const std::string& p) {
202 return Set(p); 202 return Set(p);
203 } 203 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/path.h ('k') | native_client_sdk/src/libraries/nacl_io_test/kernel_object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698