mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
renamed g_in_dir in local variable style
This commit is contained in:
parent
b6abae3356
commit
5449e2f0df
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "helper.h"
|
#include "helper.h"
|
||||||
|
|
||||||
std::string GetImagesDir() {
|
std::string GetImagesFolder() {
|
||||||
std::string cwd = sandbox2::file_util::fileops::GetCWD();
|
std::string cwd = sandbox2::file_util::fileops::GetCWD();
|
||||||
auto find = cwd.rfind("/build");
|
auto find = cwd.rfind("/build");
|
||||||
if (find == std::string::npos) {
|
if (find == std::string::npos) {
|
||||||
|
@ -28,9 +28,9 @@ std::string GetImagesDir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetFilePath(const std::string& filename) {
|
std::string GetFilePath(const std::string& filename) {
|
||||||
static std::string* g_in_dir = nullptr;
|
static std::string* images_folder_path = nullptr;
|
||||||
if (!g_in_dir) {
|
if (!images_folder_path) {
|
||||||
g_in_dir = new std::string(GetImagesDir());
|
images_folder_path = new std::string(GetImagesFolder());
|
||||||
}
|
}
|
||||||
return sandbox2::file::JoinPath(*g_in_dir, filename);
|
return sandbox2::file::JoinPath(*images_folder_path, filename);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user