From 6de969a3040fa31ba60302c66613d1d2e6f5a730 Mon Sep 17 00:00:00 2001 From: "ivan.penkov@gmail.com" Date: Thu, 28 Jun 2012 22:46:01 +0000 Subject: 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 --- src/common/tests/auto_tempdir.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/common/tests') 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 #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 -- cgit v1.2.1