projects
/
quix0rs-blobwars.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b11cf27
)
Remove unused hash calculation from fileExists().
author
Guus Sliepen
<guus@debian.org>
Sun, 26 Dec 2010 13:40:14 +0000
(14:40 +0100)
committer
Guus Sliepen
<guus@debian.org>
Sun, 26 Dec 2010 13:40:14 +0000
(14:40 +0100)
src/CPak.cpp
patch
|
blob
|
history
diff --git
a/src/CPak.cpp
b/src/CPak.cpp
index 8d171e83d0c8ac66a858e7e0adaf6307d8c6f6fd..0d8c0fa3415dc183bcee03c223f1e344b14dbf16 100644
(file)
--- a/
src/CPak.cpp
+++ b/
src/CPak.cpp
@@
-149,14
+149,6
@@
bool Pak::unpack(const char *filename, unsigned char **buffer)
bool Pak::fileExists(const char *filename)
{
- unsigned int hashcode = 0;
- unsigned int length = strlen(filename);
-
- for (unsigned int i = 0 ; i < length ; i++)
- {
- hashcode = hashcode + (filename[i] * 31 ^ (length - i));
- }
-
for (unsigned int i = 0 ; i < numberOfFiles ; i++)
{
if (strcmp(fd[i].filename, filename) == 0)