From 9924913e4ab044f02f151043f0b080c1e757b3e5 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Sat, 18 Apr 2020 20:05:51 +0200 Subject: [PATCH] Move implementation to GetConfigName static function Old interface Cross::GetPlatformConfigName is retained for backwards compatibility for now. --- src/misc/cross.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/misc/cross.cpp b/src/misc/cross.cpp index 0518e543..08efe0a9 100644 --- a/src/misc/cross.cpp +++ b/src/misc/cross.cpp @@ -41,6 +41,11 @@ #include "support.h" +static std::string GetConfigName() +{ + return "dosbox-" CONF_BRAND ".conf"; +} + #ifndef WIN32 std::string cached_conf_path; @@ -63,13 +68,6 @@ static bool CreateDirectories(const std::string &path) return (mkdir(path.c_str(), 0700) == 0); } -static std::string GetConfigName() -{ - std::string file_name; - Cross::GetPlatformConfigName(file_name); - return file_name; -} - static std::string ResolveHome(std::string tilde_path) { Cross::ResolveHomedir(tilde_path); @@ -154,7 +152,7 @@ void Cross::GetPlatformConfigDir(std::string& in) { void Cross::GetPlatformConfigName(std::string &in) { - in = "dosbox-" CONF_BRAND ".conf"; + in = GetConfigName(); } void Cross::CreatePlatformConfigDir(std::string &in)