Browse Source

Update4 for MSVC10

Fix for loop scope problems.
msvc10
Skoader 13 years ago
parent
commit
7a501c1b1f
  1. 9
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp
  2. 3
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

9
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp

@ -337,7 +337,8 @@ void BigNum::DivNormalized (const BigNum & a, const BigNum & b, BigNum * remaind
if (quotient) { if (quotient) {
Val borrow = 0; Val borrow = 0;
Val carry = 0; Val carry = 0;
for (unsigned denomIndex = 0; denomIndex != denomCount; ++denomIndex) { unsigned denomIndex = 0;
for (; denomIndex != denomCount; ++denomIndex) {
DVal product = (DVal)(Mul((*denom)[denomIndex], quotient) + carry); DVal product = (DVal)(Mul((*denom)[denomIndex], quotient) + carry);
carry = HIGH(product); carry = HIGH(product);
numer->SetVal(quotientIndex + denomIndex, (DVal)((DVal)(*numer)[quotientIndex + denomIndex] - (DVal)LOW(product) - (DVal)borrow), &borrow); numer->SetVal(quotientIndex + denomIndex, (DVal)((DVal)(*numer)[quotientIndex + denomIndex] - (DVal)LOW(product) - (DVal)borrow), &borrow);
@ -1313,7 +1314,8 @@ void BigNum::Sub (const BigNum & a, Val b) {
const unsigned count = a.Count(); const unsigned count = a.Count();
SetCount(count); SetCount(count);
Val borrow = b; Val borrow = b;
for (unsigned index = 0; index < count; ++index) { unsigned index = 0;
for (; index < count; ++index) {
SetVal(index, (DVal)((DVal)a[index] - (DVal)borrow), &borrow); SetVal(index, (DVal)((DVal)a[index] - (DVal)borrow), &borrow);
borrow = (Val)((Val)0 - (Val)borrow); borrow = (Val)((Val)0 - (Val)borrow);
} }
@ -1330,7 +1332,8 @@ void BigNum::Sub (const BigNum & a, const BigNum & b) {
const unsigned bCount = b.Count(); const unsigned bCount = b.Count();
GrowToCount(count, true); GrowToCount(count, true);
Val borrow = 0; Val borrow = 0;
for (unsigned index = 0; index < count; ++index) { unsigned index = 0;
for (; index < count; ++index) {
Val bVal = (index < bCount) ? b[index] : (Val)0; Val bVal = (index < bCount) ? b[index] : (Val)0;
SetVal(index, (DVal)((DVal)a[index] - (DVal)bVal - (DVal)borrow), &borrow); SetVal(index, (DVal)((DVal)a[index] - (DVal)bVal - (DVal)borrow), &borrow);
borrow = (Val)((Val)0 - (Val)borrow); borrow = (Val)((Val)0 - (Val)borrow);

3
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -1241,7 +1241,8 @@ static ENetError FixupPlayerName (wchar * name) {
// Trim leading and trailing whitespace and convert // Trim leading and trailing whitespace and convert
// multiple internal spaces into only one space // multiple internal spaces into only one space
unsigned nonSpaceChars = 0; unsigned nonSpaceChars = 0;
for (wchar *src = name, *dst = name; *src; ) { wchar *dst = name;
for (wchar *src = name; *src; ) {
// Skip whitespace // Skip whitespace
while (*src && ICharIsSpace(*src)) while (*src && ICharIsSpace(*src))
src++; src++;

Loading…
Cancel
Save