Remove some unused stuff

This commit is contained in:
UnknownShadow200 2019-06-19 19:55:54 +10:00
parent 6374b2afbd
commit c2a1cdcd1f
5 changed files with 5 additions and 25 deletions

View File

@ -303,6 +303,9 @@ static void Http_DownloadAsync(struct HttpRequest* req) {
attr.requestDataSize = req->Size; 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.attributes = EMSCRIPTEN_FETCH_LOAD_TO_MEMORY;
attr.onsuccess = Http_FinishedAsync; attr.onsuccess = Http_FinishedAsync;
attr.onerror = Http_FinishedAsync; attr.onerror = Http_FinishedAsync;

View File

@ -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) { void String_AppendFloat(String* str, float num, int fracDigits) {
int i, whole, digit; int i, whole, digit;
double frac; double frac;

View File

@ -99,8 +99,6 @@ CC_API void String_AppendInt(String* str, int num);
CC_API void String_AppendUInt32(String* str, uint32_t num); CC_API void String_AppendUInt32(String* str, uint32_t num);
/* Attempts to append the digits of an integer, padding left with 0. */ /* Attempts to append the digits of an integer, padding left with 0. */
CC_API void String_AppendPaddedInt(String* str, int num, int minDigits); 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. */ /* Attempts to append the digits of a float as a decimal. */
/* NOTE: If the number is an integer, no decimal point is added. */ /* NOTE: If the number is an integer, no decimal point is added. */

View File

@ -617,12 +617,12 @@ CC_NOINLINE static void TextureCache_SetEntry(const String* url, const String* d
EntryList_Save(list); 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; if (!etag->length) return;
TextureCache_SetEntry(url, etag, &etagCache); 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; if (!time->length) return;
TextureCache_SetEntry(url, time, &lastModifiedCache); TextureCache_SetEntry(url, time, &lastModifiedCache);
} }

View File

@ -93,10 +93,6 @@ void TextureCache_GetLastModified(const String* url, String* time);
void TextureCache_GetETag(const String* url, String* etag); void TextureCache_GetETag(const String* url, String* etag);
/* Sets the cached data for the given url. */ /* Sets the cached data for the given url. */
void TextureCache_Set(const String* url, const uint8_t* data, uint32_t length); 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_ExtractZip_File(const String* filename);
void TexturePack_ExtractDefault(void); void TexturePack_ExtractDefault(void);