From: Guus Sliepen Date: Sun, 26 Dec 2010 13:40:14 +0000 (+0100) Subject: Remove unused hash calculation from fileExists(). X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5190d4694b6ea01a9e3c0ad70bbcd5455ae72857;p=quix0rs-blobwars.git Remove unused hash calculation from fileExists(). --- diff --git a/src/CPak.cpp b/src/CPak.cpp index 8d171e8..0d8c0fa 100644 --- 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)