Browse Source

Update4 for MSVC10

Fix for loop scope problems.
msvc10
Skoader 12 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) {
Val borrow = 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);
carry = HIGH(product);
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();
SetCount(count);
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);
borrow = (Val)((Val)0 - (Val)borrow);
}
@ -1330,7 +1332,8 @@ void BigNum::Sub (const BigNum & a, const BigNum & b) {
const unsigned bCount = b.Count();
GrowToCount(count, true);
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;
SetVal(index, (DVal)((DVal)a[index] - (DVal)bVal - (DVal)borrow), &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
// multiple internal spaces into only one space
unsigned nonSpaceChars = 0;
for (wchar *src = name, *dst = name; *src; ) {
wchar *dst = name;
for (wchar *src = name; *src; ) {
// Skip whitespace
while (*src && ICharIsSpace(*src))
src++;

Loading…
Cancel
Save