提交 2d66943f 编写于 作者: J Jonathan Scruggs

Add signed char keyword

On PowerPC and PowerPC64 systems, 'char' is unsigned by default.
Can be reproduced by using the -funsigned-char flag for gcc.
Adding the signed keyword adds compatibility on these systems.

Signed-off by: Jonathan Scruggs <j.scruggs@gmail.com>
上级 b48d75c4
......@@ -32,7 +32,7 @@ namespace COLLADABU
const char HEX2DEC[256] =
const signed char HEX2DEC[256] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/* 0 */ -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
......@@ -107,9 +107,9 @@ namespace COLLADABU
{
if (*pSrc == '%')
{
char dec1, dec2;
if ( (char)(-1) != (dec1 = HEX2DEC[*(pSrc + 1)])
&& (char)(-1) != (dec2 = HEX2DEC[*(pSrc + 2)]))
signed char dec1, dec2;
if ( (signed char)(-1) != (dec1 = HEX2DEC[*(pSrc + 1)])
&& (signed char)(-1) != (dec2 = HEX2DEC[*(pSrc + 2)]))
{
*pEnd++ = (dec1 << 4) + dec2;
pSrc += 3;
......@@ -222,14 +222,14 @@ namespace COLLADABU
}
else
{
mUriString = copyFrom_.mUriString;
mOriginalURIString = copyFrom_.mOriginalURIString;
mScheme = copyFrom_.mScheme;
mAuthority = copyFrom_.mAuthority;
mPath = copyFrom_.mPath;
mQuery = copyFrom_.mQuery;
mFragment = copyFrom_.mFragment;
mIsValid = copyFrom_.mIsValid;
mUriString = copyFrom_.mUriString;
mOriginalURIString = copyFrom_.mOriginalURIString;
mScheme = copyFrom_.mScheme;
mAuthority = copyFrom_.mAuthority;
mPath = copyFrom_.mPath;
mQuery = copyFrom_.mQuery;
mFragment = copyFrom_.mFragment;
mIsValid = copyFrom_.mIsValid;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册