diff options
author | Karl Berry <karl@freefriends.org> | 2023-12-22 17:28:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-12-22 17:28:50 +0000 |
commit | baf6f642710d586bcf020e81f271f0808697abac (patch) | |
tree | a412709af5c91febc1dce56bdf0ecdf15f05e7bb /Build/source/libs/icu/icu-src/source/layoutex | |
parent | 3f20a8c6c01165eb0d3400db3d8f0827b1c0deaf (diff) |
icu 74.2
git-svn-id: svn://tug.org/texlive/trunk@69195 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/layoutex')
6 files changed, 141 insertions, 141 deletions
diff --git a/Build/source/libs/icu/icu-src/source/layoutex/ParagraphLayout.cpp b/Build/source/libs/icu/icu-src/source/layoutex/ParagraphLayout.cpp index 11257506699..1788b68e1d0 100644 --- a/Build/source/libs/icu/icu-src/source/layoutex/ParagraphLayout.cpp +++ b/Build/source/libs/icu/icu-src/source/layoutex/ParagraphLayout.cpp @@ -53,7 +53,7 @@ private: }; StyleRuns::StyleRuns(const RunArray *styleRunArrays[], le_int32 styleCount) - : fStyleCount(styleCount), fRunCount(0), fRunLimits(NULL), fStyleIndices(NULL) + : fStyleCount(styleCount), fRunCount(0), fRunLimits(nullptr), fStyleIndices(nullptr) { le_int32 maxRunCount = 0; le_int32 style, run, runStyle; @@ -112,19 +112,19 @@ StyleRuns::~StyleRuns() fRunCount = 0; LE_DELETE_ARRAY(fStyleIndices); - fStyleIndices = NULL; + fStyleIndices = nullptr; LE_DELETE_ARRAY(fRunLimits); - fRunLimits = NULL; + fRunLimits = nullptr; } le_int32 StyleRuns::getRuns(le_int32 runLimits[], le_int32 styleIndices[]) { - if (runLimits != NULL) { + if (runLimits != nullptr) { LE_ARRAY_COPY(runLimits, fRunLimits, fRunCount); } - if (styleIndices != NULL) { + if (styleIndices != nullptr) { LE_ARRAY_COPY(styleIndices, fStyleIndices, fRunCount * fStyleCount); } @@ -318,14 +318,14 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, UBiDiLevel paragraphLevel, le_bool vertical, LEErrorCode &status) : fChars(chars), fCharCount(count), - fFontRuns(NULL), fLevelRuns(levelRuns), fScriptRuns(scriptRuns), fLocaleRuns(localeRuns), - fVertical(vertical), fClientLevels(true), fClientScripts(true), fClientLocales(true), fEmbeddingLevels(NULL), + fFontRuns(nullptr), fLevelRuns(levelRuns), fScriptRuns(scriptRuns), fLocaleRuns(localeRuns), + fVertical(vertical), fClientLevels(true), fClientScripts(true), fClientLocales(true), fEmbeddingLevels(nullptr), fAscent(0), fDescent(0), fLeading(0), - fGlyphToCharMap(NULL), fCharToMinGlyphMap(NULL), fCharToMaxGlyphMap(NULL), fGlyphWidths(NULL), fGlyphCount(0), - fParaBidi(NULL), fLineBidi(NULL), - fStyleRunLimits(NULL), fStyleIndices(NULL), fStyleRunCount(0), - fBreakIterator(NULL), fLineStart(-1), fLineEnd(0), - /*fVisualRuns(NULL), fStyleRunInfo(NULL), fVisualRunCount(-1), + fGlyphToCharMap(nullptr), fCharToMinGlyphMap(nullptr), fCharToMaxGlyphMap(nullptr), fGlyphWidths(nullptr), fGlyphCount(0), + fParaBidi(nullptr), fLineBidi(nullptr), + fStyleRunLimits(nullptr), fStyleIndices(nullptr), fStyleRunCount(0), + fBreakIterator(nullptr), fLineStart(-1), fLineEnd(0), + /*fVisualRuns(nullptr), fStyleRunInfo(nullptr), fVisualRunCount(-1), fFirstVisualRun(-1), fLastVisualRun(-1),*/ fVisualRunLastX(0), fVisualRunLastY(0) { @@ -341,11 +341,11 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, computeLevels(paragraphLevel); - if (scriptRuns == NULL) { + if (scriptRuns == nullptr) { computeScripts(); } - if (localeRuns == NULL) { + if (localeRuns == nullptr) { computeLocales(); } @@ -363,11 +363,11 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, StyleRuns styleRuns(styleRunArrays, styleCount); LEErrorCode layoutStatus = LE_NO_ERROR; - fStyleRunCount = styleRuns.getRuns(NULL, NULL); + fStyleRunCount = styleRuns.getRuns(nullptr, nullptr); fStyleRunLimits = LE_NEW_ARRAY(le_int32, fStyleRunCount); fStyleIndices = LE_NEW_ARRAY(le_int32, fStyleRunCount * styleCount); - if ((fStyleRunLimits == NULL) || (fStyleIndices == NULL)) { + if ((fStyleRunLimits == nullptr) || (fStyleIndices == nullptr)) { status = LE_MEMORY_ALLOCATION_ERROR; return; } @@ -379,24 +379,24 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, le_int32 run, runStart; fStyleRunInfo = LE_NEW_ARRAY(StyleRunInfo, fStyleRunCount); - if (fStyleRunInfo == NULL) { + if (fStyleRunInfo == nullptr) { status = LE_MEMORY_ALLOCATION_ERROR; return; } else { // initialize for (run = 0; run < fStyleRunCount; run += 1) { - fStyleRunInfo[run].font = NULL; + fStyleRunInfo[run].font = nullptr; fStyleRunInfo[run].runBase = 0; fStyleRunInfo[run].runLimit = 0; fStyleRunInfo[run].script = (UScriptCode)0; - fStyleRunInfo[run].locale = NULL; + fStyleRunInfo[run].locale = nullptr; fStyleRunInfo[run].level = 0; fStyleRunInfo[run].glyphBase = 0; - fStyleRunInfo[run].engine = NULL; + fStyleRunInfo[run].engine = nullptr; fStyleRunInfo[run].glyphCount = 0; - fStyleRunInfo[run].glyphs = NULL; - fStyleRunInfo[run].positions = NULL; + fStyleRunInfo[run].glyphs = nullptr; + fStyleRunInfo[run].positions = nullptr; } } @@ -440,8 +440,8 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, fGlyphToCharMap = LE_NEW_ARRAY(le_int32, fGlyphCount + 1); fCharToMinGlyphMap = LE_NEW_ARRAY(le_int32, fCharCount + 1); fCharToMaxGlyphMap = LE_NEW_ARRAY(le_int32, fCharCount + 1); - if ((fGlyphWidths == NULL) || (fGlyphToCharMap == NULL) || - (fCharToMinGlyphMap == NULL) || (fCharToMaxGlyphMap == NULL)) { + if ((fGlyphWidths == nullptr) || (fGlyphToCharMap == nullptr) || + (fCharToMinGlyphMap == nullptr) || (fCharToMaxGlyphMap == nullptr)) { status = LE_MEMORY_ALLOCATION_ERROR; return; } @@ -455,8 +455,8 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, fStyleRunInfo[run].glyphs = LE_NEW_ARRAY(LEGlyphID, glyphCount); fStyleRunInfo[run].positions = LE_NEW_ARRAY(float, glyphCount * 2 + 2); - if ((fStyleRunInfo[run].glyphs == NULL) || - (fStyleRunInfo[run].positions == NULL)) { + if ((fStyleRunInfo[run].glyphs == nullptr) || + (fStyleRunInfo[run].positions == nullptr)) { status = LE_MEMORY_ALLOCATION_ERROR; return; } @@ -491,7 +491,7 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count, runStart = fStyleRunLimits[run]; delete engine; - fStyleRunInfo[run].engine = NULL; + fStyleRunInfo[run].engine = nullptr; } fGlyphToCharMap[fGlyphCount] = fCharCount; @@ -531,58 +531,58 @@ ParagraphLayout::~ParagraphLayout() if (! fClientLevels) { delete (ValueRuns *) fLevelRuns; - fLevelRuns = NULL; + fLevelRuns = nullptr; fClientLevels = true; } if (! fClientScripts) { delete (ValueRuns *) fScriptRuns; - fScriptRuns = NULL; + fScriptRuns = nullptr; fClientScripts = true; } if (! fClientLocales) { delete (LocaleRuns *) fLocaleRuns; - fLocaleRuns = NULL; + fLocaleRuns = nullptr; fClientLocales = true; } - if (fEmbeddingLevels != NULL) { + if (fEmbeddingLevels != nullptr) { LE_DELETE_ARRAY(fEmbeddingLevels); - fEmbeddingLevels = NULL; + fEmbeddingLevels = nullptr; } - if (fGlyphToCharMap != NULL) { + if (fGlyphToCharMap != nullptr) { LE_DELETE_ARRAY(fGlyphToCharMap); - fGlyphToCharMap = NULL; + fGlyphToCharMap = nullptr; } - if (fCharToMinGlyphMap != NULL) { + if (fCharToMinGlyphMap != nullptr) { LE_DELETE_ARRAY(fCharToMinGlyphMap); - fCharToMinGlyphMap = NULL; + fCharToMinGlyphMap = nullptr; } - if (fCharToMaxGlyphMap != NULL) { + if (fCharToMaxGlyphMap != nullptr) { LE_DELETE_ARRAY(fCharToMaxGlyphMap); - fCharToMaxGlyphMap = NULL; + fCharToMaxGlyphMap = nullptr; } - if (fGlyphWidths != NULL) { + if (fGlyphWidths != nullptr) { LE_DELETE_ARRAY(fGlyphWidths); - fGlyphWidths = NULL; + fGlyphWidths = nullptr; } - if (fParaBidi != NULL) { + if (fParaBidi != nullptr) { ubidi_close(fParaBidi); - fParaBidi = NULL; + fParaBidi = nullptr; } - if (fLineBidi != NULL) { + if (fLineBidi != nullptr) { ubidi_close(fLineBidi); - fLineBidi = NULL; + fLineBidi = nullptr; } if (fStyleRunCount > 0) { @@ -595,21 +595,21 @@ ParagraphLayout::~ParagraphLayout() LE_DELETE_ARRAY(fStyleRunInfo[run].glyphs); LE_DELETE_ARRAY(fStyleRunInfo[run].positions); - fStyleRunInfo[run].glyphs = NULL; - fStyleRunInfo[run].positions = NULL; + fStyleRunInfo[run].glyphs = nullptr; + fStyleRunInfo[run].positions = nullptr; } LE_DELETE_ARRAY(fStyleRunInfo); - fStyleRunLimits = NULL; - fStyleIndices = NULL; - fStyleRunInfo = NULL; + fStyleRunLimits = nullptr; + fStyleIndices = nullptr; + fStyleRunInfo = nullptr; fStyleRunCount = 0; } - if (fBreakIterator != NULL) { + if (fBreakIterator != nullptr) { delete fBreakIterator; - fBreakIterator = NULL; + fBreakIterator = nullptr; } } @@ -621,7 +621,7 @@ le_bool ParagraphLayout::isComplex(const LEUnicode chars[], le_int32 count) UScriptRun *sr = uscript_openRun(chars, count, &scriptStatus); le_bool result = false; - while (uscript_nextRun(sr, NULL, NULL, &scriptCode)) { + while (uscript_nextRun(sr, nullptr, nullptr, &scriptCode)) { if (isComplex(scriptCode)) { result = true; break; @@ -667,7 +667,7 @@ le_bool ParagraphLayout::isDone() const ParagraphLayout::Line *ParagraphLayout::nextLine(float width) { if (isDone()) { - return NULL; + return nullptr; } fLineStart = fLineEnd; @@ -710,7 +710,7 @@ void ParagraphLayout::computeLevels(UBiDiLevel paragraphLevel) { UErrorCode bidiStatus = U_ZERO_ERROR; - if (fLevelRuns != NULL) { + if (fLevelRuns != nullptr) { le_int32 ch; le_int32 run; @@ -729,7 +729,7 @@ void ParagraphLayout::computeLevels(UBiDiLevel paragraphLevel) fParaBidi = ubidi_openSized(fCharCount, 0, &bidiStatus); ubidi_setPara(fParaBidi, fChars, fCharCount, paragraphLevel, fEmbeddingLevels, &bidiStatus); - if (fLevelRuns == NULL) { + if (fLevelRuns == nullptr) { le_int32 levelRunCount = ubidi_countRuns(fParaBidi, &bidiStatus); ValueRuns *levelRuns = new ValueRuns(levelRunCount); @@ -757,7 +757,7 @@ void ParagraphLayout::computeScripts() le_int32 limit; UScriptCode script; - while (uscript_nextRun(sr, NULL, &limit, &script)) { + while (uscript_nextRun(sr, nullptr, &limit, &script)) { scriptRuns->add(script, limit); } @@ -787,7 +787,7 @@ void ParagraphLayout::computeSubFonts(const FontRuns *fontRuns, LEErrorCode &sta const RunArray *styleRunArrays[] = {fontRuns, fScriptRuns}; le_int32 styleCount = sizeof styleRunArrays / sizeof styleRunArrays[0]; StyleRuns styleRuns(styleRunArrays, styleCount); - le_int32 styleRunCount = styleRuns.getRuns(NULL, NULL); + le_int32 styleRunCount = styleRuns.getRuns(nullptr, nullptr); le_int32 *styleRunLimits = LE_NEW_ARRAY(le_int32, styleRunCount); le_int32 *styleIndices = LE_NEW_ARRAY(le_int32, styleRunCount * styleCount); FontRuns *subFontRuns = new FontRuns(0); @@ -950,7 +950,7 @@ le_int32 ParagraphLayout::getLanguageCode(const Locale *locale) uprv_strcat(code, language); - if ((uprv_strcmp(language, "zho") == 0) && country != NULL) { + if ((uprv_strcmp(language, "zho") == 0) && country != nullptr) { uprv_strcat(code, "_"); uprv_strcat(code, country); } @@ -992,7 +992,7 @@ le_int32 ParagraphLayout::previousBreak(le_int32 charIndex) } // Create the BreakIterator if we don't already have one - if (fBreakIterator == NULL) { + if (fBreakIterator == nullptr) { Locale thai("th"); UCharCharacterIterator *iter = new UCharCharacterIterator(fChars, fCharCount); UErrorCode status = U_ZERO_ERROR; @@ -1018,7 +1018,7 @@ ParagraphLayout::Line *ParagraphLayout::computeVisualRuns() fFirstVisualRun = getCharRun(fLineStart); fLastVisualRun = getCharRun(fLineEnd - 1); - if (fLineBidi == NULL) { + if (fLineBidi == nullptr) { fLineBidi = ubidi_openSized(fCharCount, 0, &bidiStatus); } @@ -1201,7 +1201,7 @@ le_int32 ParagraphLayout::Line::getWidth() const { const VisualRun *lastRun = getVisualRun(fRunCount - 1); - if (lastRun == NULL) { + if (lastRun == nullptr) { return 0; } @@ -1214,7 +1214,7 @@ le_int32 ParagraphLayout::Line::getWidth() const const ParagraphLayout::VisualRun *ParagraphLayout::Line::getVisualRun(le_int32 runIndex) const { if (runIndex < 0 || runIndex >= fRunCount) { - return NULL; + return nullptr; } return fRuns[runIndex]; diff --git a/Build/source/libs/icu/icu-src/source/layoutex/RunArrays.cpp b/Build/source/libs/icu/icu-src/source/layoutex/RunArrays.cpp index 20d020c4f01..30b40e53008 100644 --- a/Build/source/libs/icu/icu-src/source/layoutex/RunArrays.cpp +++ b/Build/source/libs/icu/icu-src/source/layoutex/RunArrays.cpp @@ -19,7 +19,7 @@ U_NAMESPACE_BEGIN const char RunArray::fgClassID = 0; RunArray::RunArray(le_int32 initialCapacity) - : fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(initialCapacity) + : fClientArrays(false), fLimits(nullptr), fCount(0), fCapacity(initialCapacity) { if (initialCapacity > 0) { fLimits = LE_NEW_ARRAY(le_int32, fCapacity); @@ -30,7 +30,7 @@ RunArray::~RunArray() { if (! fClientArrays) { LE_DELETE_ARRAY(fLimits); - fLimits = NULL; + fLimits = nullptr; } } @@ -76,7 +76,7 @@ le_int32 RunArray::add(le_int32 limit) const char FontRuns::fgClassID = 0; FontRuns::FontRuns(le_int32 initialCapacity) - : RunArray(initialCapacity), fFonts(NULL) + : RunArray(initialCapacity), fFonts(nullptr) { if (initialCapacity > 0) { fFonts = LE_NEW_ARRAY(const LEFontInstance *, initialCapacity); @@ -87,7 +87,7 @@ FontRuns::~FontRuns() { if (! fClientArrays) { LE_DELETE_ARRAY(fFonts); - fFonts = NULL; + fFonts = nullptr; } } @@ -119,7 +119,7 @@ le_int32 FontRuns::add(const LEFontInstance *font, le_int32 limit) const LEFontInstance *FontRuns::getFont(le_int32 run) const { if (run < 0 || run >= getCount()) { - return NULL; + return nullptr; } return fFonts[run]; @@ -128,7 +128,7 @@ const LEFontInstance *FontRuns::getFont(le_int32 run) const const char LocaleRuns::fgClassID = 0; LocaleRuns::LocaleRuns(le_int32 initialCapacity) - : RunArray(initialCapacity), fLocales(NULL) + : RunArray(initialCapacity), fLocales(nullptr) { if (initialCapacity > 0) { fLocales = LE_NEW_ARRAY(const Locale *, initialCapacity); @@ -139,7 +139,7 @@ LocaleRuns::~LocaleRuns() { if (! fClientArrays) { LE_DELETE_ARRAY(fLocales); - fLocales = NULL; + fLocales = nullptr; } } @@ -171,7 +171,7 @@ le_int32 LocaleRuns::add(const Locale *locale, le_int32 limit) const Locale *LocaleRuns::getLocale(le_int32 run) const { if (run < 0 || run >= getCount()) { - return NULL; + return nullptr; } return fLocales[run]; @@ -180,7 +180,7 @@ const Locale *LocaleRuns::getLocale(le_int32 run) const const char ValueRuns::fgClassID = 0; ValueRuns::ValueRuns(le_int32 initialCapacity) - : RunArray(initialCapacity), fValues(NULL) + : RunArray(initialCapacity), fValues(nullptr) { if (initialCapacity > 0) { fValues = LE_NEW_ARRAY(le_int32, initialCapacity); @@ -191,7 +191,7 @@ ValueRuns::~ValueRuns() { if (! fClientArrays) { LE_DELETE_ARRAY(fValues); - fValues = NULL; + fValues = nullptr; } } diff --git a/Build/source/libs/icu/icu-src/source/layoutex/layout/ParagraphLayout.h b/Build/source/libs/icu/icu-src/source/layoutex/layout/ParagraphLayout.h index b8a7aa3c17d..f6167ae3292 100644 --- a/Build/source/libs/icu/icu-src/source/layoutex/layout/ParagraphLayout.h +++ b/Build/source/libs/icu/icu-src/source/layoutex/layout/ParagraphLayout.h @@ -369,16 +369,16 @@ public: * @param fontRuns a pointer to a <code>FontRuns</code> object representing the font runs. * * @param levelRuns is a pointer to a <code>ValueRuns</code> object representing the directional levels. - * If this pointer in <code>NULL</code> the levels will be determined by running the Unicode + * If this pointer in <code>nullptr</code> the levels will be determined by running the Unicode * Bidi algorithm. * * @param scriptRuns is a pointer to a <code>ValueRuns</code> object representing script runs. - * If this pointer in <code>NULL</code> the script runs will be determined using the + * If this pointer in <code>nullptr</code> the script runs will be determined using the * Unicode code points. * * @param localeRuns is a pointer to a <code>LocaleRuns</code> object representing locale runs. * The <code>Locale</code> objects are used to determine the language of the text. If this - * pointer is <code>NULL</code> the default locale will be used for all of the text. + * pointer is <code>nullptr</code> the default locale will be used for all of the text. * * @param paragraphLevel is the directionality of the paragraph, as in the UBiDi object. * @@ -529,7 +529,7 @@ public: * rest of the paragraph will be returned. * * @return a <code>ParagraphLayout::Line</code> object which represents the line. The caller - * is responsible for deleting the object. Returns <code>NULL</code> if there are no + * is responsible for deleting the object. Returns <code>nullptr</code> if there are no * more lines in the paragraph. * * @see ParagraphLayout::Line @@ -661,13 +661,13 @@ inline void ParagraphLayout::reflow() } inline ParagraphLayout::Line::Line() - : UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(NULL) + : UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(nullptr) { // nothing else to do } inline ParagraphLayout::Line::Line(const Line & /*other*/) - : UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(NULL) + : UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(nullptr) { // nothing else to do } @@ -723,13 +723,13 @@ inline le_int32 ParagraphLayout::VisualRun::getLeading() const } inline ParagraphLayout::VisualRun::VisualRun() - : UObject(), fFont(NULL), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(NULL), fPositions(NULL), fGlyphToCharMap(NULL) + : UObject(), fFont(nullptr), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(nullptr), fPositions(nullptr), fGlyphToCharMap(nullptr) { // nothing } inline ParagraphLayout::VisualRun::VisualRun(const VisualRun &/*other*/) - : UObject(), fFont(NULL), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(NULL), fPositions(NULL), fGlyphToCharMap(NULL) + : UObject(), fFont(nullptr), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(nullptr), fPositions(nullptr), fGlyphToCharMap(nullptr) { // nothing } diff --git a/Build/source/libs/icu/icu-src/source/layoutex/layout/RunArrays.h b/Build/source/libs/icu/icu-src/source/layoutex/layout/RunArrays.h index 92dfc386a52..08e32826642 100644 --- a/Build/source/libs/icu/icu-src/source/layoutex/layout/RunArrays.h +++ b/Build/source/libs/icu/icu-src/source/layoutex/layout/RunArrays.h @@ -222,13 +222,13 @@ private: }; inline RunArray::RunArray() - : UObject(), fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0) + : UObject(), fClientArrays(false), fLimits(nullptr), fCount(0), fCapacity(0) { // nothing else to do... } inline RunArray::RunArray(const RunArray & /*other*/) - : UObject(), fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0) + : UObject(), fClientArrays(false), fLimits(nullptr), fCount(0), fCapacity(0) { // nothing else to do... } @@ -383,13 +383,13 @@ private: }; inline FontRuns::FontRuns() - : RunArray(0), fFonts(NULL) + : RunArray(0), fFonts(nullptr) { // nothing else to do... } inline FontRuns::FontRuns(const FontRuns & /*other*/) - : RunArray(0), fFonts(NULL) + : RunArray(0), fFonts(nullptr) { // nothing else to do... } @@ -523,13 +523,13 @@ private: }; inline LocaleRuns::LocaleRuns() - : RunArray(0), fLocales(NULL) + : RunArray(0), fLocales(nullptr) { // nothing else to do... } inline LocaleRuns::LocaleRuns(const LocaleRuns & /*other*/) - : RunArray(0), fLocales(NULL) + : RunArray(0), fLocales(nullptr) { // nothing else to do... } @@ -657,13 +657,13 @@ private: }; inline ValueRuns::ValueRuns() - : RunArray(0), fValues(NULL) + : RunArray(0), fValues(nullptr) { // nothing else to do... } inline ValueRuns::ValueRuns(const ValueRuns & /*other*/) - : RunArray(0), fValues(NULL) + : RunArray(0), fValues(nullptr) { // nothing else to do... } diff --git a/Build/source/libs/icu/icu-src/source/layoutex/playout.cpp b/Build/source/libs/icu/icu-src/source/layoutex/playout.cpp index cebd4bb4add..08dac262301 100644 --- a/Build/source/libs/icu/icu-src/source/layoutex/playout.cpp +++ b/Build/source/libs/icu/icu-src/source/layoutex/playout.cpp @@ -62,7 +62,7 @@ pl_getParagraphLevel(pl_paragraph *paragraph) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { + if (pl == nullptr) { return 0; } @@ -74,7 +74,7 @@ pl_getTextDirection(pl_paragraph *paragraph) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { + if (pl == nullptr) { return UBIDI_LTR; } @@ -86,7 +86,7 @@ pl_getAscent(const pl_paragraph *paragraph) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { + if (pl == nullptr) { return 0; } @@ -98,7 +98,7 @@ pl_getDescent(const pl_paragraph *paragraph) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { + if (pl == nullptr) { return 0; } @@ -110,7 +110,7 @@ pl_getLeading(const pl_paragraph *paragraph) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { + if (pl == nullptr) { return 0; } @@ -122,7 +122,7 @@ pl_reflow(pl_paragraph *paragraph) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { + if (pl == nullptr) { return; } @@ -134,8 +134,8 @@ pl_nextLine(pl_paragraph *paragraph, float width) { ParagraphLayout *pl = (ParagraphLayout *) paragraph; - if (pl == NULL) { - return NULL; + if (pl == nullptr) { + return nullptr; } return (pl_line *) pl->nextLine(width); @@ -154,7 +154,7 @@ pl_countLineRuns(const pl_line *line) { ParagraphLayout::Line *ll = (ParagraphLayout::Line *) line; - if (ll == NULL) { + if (ll == nullptr) { return 0; } @@ -166,7 +166,7 @@ pl_getLineAscent(const pl_line *line) { ParagraphLayout::Line *ll = (ParagraphLayout::Line *) line; - if (ll == NULL) { + if (ll == nullptr) { return 0; } @@ -178,7 +178,7 @@ pl_getLineDescent(const pl_line *line) { ParagraphLayout::Line *ll = (ParagraphLayout::Line *) line; - if (ll == NULL) { + if (ll == nullptr) { return 0; } @@ -190,7 +190,7 @@ pl_getLineLeading(const pl_line *line) { ParagraphLayout::Line *ll = (ParagraphLayout::Line *) line; - if (ll == NULL) { + if (ll == nullptr) { return 0; } @@ -202,7 +202,7 @@ pl_getLineWidth(const pl_line *line) { ParagraphLayout::Line *ll = (ParagraphLayout::Line *) line; - if (ll == NULL) { + if (ll == nullptr) { return 0; } @@ -214,7 +214,7 @@ pl_getLineVisualRun(const pl_line *line, le_int32 runIndex) { ParagraphLayout::Line *ll = (ParagraphLayout::Line *) line; - if (ll == NULL) { + if (ll == nullptr) { return 0; } @@ -226,8 +226,8 @@ pl_getVisualRunFont(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { - return NULL; + if (vr == nullptr) { + return nullptr; } return (const le_font *) vr->getFont(); @@ -238,7 +238,7 @@ pl_getVisualRunDirection(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { + if (vr == nullptr) { return UBIDI_LTR; } @@ -250,7 +250,7 @@ pl_getVisualRunGlyphCount(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { + if (vr == nullptr) { return -1; } @@ -262,8 +262,8 @@ pl_getVisualRunGlyphs(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { - return NULL; + if (vr == nullptr) { + return nullptr; } return vr->getGlyphs(); @@ -274,8 +274,8 @@ pl_getVisualRunPositions(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { - return NULL; + if (vr == nullptr) { + return nullptr; } return vr->getPositions(); @@ -286,8 +286,8 @@ pl_getVisualRunGlyphToCharMap(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { - return NULL; + if (vr == nullptr) { + return nullptr; } return vr->getGlyphToCharMap(); @@ -298,7 +298,7 @@ pl_getVisualRunAscent(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { + if (vr == nullptr) { return 0; } @@ -310,7 +310,7 @@ pl_getVisualRunDescent(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { + if (vr == nullptr) { return 0; } @@ -322,7 +322,7 @@ pl_getVisualRunLeading(const pl_visualRun *run) { ParagraphLayout::VisualRun *vr = (ParagraphLayout::VisualRun *) run; - if (vr == NULL) { + if (vr == nullptr) { return 0; } diff --git a/Build/source/libs/icu/icu-src/source/layoutex/plruns.cpp b/Build/source/libs/icu/icu-src/source/layoutex/plruns.cpp index 282602364b8..e2796ad24d2 100644 --- a/Build/source/libs/icu/icu-src/source/layoutex/plruns.cpp +++ b/Build/source/libs/icu/icu-src/source/layoutex/plruns.cpp @@ -44,7 +44,7 @@ pl_getFontRunCount(const pl_fontRuns *fontRuns) { const FontRuns *fr = (const FontRuns *) fontRuns; - if (fr == NULL) { + if (fr == nullptr) { return -1; } @@ -56,7 +56,7 @@ pl_resetFontRuns(pl_fontRuns *fontRuns) { FontRuns *fr = (FontRuns *) fontRuns; - if (fr != NULL) { + if (fr != nullptr) { fr->reset(); } } @@ -66,7 +66,7 @@ pl_getFontRunLastLimit(const pl_fontRuns *fontRuns) { const FontRuns *fr = (const FontRuns *) fontRuns; - if (fr == NULL) { + if (fr == nullptr) { return -1; } @@ -79,7 +79,7 @@ pl_getFontRunLimit(const pl_fontRuns *fontRuns, { const FontRuns *fr = (const FontRuns *) fontRuns; - if (fr == NULL) { + if (fr == nullptr) { return -1; } @@ -92,8 +92,8 @@ pl_getFontRunFont(const pl_fontRuns *fontRuns, { const FontRuns *fr = (const FontRuns *) fontRuns; - if (fr == NULL) { - return NULL; + if (fr == nullptr) { + return nullptr; } return (const le_font *) fr->getFont(run); @@ -106,7 +106,7 @@ pl_addFontRun(pl_fontRuns *fontRuns, { FontRuns *fr = (FontRuns *) fontRuns; - if (fr == NULL) { + if (fr == nullptr) { return -1; } @@ -140,7 +140,7 @@ pl_getValueRunCount(const pl_valueRuns *valueRuns) { const ValueRuns *vr = (const ValueRuns *) valueRuns; - if (vr == NULL) { + if (vr == nullptr) { return -1; } @@ -152,7 +152,7 @@ pl_resetValueRuns(pl_valueRuns *valueRuns) { ValueRuns *vr = (ValueRuns *) valueRuns; - if (vr != NULL) { + if (vr != nullptr) { vr->reset(); } } @@ -162,7 +162,7 @@ pl_getValueRunLastLimit(const pl_valueRuns *valueRuns) { const ValueRuns *vr = (const ValueRuns *) valueRuns; - if (vr == NULL) { + if (vr == nullptr) { return -1; } @@ -175,7 +175,7 @@ pl_getValueRunLimit(const pl_valueRuns *valueRuns, { const ValueRuns *vr = (const ValueRuns *) valueRuns; - if (vr == NULL) { + if (vr == nullptr) { return -1; } @@ -188,7 +188,7 @@ pl_getValueRunValue(const pl_valueRuns *valueRuns, { const ValueRuns *vr = (const ValueRuns *) valueRuns; - if (vr == NULL) { + if (vr == nullptr) { return -1; } @@ -202,7 +202,7 @@ pl_addValueRun(pl_valueRuns *valueRuns, { ValueRuns *vr = (ValueRuns *) valueRuns; - if (vr == NULL) { + if (vr == nullptr) { return -1; } @@ -316,13 +316,13 @@ private: }; inline ULocRuns::ULocRuns() - : LocaleRuns(0), fLocaleNames(NULL) + : LocaleRuns(0), fLocaleNames(nullptr) { // nothing else to do... } inline ULocRuns::ULocRuns(const ULocRuns & /*other*/) - : LocaleRuns(0), fLocaleNames(NULL) + : LocaleRuns(0), fLocaleNames(nullptr) { // nothing else to do... } @@ -345,7 +345,7 @@ ULocRuns::ULocRuns(const char **locales, const le_int32 *limits, le_int32 count) } ULocRuns::ULocRuns(le_int32 initialCapacity) - : LocaleRuns(initialCapacity), fLocaleNames(NULL) + : LocaleRuns(initialCapacity), fLocaleNames(nullptr) { if(initialCapacity > 0) { fLocaleNames = LE_NEW_ARRAY(const char *, initialCapacity); @@ -362,10 +362,10 @@ ULocRuns::~ULocRuns() if (fClientArrays) { LE_DELETE_ARRAY(fLocales); - fLocales = NULL; + fLocales = nullptr; } else { LE_DELETE_ARRAY(fLocaleNames); - fLocaleNames = NULL; + fLocaleNames = nullptr; } } @@ -398,7 +398,7 @@ le_int32 ULocRuns::add(const char *locale, le_int32 limit) const char *ULocRuns::getLocaleName(le_int32 run) const { if (run < 0 || run >= getCount()) { - return NULL; + return nullptr; } return fLocaleNames[run]; @@ -433,7 +433,7 @@ pl_getLocaleRunCount(const pl_localeRuns *localeRuns) { const ULocRuns *lr = (const ULocRuns *) localeRuns; - if (lr == NULL) { + if (lr == nullptr) { return -1; } @@ -445,7 +445,7 @@ pl_resetLocaleRuns(pl_localeRuns *localeRuns) { ULocRuns *lr = (ULocRuns *) localeRuns; - if (lr != NULL) { + if (lr != nullptr) { lr->reset(); } } @@ -455,7 +455,7 @@ pl_getLocaleRunLastLimit(const pl_localeRuns *localeRuns) { const ULocRuns *lr = (const ULocRuns *) localeRuns; - if (lr == NULL) { + if (lr == nullptr) { return -1; } @@ -468,7 +468,7 @@ pl_getLocaleRunLimit(const pl_localeRuns *localeRuns, { const ULocRuns *lr = (const ULocRuns *) localeRuns; - if (lr == NULL) { + if (lr == nullptr) { return -1; } @@ -481,8 +481,8 @@ pl_getLocaleRunLocale(const pl_localeRuns *localeRuns, { const ULocRuns *lr = (const ULocRuns *) localeRuns; - if (lr == NULL) { - return NULL; + if (lr == nullptr) { + return nullptr; } return lr->getLocaleName(run); @@ -495,7 +495,7 @@ pl_addLocaleRun(pl_localeRuns *localeRuns, { ULocRuns *lr = (ULocRuns *) localeRuns; - if (lr == NULL) { + if (lr == nullptr) { return -1; } |