From 310f77d96a645f87b7fd65820b6ddc8545cdf29c Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 7 Jan 2014 14:24:41 -0500 Subject: [PATCH] Consolidate FileExists usage in logic bin (bug 5931, r=asherkin). --- core/logic/intercom.h | 1 - core/logic/smn_filesystem.cpp | 2 +- core/logic_bridge.cpp | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/core/logic/intercom.h b/core/logic/intercom.h index a900816f..bb8fb9d2 100644 --- a/core/logic/intercom.h +++ b/core/logic/intercom.h @@ -251,7 +251,6 @@ struct sm_core_t void (*Log)(const char*, ...); void (*LogToFile)(FILE *fp, const char*, ...); void (*LogToGame)(const char *message); - bool (*FileExists)(const char *path); const char * (*GetCvarString)(ConVar*); size_t (*Format)(char*, size_t, const char*, ...); size_t (*FormatArgs)(char*, size_t, const char*,va_list ap); diff --git a/core/logic/smn_filesystem.cpp b/core/logic/smn_filesystem.cpp index e3c76de7..11f52093 100644 --- a/core/logic/smn_filesystem.cpp +++ b/core/logic/smn_filesystem.cpp @@ -322,7 +322,7 @@ static cell_t sm_FileExists(IPluginContext *pContext, const cell_t *params) if (params[0] >= 2 && params[2] == 1) { - return smcore.FileExists(name) ? 1 : 0; + return smcore.filesystem->FileExists(name) ? 1 : 0; } char realpath[PLATFORM_MAX_PATH]; diff --git a/core/logic_bridge.cpp b/core/logic_bridge.cpp index 0b3abdb9..a047943b 100644 --- a/core/logic_bridge.cpp +++ b/core/logic_bridge.cpp @@ -187,11 +187,6 @@ static void log_to_game(const char *message) Engine_LogPrintWrapper(message); } -static bool file_exists(const char *path) -{ - return basefilesystem->FileExists(path); -} - static const char *get_cvar_string(ConVar* cvar) { return cvar->GetString(); @@ -431,7 +426,6 @@ static sm_core_t core_bridge = log_message, log_to_file, log_to_game, - file_exists, get_cvar_string, UTIL_Format, UTIL_FormatArgs,