Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2014-11-23 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:51 +0300
commitf08f4dcc3c02464c17753b3feafcfe5243b9e236 (patch)
treeb0e1b15bc5368d92dff422e8ec0818564a2b00b8 /CPP/Common/MyMap.cpp
parent83f8ddcc5b2161e1e3c49666265257fca8aeb12c (diff)
9.349.34
Diffstat (limited to 'CPP/Common/MyMap.cpp')
-rw-r--r--[-rwxr-xr-x]CPP/Common/MyMap.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/CPP/Common/MyMap.cpp b/CPP/Common/MyMap.cpp
index 0ee11e8c..db95169e 100755..100644
--- a/CPP/Common/MyMap.cpp
+++ b/CPP/Common/MyMap.cpp
@@ -6,7 +6,7 @@
static const unsigned kNumBitsMax = sizeof(UInt32) * 8;
-static UInt32 GetSubBits(UInt32 value, unsigned startPos, unsigned numBits)
+static UInt32 GetSubBits(UInt32 value, unsigned startPos, unsigned numBits) throw()
{
if (startPos == sizeof(value) * 8)
return 0;
@@ -33,7 +33,7 @@ bool CMap32::Find(UInt32 key, UInt32 &valueRes) const
}
}
- int cur = 0;
+ unsigned cur = 0;
unsigned bitPos = kNumBitsMax;
for (;;)
{
@@ -47,7 +47,7 @@ bool CMap32::Find(UInt32 key, UInt32 &valueRes) const
valueRes = n.Values[bit];
return (key == n.Keys[bit]);
}
- cur = (int)n.Keys[bit];
+ cur = (unsigned)n.Keys[bit];
}
}
@@ -74,7 +74,7 @@ bool CMap32::Set(UInt32 key, UInt32 value)
return true;
}
unsigned i = kNumBitsMax - 1;
- for (;GetSubBit(key, i) == GetSubBit(n.Key, i); i--);
+ for (; GetSubBit(key, i) == GetSubBit(n.Key, i); i--);
n.Len = (UInt16)(kNumBitsMax - (1 + i));
unsigned newBit = GetSubBit(key, i);
n.Values[newBit] = value;
@@ -83,7 +83,7 @@ bool CMap32::Set(UInt32 key, UInt32 value)
}
}
- int cur = 0;
+ unsigned cur = 0;
unsigned bitPos = kNumBitsMax;
for (;;)
{
@@ -117,7 +117,7 @@ bool CMap32::Set(UInt32 key, UInt32 value)
return true;
}
unsigned i = bitPos - 1;
- for (;GetSubBit(key, i) == GetSubBit(n.Keys[bit], i); i--);
+ for (; GetSubBit(key, i) == GetSubBit(n.Keys[bit], i); i--);
CNode e2;
@@ -135,6 +135,6 @@ bool CMap32::Set(UInt32 key, UInt32 value)
Nodes.Add(e2);
return false;
}
- cur = (int)n.Keys[bit];
+ cur = (unsigned)n.Keys[bit];
}
}