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

Unified Diff: base/i18n/char_iterator.cc

Issue 6355005: base/i18n: Add namespace i18n to CharIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittests Created 9 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 side-by-side diff with in-line comments
Download patch
Index: base/i18n/char_iterator.cc
diff --git a/base/i18n/char_iterator.cc b/base/i18n/char_iterator.cc
index a6cf9441f028d2c5de210cf0ad64b41469dfc7cd..e8ef9ae3ed3f5bd55270998864f50fab6df09409 100644
--- a/base/i18n/char_iterator.cc
+++ b/base/i18n/char_iterator.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,6 +8,9 @@
#include "unicode/utf16.h"
namespace base {
+namespace i18n {
+
+// UTF8CharIterator -----------------------------------------------------------
brettw 2011/01/18 18:36:10 I probably wouldn't bother adding these lines in t
tfarina 2011/01/18 18:42:04 Removed.
UTF8CharIterator::UTF8CharIterator(const std::string* str)
: str_(reinterpret_cast<const uint8_t*>(str->data())),
@@ -20,6 +23,9 @@ UTF8CharIterator::UTF8CharIterator(const std::string* str)
U8_NEXT(str_, next_pos_, len_, char_);
}
+UTF8CharIterator::~UTF8CharIterator() {
+}
+
bool UTF8CharIterator::Advance() {
if (array_pos_ >= len_)
return false;
@@ -32,6 +38,8 @@ bool UTF8CharIterator::Advance() {
return true;
}
+// UTF16CharIterator ----------------------------------------------------------
+
UTF16CharIterator::UTF16CharIterator(const string16* str)
: str_(reinterpret_cast<const char16*>(str->data())),
len_(str->size()),
@@ -54,6 +62,9 @@ UTF16CharIterator::UTF16CharIterator(const char16* str, size_t str_len)
ReadChar();
}
+UTF16CharIterator::~UTF16CharIterator() {
+}
+
bool UTF16CharIterator::Advance() {
if (array_pos_ >= len_)
return false;
@@ -71,4 +82,5 @@ void UTF16CharIterator::ReadChar() {
U16_NEXT(str_, next_pos_, len_, char_);
}
+} // namespace i18n
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698