From 224b1877f40ecf437adac5552e21c22a4fc9290a Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 2 Sep 2019 15:20:19 +0100 Subject: [PATCH] Remove dangling 'using std::string' --- renderdoc/os/posix/ggp/ggp_stringio.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/renderdoc/os/posix/ggp/ggp_stringio.cpp b/renderdoc/os/posix/ggp/ggp_stringio.cpp index 7a10c3a7d..3c169348a 100644 --- a/renderdoc/os/posix/ggp/ggp_stringio.cpp +++ b/renderdoc/os/posix/ggp/ggp_stringio.cpp @@ -37,8 +37,6 @@ #include "os/os_specific.h" #include "strings/string_utils.h" -using std::string; - namespace Keyboard { void Init() @@ -66,12 +64,12 @@ bool GetKeyState(int key) namespace FileIO { -string GetTempRootPath() +std::string GetTempRootPath() { return "/tmp"; } -string GetAppFolderFilename(const string &filename) +std::string GetAppFolderFilename(const std::string &filename) { const char *homedir = NULL; if(getenv("HOME") != NULL) @@ -85,29 +83,29 @@ string GetAppFolderFilename(const string &filename) homedir = getpwuid(getuid())->pw_dir; } - string ret = string(homedir) + "/.renderdoc/"; + std::string ret = std::string(homedir) + "/.renderdoc/"; mkdir(ret.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); return ret + filename; } -void GetExecutableFilename(string &selfName) +void GetExecutableFilename(std::string &selfName) { char path[512] = {0}; readlink("/proc/self/exe", path, 511); - selfName = string(path); + selfName = std::string(path); } int LibraryLocator = 42; -void GetLibraryFilename(string &selfName) +void GetLibraryFilename(std::string &selfName) { // this is a hack, but the only reliable way to find the absolute path to the library. // dladdr would be fine but it returns the wrong result for symbols in the library - string librenderdoc_path; + std::string librenderdoc_path; FILE *f = fopen("/proc/self/maps", "r"); @@ -182,7 +180,7 @@ void GetLibraryFilename(string &selfName) char *end = strchr(c, '\n'); if(end) - librenderdoc_path = string(c, end - c); + librenderdoc_path = std::string(c, end - c); } delete[] map_string;