From aac87fc2cfb35bc18d96eb463cab3cebc895ac9f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 13 Sep 2020 09:45:37 +0200 Subject: [PATCH] - another unused function. --- source/build/include/scriptfile.h | 1 - source/build/src/scriptfile.cpp | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/source/build/include/scriptfile.h b/source/build/include/scriptfile.h index 0562a1732..06cbc7326 100644 --- a/source/build/include/scriptfile.h +++ b/source/build/include/scriptfile.h @@ -22,7 +22,6 @@ int32_t scriptfile_getlinum(const scriptfile *sf, const char *ptr); int32_t scriptfile_getbraces(scriptfile *sf, char **braceend); scriptfile *scriptfile_fromfile(const char *fn); -scriptfile *scriptfile_fromstring(const char *string); void scriptfile_close(scriptfile *sf); int scriptfile_eof(scriptfile *sf); diff --git a/source/build/src/scriptfile.cpp b/source/build/src/scriptfile.cpp index 0cae0e0bc..75646b6aa 100644 --- a/source/build/src/scriptfile.cpp +++ b/source/build/src/scriptfile.cpp @@ -317,24 +317,6 @@ scriptfile *scriptfile_fromfile(const char *fn) return sf; } -scriptfile *scriptfile_fromstring(const char *string) -{ - if (!string) return nullptr; - - uint32_t flen = strlen(string); - char * tx = (char *)Xmalloc(flen + 2); - - scriptfile *sf = (scriptfile *)Xmalloc(sizeof(scriptfile)); - - memcpy(tx, string, flen); - tx[flen] = tx[flen+1] = 0; - - scriptfile_preparse(sf,tx,flen); - sf->filename = NULL; - - return sf; -} - void scriptfile_close(scriptfile *sf) { if (!sf) return;