ICU-2699 remove --enable-strict and -Winline errors.

X-SVN-Rev: 12047
This commit is contained in:
Eric Mader 2003-05-22 21:56:57 +00:00
parent 55d7ac57f4
commit 661e0b31c4
6 changed files with 130 additions and 120 deletions

View File

@ -77,6 +77,11 @@ le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
return 0;
}
if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
le_int32 worstCase = count * IndicReordering::getWorstCaseExpansion(fScriptCode);
outChars = LE_NEW_ARRAY(LEUnicode, worstCase);

View File

@ -2,8 +2,8 @@
* (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved
*
* $Source: /xsrl/Nsvn/icu/icu/source/layout/IndicReordering.h,v $
* $Date: 2003/01/13 23:15:10 $
* $Revision: 1.7 $
* $Date: 2003/05/22 21:56:35 $
* $Revision: 1.8 $
*
*/
@ -166,91 +166,6 @@ inline const SplitMatra *IndicClassTable::getSplitMatra(CharClass charClass) con
return &splitMatraTable[index - 1];
}
inline le_bool IndicClassTable::isVMabove(LEUnicode ch) const
{
return isVMabove(getCharClass(ch));
}
inline le_bool IndicClassTable::isVMpost(LEUnicode ch) const
{
return isVMpost(getCharClass(ch));
}
inline le_bool IndicClassTable::isConsonant(LEUnicode ch) const
{
return isConsonant(getCharClass(ch));
}
inline le_bool IndicClassTable::isReph(LEUnicode ch) const
{
return isReph(getCharClass(ch));
}
inline le_bool IndicClassTable::isVirama(LEUnicode ch) const
{
return isVirama(getCharClass(ch));
}
inline le_bool IndicClassTable::isNukta(LEUnicode ch) const
{
return isNukta(getCharClass(ch));
}
inline le_bool IndicClassTable::isVattu(LEUnicode ch) const
{
return isVattu(getCharClass(ch));
}
inline le_bool IndicClassTable::isMatra(LEUnicode ch) const
{
return isMatra(getCharClass(ch));
}
inline le_bool IndicClassTable::isSplitMatra(LEUnicode ch) const
{
return isSplitMatra(getCharClass(ch));
}
inline le_bool IndicClassTable::isMpre(LEUnicode ch) const
{
return isMpre(getCharClass(ch));
}
inline le_bool IndicClassTable::isMbelow(LEUnicode ch) const
{
return isMbelow(getCharClass(ch));
}
inline le_bool IndicClassTable::isMabove(LEUnicode ch) const
{
return isMabove(getCharClass(ch));
}
inline le_bool IndicClassTable::isMpost(LEUnicode ch) const
{
return isMpost(getCharClass(ch));
}
inline le_bool IndicClassTable::isLengthMark(LEUnicode ch) const
{
return isLengthMark(getCharClass(ch));
}
inline le_bool IndicClassTable::hasPostOrBelowBaseForm(LEUnicode ch) const
{
return hasPostOrBelowBaseForm(getCharClass(ch));
}
inline le_bool IndicClassTable::hasPostBaseForm(LEUnicode ch) const
{
return hasPostBaseForm(getCharClass(ch));
}
inline le_bool IndicClassTable::hasBelowBaseForm(LEUnicode ch) const
{
return hasBelowBaseForm(getCharClass(ch));
}
inline le_bool IndicClassTable::isVMabove(CharClass charClass)
{
return (charClass & CF_CLASS_MASK) == CC_MODIFYING_MARK_ABOVE;
@ -336,5 +251,90 @@ inline le_bool IndicClassTable::hasBelowBaseForm(CharClass charClass)
return (charClass & CF_BELOW_BASE) != 0;
}
inline le_bool IndicClassTable::isVMabove(LEUnicode ch) const
{
return isVMabove(getCharClass(ch));
}
inline le_bool IndicClassTable::isVMpost(LEUnicode ch) const
{
return isVMpost(getCharClass(ch));
}
inline le_bool IndicClassTable::isConsonant(LEUnicode ch) const
{
return isConsonant(getCharClass(ch));
}
inline le_bool IndicClassTable::isReph(LEUnicode ch) const
{
return isReph(getCharClass(ch));
}
inline le_bool IndicClassTable::isVirama(LEUnicode ch) const
{
return isVirama(getCharClass(ch));
}
inline le_bool IndicClassTable::isNukta(LEUnicode ch) const
{
return isNukta(getCharClass(ch));
}
inline le_bool IndicClassTable::isVattu(LEUnicode ch) const
{
return isVattu(getCharClass(ch));
}
inline le_bool IndicClassTable::isMatra(LEUnicode ch) const
{
return isMatra(getCharClass(ch));
}
inline le_bool IndicClassTable::isSplitMatra(LEUnicode ch) const
{
return isSplitMatra(getCharClass(ch));
}
inline le_bool IndicClassTable::isMpre(LEUnicode ch) const
{
return isMpre(getCharClass(ch));
}
inline le_bool IndicClassTable::isMbelow(LEUnicode ch) const
{
return isMbelow(getCharClass(ch));
}
inline le_bool IndicClassTable::isMabove(LEUnicode ch) const
{
return isMabove(getCharClass(ch));
}
inline le_bool IndicClassTable::isMpost(LEUnicode ch) const
{
return isMpost(getCharClass(ch));
}
inline le_bool IndicClassTable::isLengthMark(LEUnicode ch) const
{
return isLengthMark(getCharClass(ch));
}
inline le_bool IndicClassTable::hasPostOrBelowBaseForm(LEUnicode ch) const
{
return hasPostOrBelowBaseForm(getCharClass(ch));
}
inline le_bool IndicClassTable::hasPostBaseForm(LEUnicode ch) const
{
return hasPostBaseForm(getCharClass(ch));
}
inline le_bool IndicClassTable::hasBelowBaseForm(LEUnicode ch) const
{
return hasBelowBaseForm(getCharClass(ch));
}
U_NAMESPACE_END
#endif

View File

@ -41,7 +41,7 @@ U_NAMESPACE_BEGIN
*
* @draft ICU 2.2
*/
class LESwaps /* not : public UObject because all methods are static */ {
class U_LAYOUT_API LESwaps /* not : public UObject because all methods are static */ {
public:
/**
@ -57,7 +57,7 @@ public:
*/
static le_bool isBigEndian()
{
static const le_uint16 word = 0xFF00;
const le_uint16 word = 0xFF00;
return *((le_uint8 *) &word);
};

View File

@ -26,8 +26,8 @@ const char OpenTypeLayoutEngine::fgClassID=0;
OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
const GlyphSubstitutionTableHeader *gsubTable)
: LayoutEngine(fontInstance, scriptCode, languageCode), fFeatureTags(NULL), fGSUBTable(gsubTable),
fFeatureOrder(NULL), fSubstitutionFilter(NULL)
: LayoutEngine(fontInstance, scriptCode, languageCode), fFeatureTags(NULL), fFeatureOrder(NULL),
fGSUBTable(gsubTable), fSubstitutionFilter(NULL)
{
static le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG;
static le_uint32 gposTableTag = LE_GPOS_TABLE_TAG;
@ -57,8 +57,8 @@ void OpenTypeLayoutEngine::reset()
}
OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
: LayoutEngine(fontInstance, scriptCode, languageCode), fFeatureTags(NULL), fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL),
fFeatureOrder(NULL), fSubstitutionFilter(NULL)
: LayoutEngine(fontInstance, scriptCode, languageCode), fFeatureTags(NULL), fFeatureOrder(NULL),
fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
{
setScriptAndLanguageTags();
}

View File

@ -9,6 +9,12 @@
#define __PARAGRAPHLAYOUT_H
/*
* ParagraphLayout doesn't make much sense without
* BreakIterator...
*/
#if ! UCONFIG_NO_BREAK_ITERATION
#include "unicode/uscript.h"
#include "layout/LETypes.h"
@ -149,7 +155,7 @@ public:
Line();
Line(const Line &other);
Line &operator=(const Line &other) { return *this; };
Line &operator=(const Line & /*other*/) { return *this; };
void computeMetrics();
@ -506,8 +512,8 @@ private:
};
ParagraphLayout() {};
ParagraphLayout(const ParagraphLayout &other) {};
ParagraphLayout &operator=(const ParagraphLayout &other) { return *this; };
ParagraphLayout(const ParagraphLayout & /*other*/) : UObject( ){};
ParagraphLayout &operator=(const ParagraphLayout & /*other*/) { return *this; };
void computeLevels(UBiDiLevel paragraphLevel);
@ -589,13 +595,13 @@ inline void ParagraphLayout::reflow()
}
inline ParagraphLayout::Line::Line()
: fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(NULL)
: UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(NULL)
{
// nothing else to do
}
inline ParagraphLayout::Line::Line(const Line &other)
: fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(NULL)
inline ParagraphLayout::Line::Line(const Line & /*other*/)
: UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(NULL)
{
// nothing else to do
}
@ -651,13 +657,13 @@ inline le_int32 ParagraphLayout::VisualRun::getLeading() const
}
inline ParagraphLayout::VisualRun::VisualRun()
: fFont(NULL), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(NULL), fPositions(NULL), fGlyphToCharMap(NULL)
: UObject(), fFont(NULL), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(NULL), fPositions(NULL), fGlyphToCharMap(NULL)
{
// nothing
}
inline ParagraphLayout::VisualRun::VisualRun(const VisualRun &other)
: fFont(NULL), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(NULL), fPositions(NULL), fGlyphToCharMap(NULL)
: UObject(), fFont(NULL), fDirection(UBIDI_LTR), fGlyphCount(0), fGlyphs(NULL), fPositions(NULL), fGlyphToCharMap(NULL)
{
// nothing
}
@ -679,5 +685,4 @@ inline ParagraphLayout::VisualRun::~VisualRun()
U_NAMESPACE_END
#endif
#endif

View File

@ -193,8 +193,8 @@ private:
le_int32 ensureCapacity();
RunArray();
RunArray(const RunArray &other);
RunArray &operator=(const RunArray &other) { return *this; };
RunArray(const RunArray & /*other*/);
RunArray &operator=(const RunArray & /*other*/) { return *this; };
const le_int32 *fLimits;
le_int32 fCount;
@ -202,19 +202,19 @@ private:
};
inline RunArray::RunArray()
: fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0)
: UObject(), fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0)
{
// nothing else to do...
}
inline RunArray::RunArray(const RunArray &other)
: fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0)
inline RunArray::RunArray(const RunArray & /*other*/)
: UObject(), fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0)
{
// nothing else to do...
}
inline RunArray::RunArray(const le_int32 *limits, le_int32 count)
: fClientArrays(true), fLimits(limits), fCount(count), fCapacity(count)
: UObject(), fClientArrays(true), fLimits(limits), fCount(count), fCapacity(count)
{
// nothing else to do...
}
@ -240,11 +240,6 @@ inline le_int32 RunArray::getCount() const
return fCount;
}
inline le_int32 RunArray::getLimit() const
{
return getLimit(fCount - 1);
}
inline le_int32 RunArray::getLimit(le_int32 run) const
{
if (run < 0 || run >= fCount) {
@ -254,6 +249,11 @@ inline le_int32 RunArray::getLimit(le_int32 run) const
return fLimits[run];
}
inline le_int32 RunArray::getLimit() const
{
return getLimit(fCount - 1);
}
/**
* The <code>FontRuns</code> class associates pointers to <code>LEFontInstance</code>
* objects with runs of text.
@ -358,7 +358,7 @@ private:
FontRuns();
FontRuns(const FontRuns &other);
FontRuns &operator=(const FontRuns &other) { return *this; };
FontRuns &operator=(const FontRuns & /*other*/) { return *this; };
/**
* The address of this static class variable serves as this class's ID
@ -375,7 +375,7 @@ inline FontRuns::FontRuns()
// nothing else to do...
}
inline FontRuns::FontRuns(const FontRuns &other)
inline FontRuns::FontRuns(const FontRuns & /*other*/)
: RunArray(0), fFonts(NULL)
{
// nothing else to do...
@ -507,7 +507,7 @@ private:
LocaleRuns();
LocaleRuns(const LocaleRuns &other);
LocaleRuns &operator=(const LocaleRuns &other) { return *this; };
LocaleRuns &operator=(const LocaleRuns & /*other*/) { return *this; };
/**
* The address of this static class variable serves as this class's ID
@ -524,7 +524,7 @@ inline LocaleRuns::LocaleRuns()
// nothing else to do...
}
inline LocaleRuns::LocaleRuns(const LocaleRuns &other)
inline LocaleRuns::LocaleRuns(const LocaleRuns & /*other*/)
: RunArray(0), fLocales(NULL)
{
// nothing else to do...
@ -655,7 +655,7 @@ private:
ValueRuns();
ValueRuns(const ValueRuns &other);
ValueRuns &operator=(const ValueRuns &other) { return *this; };
ValueRuns &operator=(const ValueRuns & /*other*/) { return *this; };
/**
* The address of this static class variable serves as this class's ID
@ -672,7 +672,7 @@ inline ValueRuns::ValueRuns()
// nothing else to do...
}
inline ValueRuns::ValueRuns(const ValueRuns &other)
inline ValueRuns::ValueRuns(const ValueRuns & /*other*/)
: RunArray(0), fValues(NULL)
{
// nothing else to do...