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

Side by Side Diff: Source/platform/text/TextBreakIteratorICU.cpp

Issue 47623002: Fix more warnings on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix RenderImage.cpp. Created 7 years, 1 month 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
« no previous file with comments | « Source/modules/websockets/NewWebSocketChannelImpl.cpp ('k') | Source/wtf/HashMapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Lars Knoll <lars@trolltech.com> 2 * Copyright (C) 2006 Lars Knoll <lars@trolltech.com>
3 * Copyright (C) 2007, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2011, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 static const size_t capacity = 4; 100 static const size_t capacity = 4;
101 101
102 typedef pair<AtomicString, icu::BreakIterator*> Entry; 102 typedef pair<AtomicString, icu::BreakIterator*> Entry;
103 typedef Vector<Entry, capacity> Pool; 103 typedef Vector<Entry, capacity> Pool;
104 Pool m_pool; 104 Pool m_pool;
105 HashMap<icu::BreakIterator*, AtomicString> m_vendedIterators; 105 HashMap<icu::BreakIterator*, AtomicString> m_vendedIterators;
106 106
107 friend WTF::ThreadSpecific<LineBreakIteratorPool>::operator LineBreakIterato rPool*(); 107 friend WTF::ThreadSpecific<LineBreakIteratorPool>::operator LineBreakIterato rPool*();
108 }; 108 };
109 109
110 static TextBreakIterator* ensureIterator(bool& createdIterator, TextBreakIterato r*& iterator, UBreakIteratorType type)
111 {
112 if (!createdIterator) {
113 UErrorCode openStatus = U_ZERO_ERROR;
114 iterator = reinterpret_cast<TextBreakIterator*>(ubrk_open(type, currentT extBreakLocaleID(), 0, 0, &openStatus));
115 createdIterator = true;
116 ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break i terator: %s (%d)", u_errorName(openStatus), openStatus);
117 }
118 return iterator;
119 }
120
121 enum TextContext { NoContext, PriorContext, PrimaryContext }; 110 enum TextContext { NoContext, PriorContext, PrimaryContext };
122 111
123 const int textBufferCapacity = 16; 112 const int textBufferCapacity = 16;
124 113
125 typedef struct { 114 typedef struct {
126 UText text; 115 UText text;
127 UChar buffer[textBufferCapacity]; 116 UChar buffer[textBufferCapacity];
128 } UTextWithBuffer; 117 } UTextWithBuffer;
129 118
130 static inline int64_t textPinIndex(int64_t& index, int64_t limit) 119 static inline int64_t textPinIndex(int64_t& index, int64_t limit)
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 "$Tel1 $TelV $Tel0;" // Telugu Virama (backward) 842 "$Tel1 $TelV $Tel0;" // Telugu Virama (backward)
854 "$Kan1 $KanV $Kan0;" // Kannada Virama (backward) 843 "$Kan1 $KanV $Kan0;" // Kannada Virama (backward)
855 "$Mal1 $MalV $Mal0;" // Malayalam Virama (backward) 844 "$Mal1 $MalV $Mal0;" // Malayalam Virama (backward)
856 "!!safe_reverse;" 845 "!!safe_reverse;"
857 "!!safe_forward;"; 846 "!!safe_forward;";
858 847
859 return setUpIteratorWithRules(kRules, string, length); 848 return setUpIteratorWithRules(kRules, string, length);
860 } 849 }
861 850
862 } 851 }
OLDNEW
« no previous file with comments | « Source/modules/websockets/NewWebSocketChannelImpl.cpp ('k') | Source/wtf/HashMapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698