mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Clean up unnecessary exports and add static keywords
This patch cleans up unnecessary exports from header files (there were only a few), as well as adds the static keyword to all symbols that aren't exported and are specific to a file. This helps the linker out in not doing any unnecessary work, speeding it up and avoiding silent symbol conflicts (otherwise two symbols with the same name (and type/signature in C++) would quietly resolve as okay by the linker).
This commit is contained in:
@@ -28,12 +28,12 @@
|
||||
#define MAX_PATH PATH_MAX
|
||||
#endif
|
||||
|
||||
char saveDir[MAX_PATH] = {'\0'};
|
||||
char levelDir[MAX_PATH] = {'\0'};
|
||||
static char saveDir[MAX_PATH] = {'\0'};
|
||||
static char levelDir[MAX_PATH] = {'\0'};
|
||||
|
||||
void PLATFORM_getOSDirectory(char* output);
|
||||
void PLATFORM_migrateSaveData(char* output);
|
||||
void PLATFORM_copyFile(const char *oldLocation, const char *newLocation);
|
||||
static void PLATFORM_getOSDirectory(char* output);
|
||||
static void PLATFORM_migrateSaveData(char* output);
|
||||
static void PLATFORM_copyFile(const char *oldLocation, const char *newLocation);
|
||||
|
||||
int FILESYSTEM_init(char *argvZero, char* baseDir, char *assetsPath)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ std::vector<std::string> FILESYSTEM_getLevelDirFileNames()
|
||||
return list;
|
||||
}
|
||||
|
||||
void PLATFORM_getOSDirectory(char* output)
|
||||
static void PLATFORM_getOSDirectory(char* output)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
/* This block is here for compatibility, do not touch it! */
|
||||
@@ -358,7 +358,7 @@ void PLATFORM_getOSDirectory(char* output)
|
||||
#endif
|
||||
}
|
||||
|
||||
void PLATFORM_migrateSaveData(char* output)
|
||||
static void PLATFORM_migrateSaveData(char* output)
|
||||
{
|
||||
char oldLocation[MAX_PATH];
|
||||
char newLocation[MAX_PATH];
|
||||
@@ -521,7 +521,7 @@ void PLATFORM_migrateSaveData(char* output)
|
||||
#endif
|
||||
}
|
||||
|
||||
void PLATFORM_copyFile(const char *oldLocation, const char *newLocation)
|
||||
static void PLATFORM_copyFile(const char *oldLocation, const char *newLocation)
|
||||
{
|
||||
char *data;
|
||||
size_t length, bytes_read, bytes_written;
|
||||
|
||||
Reference in New Issue
Block a user