From 5190d4694b6ea01a9e3c0ad70bbcd5455ae72857 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 26 Dec 2010 14:40:14 +0100 Subject: [PATCH] Remove unused hash calculation from fileExists(). --- src/CPak.cpp | 8 -------- 1 file changed, 8 deletions(-) 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) -- 2.39.5