mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-04 13:44:33 +01:00
This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
93cebf538e
commit
6de969a304
103 changed files with 521 additions and 385 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "breakpad_googletest_includes.h"
|
||||
#include "common/using_std_string.h"
|
||||
|
||||
#if !defined(__ANDROID__)
|
||||
#define TEMPDIR "/tmp"
|
||||
|
|
@ -59,12 +60,12 @@ class AutoTempDir {
|
|||
DeleteRecursively(path_);
|
||||
}
|
||||
|
||||
const std::string& path() const {
|
||||
const string& path() const {
|
||||
return path_;
|
||||
}
|
||||
|
||||
private:
|
||||
void DeleteRecursively(const std::string& path) {
|
||||
void DeleteRecursively(const string& path) {
|
||||
// First remove any files in the dir
|
||||
DIR* dir = opendir(path.c_str());
|
||||
if (!dir)
|
||||
|
|
@ -74,7 +75,7 @@ class AutoTempDir {
|
|||
while ((entry = readdir(dir)) != NULL) {
|
||||
if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
|
||||
continue;
|
||||
std::string entry_path = path + "/" + entry->d_name;
|
||||
string entry_path = path + "/" + entry->d_name;
|
||||
struct stat stats;
|
||||
EXPECT_TRUE(lstat(entry_path.c_str(), &stats) == 0);
|
||||
if (S_ISDIR(stats.st_mode))
|
||||
|
|
@ -90,7 +91,7 @@ class AutoTempDir {
|
|||
AutoTempDir(const AutoTempDir&);
|
||||
AutoTempDir& operator=(const AutoTempDir&);
|
||||
|
||||
std::string path_;
|
||||
string path_;
|
||||
};
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue