From e01a20fd6445656a8640bf9d79aed9eeff372e22 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 8 Jun 2018 13:09:07 -0400 Subject: [PATCH] Fix asset.cpp variable names --- src/asset.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/asset.cpp b/src/asset.cpp index 03fab559..f73882b1 100644 --- a/src/asset.cpp +++ b/src/asset.cpp @@ -39,11 +39,11 @@ void assetInit(bool devMode) { CFBundleRef bundle = CFBundleGetMainBundle(); assert(bundle); CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(bundle); - char buf[PATH_MAX]; - Boolean success = CFURLGetFileSystemRepresentation(resourcesUrl, TRUE, (UInt8*) buf, sizeof(buf)); + char resourcesBuf[PATH_MAX]; + Boolean success = CFURLGetFileSystemRepresentation(resourcesUrl, TRUE, (UInt8*) resourcesBuf, sizeof(resourcesBuf)); assert(success); CFRelease(resourcesUrl); - globalDir = buf; + globalDir = resourcesBuf; // Get home directory struct passwd *pw = getpwuid(getuid()); @@ -52,17 +52,17 @@ void assetInit(bool devMode) { localDir += "/Documents/Rack"; #endif #if ARCH_WIN - char buf[MAX_PATH]; - DWORD length = GetModuleFileName(NULL, buf, sizeof(buf)); + char moduleBuf[MAX_PATH]; + DWORD length = GetModuleFileName(NULL, moduleBuf, sizeof(moduleBuf)); assert(length > 0); - PathRemoveFileSpec(buf); - globalDir = buf; + PathRemoveFileSpec(moduleBuf); + globalDir = moduleBuf; // Get "My Documents" folder - char buf[MAX_PATH]; - HRESULT result = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, buf); + char documentsBuf[MAX_PATH]; + HRESULT result = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, documentsBuf); assert(result == S_OK); - localDir = buf; + localDir = documentsBuf; localDir += "/Rack"; #endif #if ARCH_LIN @@ -70,13 +70,13 @@ void assetInit(bool devMode) { globalDir = "."; // Get home directory - const char *home = getenv("HOME"); - if (!home) { + const char *homeBuf = getenv("HOME"); + if (!homeBuf) { struct passwd *pw = getpwuid(getuid()); assert(pw); - home = pw->pw_dir; + homeBuf = pw->pw_dir; } - localDir = home; + localDir = homeBuf; localDir += "/.Rack"; #endif }