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

Side by Side Diff: base/i18n/break_iterator.cc

Issue 368133002: Fixes for re-enabling more MSVC level 4 warnings: base/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build, attempt 2 Created 6 years, 5 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
« no previous file with comments | « base/debug/trace_event_win_unittest.cc ('k') | base/metrics/stats_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/i18n/break_iterator.h" 5 #include "base/i18n/break_iterator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/icu/source/common/unicode/ubrk.h" 8 #include "third_party/icu/source/common/unicode/ubrk.h"
9 #include "third_party/icu/source/common/unicode/uchar.h" 9 #include "third_party/icu/source/common/unicode/uchar.h"
10 #include "third_party/icu/source/common/unicode/ustring.h" 10 #include "third_party/icu/source/common/unicode/ustring.h"
11 11
12 namespace base { 12 namespace base {
13 namespace i18n { 13 namespace i18n {
14 14
15 const size_t npos = -1; 15 const size_t npos = static_cast<size_t>(-1);
16 16
17 BreakIterator::BreakIterator(const string16& str, BreakType break_type) 17 BreakIterator::BreakIterator(const string16& str, BreakType break_type)
18 : iter_(NULL), 18 : iter_(NULL),
19 string_(str), 19 string_(str),
20 break_type_(break_type), 20 break_type_(break_type),
21 prev_(npos), 21 prev_(npos),
22 pos_(0) { 22 pos_(0) {
23 } 23 }
24 24
25 BreakIterator::BreakIterator(const string16& str, const string16& rules) 25 BreakIterator::BreakIterator(const string16& str, const string16& rules)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return (!!boundary && next_status != UBRK_WORD_NONE); 163 return (!!boundary && next_status != UBRK_WORD_NONE);
164 } 164 }
165 165
166 string16 BreakIterator::GetString() const { 166 string16 BreakIterator::GetString() const {
167 DCHECK(prev_ != npos && pos_ != npos); 167 DCHECK(prev_ != npos && pos_ != npos);
168 return string_.substr(prev_, pos_ - prev_); 168 return string_.substr(prev_, pos_ - prev_);
169 } 169 }
170 170
171 } // namespace i18n 171 } // namespace i18n
172 } // namespace base 172 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/trace_event_win_unittest.cc ('k') | base/metrics/stats_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698