r20115 by jghali - fix several msvc compiler warnings
scribus-commit
scribus-commit at lists.scribus.net
Fri May 22 22:09:25 UTC 2015
Author: jghali
Date: Fri May 22 22:09:25 2015
New Revision: 20115
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20115
Log:
fix several msvc compiler warnings
Modified:
trunk/Scribus/scribus/fonts/cff.cpp
trunk/Scribus/scribus/fonts/sfnt.cpp
Modified: trunk/Scribus/scribus/fonts/cff.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20115&path=/trunk/Scribus/scribus/fonts/cff.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/cff.cpp (original)
+++ trunk/Scribus/scribus/fonts/cff.cpp Fri May 22 22:09:25 2015
@@ -614,7 +614,7 @@
QList<CFF_Number> stack;
uint pos = 0;
- while (pos < dict.length())
+ while (pos < (uint) dict.length())
{
CFF_Number num = parseDictElement(dict, pos);
if (num.type == cff_varnt_Operator)
@@ -919,7 +919,7 @@
}
break;
case 1:
- while (result.length() < nGlyphs)
+ while ((uint) result.length() < nGlyphs)
{
first = readCard(pos);
pos += 2;
@@ -931,7 +931,7 @@
}
break;
case 2:
- while (result.length() < nGlyphs)
+ while ((uint) result.length() < nGlyphs)
{
first = readCard(pos);
pos += 2;
Modified: trunk/Scribus/scribus/fonts/sfnt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20115&path=/trunk/Scribus/scribus/fonts/sfnt.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/sfnt.cpp (original)
+++ trunk/Scribus/scribus/fonts/sfnt.cpp Fri May 22 22:09:25 2015
@@ -317,7 +317,7 @@
QString PostTable::nameFor(uint glyph) const
{
- if (glyph < names.length())
+ if (glyph < (uint) names.length())
{
return names[glyph];
}
@@ -378,7 +378,7 @@
uint nrOfGlyphs = sfnt::word16(postData, ttf_post_header_length);
uint stringPos = ttf_post_header_length + 2 + 2 * nrOfGlyphs;
- while (stringPos < postData.length())
+ while (stringPos < (uint) postData.length())
{
int strLen = byte(postData, stringPos);
++stringPos;
@@ -386,7 +386,7 @@
stringPos += strLen;
}
uint pos = ttf_post_header_length + 2;
- for (int gid = 0; gid < nrOfGlyphs; ++gid)
+ for (uint gid = 0; gid < nrOfGlyphs; ++gid)
{
uint nameIndex = sfnt::word16(postData, pos);
pos += 2;
@@ -645,7 +645,7 @@
result.append(std::pair<qint16,quint16>(advance, leftSideBearing));
pos += 4;
}
- while (pos < hmtx.length())
+ while (pos < (uint) hmtx.length())
{
leftSideBearing = word16(hmtx, pos);
qDebug() << pos << "hmtx =" << advance << leftSideBearing;
@@ -680,7 +680,7 @@
uint startOfUnicodeTable = 0;
uint format = 0;
uint pos = ttf_cmap_encodings;
- for (int i = 0; i < numSubtables; ++i)
+ for (uint i = 0; i < numSubtables; ++i)
{
uint platform = word16(cmaps, pos + ttf_cmap_encoding_platformID);
uint encoding = word16(cmaps, pos + ttf_cmap_encoding_platformSpecificID);
@@ -709,7 +709,7 @@
uint idRangeOffsets = idDeltas + segCount2 + ttf_cmap4_IdRangeOffsets_IdDeltas;
//uint glyphIndexArray = idRangeOffsets + segCount2 + ttf_cmap4_GlyphIds_IdRangeOffsets;
- for (int seg = 0; seg < segCount2; seg+=2)
+ for (uint seg = 0; seg < segCount2; seg+=2)
{
uint start = word16(cmaps, startCodes + seg);
uint end = word16(cmaps, endCodes + seg);
@@ -748,7 +748,7 @@
uint firstCode = word16(cmaps, startOfUnicodeTable + ttf_cmap6_firstCode);
uint count = word16(cmaps, startOfUnicodeTable + ttf_cmap6_entryCount);
pos = word16(cmaps, startOfUnicodeTable + ttf_cmap6_glyphIndexArray);
- for (int i = 0; i < count; ++i)
+ for (uint i = 0; i < count; ++i)
{
result[firstCode + i] = word16(cmaps, pos);
pos += 2;
@@ -824,7 +824,7 @@
quint16 end = start;
quint16 next;
++pos;
- while (pos < chars.length() && (next = chars[pos]) == end+1)
+ while (pos < (uint) chars.length() && (next = chars[pos]) == end+1)
{
end = next;
if (delta != (quint16)(cmap[chars[pos]] - next))
@@ -838,7 +838,7 @@
idDeltas.append(delta);
rangeOffsets.append(rangeOffset);
}
- while(pos < chars.length());
+ while (pos < (uint) chars.length());
startCodes.append(0xFFFF);
endCodes.append(0xFFFF);
More information about the scribus-commit
mailing list