From 4f2d6353c92da24a6296a340229604f6d613a0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neven=20Pra=C5=A1nikar?= Date: Tue, 28 Jan 2025 12:13:33 +0100 Subject: [PATCH] [#10] Fix a few more errors. --- source/game/scripts/manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/game/scripts/manager.cpp b/source/game/scripts/manager.cpp index 4d9b5f0..34c76d1 100644 --- a/source/game/scripts/manager.cpp +++ b/source/game/scripts/manager.cpp @@ -369,12 +369,12 @@ void preloadScript(const std::string& filename) { } bool matchesCompilerVersion(const std::string& minVersion, const std::string& maxVersion) { - if(std::strlen(minVersion)) { + if(minVersion.length()) { const int version = std::stoi(minVersion); if(OSR_COMPILER_VERSION < version) return false; } - if(std::strlen(maxVersion)) { + if(maxVersion.length()) { const int version = std::stoi(maxVersion); if(OSR_COMPILER_VERSION > version) return false; @@ -414,7 +414,7 @@ void parseFile(Manager* man, File& fl, const std::string& filename, bool cacheFi for(auto iLine = lines.begin(), end = lines.end(); iLine != end; ++iLine) { const std::string& originalLine = *iLine; // I'm not actually sure if this amounts to a meaningful optimization... or any optimization. - std:string& line = originalLine; + std::string& line = originalLine; auto lineStart = line.find_first_not_of(" \t"); if(lineStart == std::string::npos) {