diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-20 16:01:00 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-20 16:01:00 +0000 |
commit | f0b12af5323cc2d7495e281d2b98ad9be91a422f (patch) | |
tree | 176f175901a581567dff3c52ce27d0c93442e8e5 /base/i18n/break_iterator.cc | |
parent | 7a643ef7f112c935958cbbc112eb41d3ac353341 (diff) | |
download | chromium_src-f0b12af5323cc2d7495e281d2b98ad9be91a422f.zip chromium_src-f0b12af5323cc2d7495e281d2b98ad9be91a422f.tar.gz chromium_src-f0b12af5323cc2d7495e281d2b98ad9be91a422f.tar.bz2 |
Fix build with -Duse_system_icu=1 and libicu-4.4.*
UBreakIterator is a struct in newer versions of libicu; must explicitly
cast iter_, which is defined as a void*. Failing to do so causes gcc to complain about implicitly converting from a void*.
Contributed by Mike Gilbert <floppymaster@gmail.com>. Original review: http://codereview.chromium.org/6047001
BUG=None
TEST=Build with -Duse_system_icu=1
Review URL: http://codereview.chromium.org/6015003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69713 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/i18n/break_iterator.cc')
-rw-r--r-- | base/i18n/break_iterator.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/i18n/break_iterator.cc b/base/i18n/break_iterator.cc index f0f5240..acf37cd9 100644 --- a/base/i18n/break_iterator.cc +++ b/base/i18n/break_iterator.cc @@ -23,7 +23,7 @@ BreakIterator::BreakIterator(const string16* str, BreakType break_type) BreakIterator::~BreakIterator() { if (iter_) - ubrk_close(iter_); + ubrk_close(static_cast<UBreakIterator*>(iter_)); } bool BreakIterator::Init() { @@ -47,13 +47,14 @@ bool BreakIterator::Init() { NOTREACHED() << "ubrk_open failed"; return false; } - ubrk_first(iter_); // Move the iterator to the beginning of the string. + // Move the iterator to the beginning of the string. + ubrk_first(static_cast<UBreakIterator*>(iter_)); return true; } bool BreakIterator::Advance() { prev_ = pos_; - const int32_t pos = ubrk_next(iter_); + const int32_t pos = ubrk_next(static_cast<UBreakIterator*>(iter_)); if (pos == UBRK_DONE) { pos_ = npos; return false; @@ -65,7 +66,8 @@ bool BreakIterator::Advance() { bool BreakIterator::IsWord() const { return (break_type_ == BREAK_WORD && - ubrk_getRuleStatus(iter_) != UBRK_WORD_NONE); + ubrk_getRuleStatus(static_cast<UBreakIterator*>(iter_)) != + UBRK_WORD_NONE); } string16 BreakIterator::GetString() const { |