From c2a1cdcd1f556ac10cbbaf195d9d33b803c38e7f Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 19 Jun 2019 19:55:54 +1000 Subject: [PATCH] Remove some unused stuff --- src/Http.c | 3 +++ src/String.c | 17 ----------------- src/String.h | 2 -- src/TexturePack.c | 4 ++-- src/TexturePack.h | 4 ---- 5 files changed, 5 insertions(+), 25 deletions(-) diff --git a/src/Http.c b/src/Http.c index 8fb9e1fcb..77836ca15 100644 --- a/src/Http.c +++ b/src/Http.c @@ -303,6 +303,9 @@ static void Http_DownloadAsync(struct HttpRequest* req) { attr.requestDataSize = req->Size; } + /* TODO: Why does this break */ + /*static const char* headers[3] = { "cache-control", "max-age=0", NULL }; */ + /*attr.requestHeaders = headers; */ attr.attributes = EMSCRIPTEN_FETCH_LOAD_TO_MEMORY; attr.onsuccess = Http_FinishedAsync; attr.onerror = Http_FinishedAsync; diff --git a/src/String.c b/src/String.c index 383299eeb..8160bd24a 100644 --- a/src/String.c +++ b/src/String.c @@ -191,23 +191,6 @@ void String_AppendPaddedInt(String* str, int num, int minDigits) { } } -int String_MakeUInt64(uint64_t num, char* digits) { - int len = 0; - do { - digits[len] = '0' + (num % 10); num /= 10; len++; - } while (num > 0); - return len; -} - -void String_AppendUInt64(String* str, uint64_t num) { - char digits[STRING_INT_CHARS]; - int i, count = String_MakeUInt64(num, digits); - - for (i = count - 1; i >= 0; i--) { - String_Append(str, digits[i]); - } -} - void String_AppendFloat(String* str, float num, int fracDigits) { int i, whole, digit; double frac; diff --git a/src/String.h b/src/String.h index e85cfe318..b3ab2feab 100644 --- a/src/String.h +++ b/src/String.h @@ -99,8 +99,6 @@ CC_API void String_AppendInt(String* str, int num); CC_API void String_AppendUInt32(String* str, uint32_t num); /* Attempts to append the digits of an integer, padding left with 0. */ CC_API void String_AppendPaddedInt(String* str, int num, int minDigits); -/* Attempts to append the digits of an unsigned 64 bit integer. */ -CC_API void String_AppendUInt64(String* str, uint64_t num); /* Attempts to append the digits of a float as a decimal. */ /* NOTE: If the number is an integer, no decimal point is added. */ diff --git a/src/TexturePack.c b/src/TexturePack.c index bb612aea1..52f851b34 100644 --- a/src/TexturePack.c +++ b/src/TexturePack.c @@ -617,12 +617,12 @@ CC_NOINLINE static void TextureCache_SetEntry(const String* url, const String* d EntryList_Save(list); } -void TextureCache_SetETag(const String* url, const String* etag) { +static void TextureCache_SetETag(const String* url, const String* etag) { if (!etag->length) return; TextureCache_SetEntry(url, etag, &etagCache); } -void TextureCache_SetLastModified(const String* url, const String* time) { +static void TextureCache_SetLastModified(const String* url, const String* time) { if (!time->length) return; TextureCache_SetEntry(url, time, &lastModifiedCache); } diff --git a/src/TexturePack.h b/src/TexturePack.h index ecb974eba..e6a54e793 100644 --- a/src/TexturePack.h +++ b/src/TexturePack.h @@ -93,10 +93,6 @@ void TextureCache_GetLastModified(const String* url, String* time); void TextureCache_GetETag(const String* url, String* etag); /* Sets the cached data for the given url. */ void TextureCache_Set(const String* url, const uint8_t* data, uint32_t length); -/* Sets the cached ETag header for the given url. */ -void TextureCache_SetETag(const String* url, const String* etag); -/* Sets the cached Last-Modified header for the given url. */ -void TextureCache_SetLastModified(const String* url, const String* time); void TexturePack_ExtractZip_File(const String* filename); void TexturePack_ExtractDefault(void);