mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Remove dangling 'using std::string'
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user