1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 04:39:45 +00:00

Minor adjustments to avoid needless trivial differences to H-uru/Plasma.

This commit is contained in:
Christian Walther
2012-05-01 11:17:52 +02:00
parent f5d00acdc5
commit b2f8d8c0f0
5 changed files with 14 additions and 12 deletions

View File

@ -162,12 +162,12 @@ bool GuidIsNil (const Uuid & uuid) {
const wchar * GuidToString (const Uuid & uuid, wchar * dst, unsigned chars) {
wchar * src;
RPC_STATUS s;
s = UuidToStringW( (GUID *) &uuid, (unsigned short **)&src );
s = UuidToStringW( (GUID *) &uuid, (unsigned short**)&src );
if (RPC_S_OK == s)
StrCopy(dst, src, chars);
else
StrCopy(dst, L"", chars);
RpcStringFreeW((unsigned short **)&src);
RpcStringFreeW( (unsigned short**)&src );
return dst;
}

View File

@ -337,8 +337,8 @@ void BigNum::DivNormalized (const BigNum & a, const BigNum & b, BigNum * remaind
if (quotient) {
Val borrow = 0;
Val carry = 0;
unsigned denomIndex = 0;
for (; denomIndex != denomCount; ++denomIndex) {
unsigned denomIndex;
for (denomIndex = 0; 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);
@ -1314,8 +1314,8 @@ void BigNum::Sub (const BigNum & a, Val b) {
const unsigned count = a.Count();
SetCount(count);
Val borrow = b;
unsigned index = 0;
for (; index < count; ++index) {
unsigned index;
for (index = 0; index < count; ++index) {
SetVal(index, (DVal)((DVal)a[index] - (DVal)borrow), &borrow);
borrow = (Val)((Val)0 - (Val)borrow);
}
@ -1332,8 +1332,8 @@ void BigNum::Sub (const BigNum & a, const BigNum & b) {
const unsigned bCount = b.Count();
GrowToCount(count, true);
Val borrow = 0;
unsigned index = 0;
for (; index < count; ++index) {
unsigned index;
for (index = 0; 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);