diff options
author | ivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-06-28 22:46:01 +0000 |
---|---|---|
committer | ivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-06-28 22:46:01 +0000 |
commit | 6de969a3040fa31ba60302c66613d1d2e6f5a730 (patch) | |
tree | aad9de34e00834709440f01cb0f54e315989490e /src/common/tests/auto_tempdir.h | |
parent | Fix Android build of client library (diff) | |
download | breakpad-6de969a3040fa31ba60302c66613d1d2e6f5a730.tar.xz |
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
Diffstat (limited to 'src/common/tests/auto_tempdir.h')
-rw-r--r-- | src/common/tests/auto_tempdir.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/tests/auto_tempdir.h b/src/common/tests/auto_tempdir.h index ccfd81bc..9c84177c 100644 --- a/src/common/tests/auto_tempdir.h +++ b/src/common/tests/auto_tempdir.h @@ -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 |