From e05cedfc0d72c4a89b59311a3d97d77150ef5f1a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 20 Dec 2018 12:40:38 +0100 Subject: [PATCH] removed the unused DefaultExtension variant taking a char *. --- src/cmdlib.cpp | 27 --------------------------- src/cmdlib.h | 1 - 2 files changed, 28 deletions(-) diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp index af89cb352..b313f5691 100644 --- a/src/cmdlib.cpp +++ b/src/cmdlib.cpp @@ -195,33 +195,6 @@ bool DirEntryExists(const char *pathname, bool *isdir) return res; } -//========================================================================== -// -// DefaultExtension -- char array version -// -// Appends the extension to a pathname if it does not already have one. -// -//========================================================================== - -void DefaultExtension (char *path, const char *extension) -{ - char *src; -// -// if path doesn't have a .EXT, append extension -// (extension should include the .) -// - src = path + strlen(path) - 1; - - while (src != path && !IsSeperator(*src)) - { - if (*src == '.') - return; // it has an extension - src--; - } - - strcat (path, extension); -} - //========================================================================== // // DefaultExtension -- FString version diff --git a/src/cmdlib.h b/src/cmdlib.h index 7a5fa21a6..d187b43cf 100644 --- a/src/cmdlib.h +++ b/src/cmdlib.h @@ -27,7 +27,6 @@ extern FString progdir; void FixPathSeperator (char *path); static void inline FixPathSeperator (FString &path) { path.ReplaceChars('\\', '/'); } -void DefaultExtension (char *path, const char *extension); void DefaultExtension (FString &path, const char *extension); FString ExtractFilePath (const char *path);