From 5412ab66ba15b21854fb643abdae3c9bab450b19 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 27 Jan 2022 21:40:18 +0800 Subject: [PATCH] Deprecating EOF Fix in FastLM. - Its mission is complete. All user-editable LM files are not parsed by FastLM. --- Source/Engine/LanguageModel/FastLM.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Source/Engine/LanguageModel/FastLM.cpp b/Source/Engine/LanguageModel/FastLM.cpp index 66b9418b..acdc9bd6 100644 --- a/Source/Engine/LanguageModel/FastLM.cpp +++ b/Source/Engine/LanguageModel/FastLM.cpp @@ -36,22 +36,6 @@ bool FastLM::open(const char *path) return false; } - fstream zfd(path); - zfd.seekg(-1,ios_base::end); - char z; - zfd.get(z); - if(z!='\n'){ - syslog(LOG_CONS, "REPORT: Core Language Data file is not ended with a new line.\n"); - syslog(LOG_CONS, "PROCEDURE: Trying to insert a new line as EOF before per-line check process.\n"); - ofstream zfdo(path, std::ios_base::app); - zfdo << std::endl; - zfdo.close(); - if (zfdo.fail()) { - syslog(LOG_CONS, "REPORT: Failed to append a newline to the data file. Insufficient Privileges?\n"); - return false; - } - } - fd = ::open(path, O_RDONLY); if (fd == -1) { return false;