Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: src/utils.cc

Issue 646007: Kill some unused code. (Closed)
Patch Set: some more Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils.h ('k') | test/cctest/test-utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.cc
diff --git a/src/utils.cc b/src/utils.cc
index 374385b67b1f1799a08efc1a3f5b10db5b09c2c0..45a4cd60f8d830fc153c6876a6dd867975c6852f 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -51,43 +51,6 @@ uint32_t RoundUpToPowerOf2(uint32_t x) {
}
-byte* EncodeInt(byte* p, int x) {
- while (x < -64 || x >= 64) {
- *p++ = static_cast<byte>(x & 127);
- x = ArithmeticShiftRight(x, 7);
- }
- // -64 <= x && x < 64
- *p++ = static_cast<byte>(x + 192);
- return p;
-}
-
-
-byte* DecodeInt(byte* p, int* x) {
- int r = 0;
- unsigned int s = 0;
- byte b = *p++;
- while (b < 128) {
- r |= static_cast<int>(b) << s;
- s += 7;
- b = *p++;
- }
- // b >= 128
- *x = r | ((static_cast<int>(b) - 192) << s);
- return p;
-}
-
-
-byte* EncodeUnsignedIntBackward(byte* p, unsigned int x) {
- while (x >= 128) {
- *--p = static_cast<byte>(x & 127);
- x = x >> 7;
- }
- // x < 128
- *--p = static_cast<byte>(x + 128);
- return p;
-}
-
-
// Thomas Wang, Integer Hash Functions.
// http://www.concentric.net/~Ttwang/tech/inthash.htm
uint32_t ComputeIntegerHash(uint32_t key) {
« no previous file with comments | « src/utils.h ('k') | test/cctest/test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698