aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/testing')
-rw-r--r--src/google/protobuf/testing/file.cc2
-rw-r--r--src/google/protobuf/testing/googletest.cc6
-rw-r--r--src/google/protobuf/testing/googletest.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/google/protobuf/testing/file.cc b/src/google/protobuf/testing/file.cc
index f68aba9a..26cb0a67 100644
--- a/src/google/protobuf/testing/file.cc
+++ b/src/google/protobuf/testing/file.cc
@@ -57,7 +57,7 @@ namespace protobuf {
// them like we do below.
#endif
-#ifdef _MSC_VER
+#ifdef _WIN32
using google::protobuf::internal::win32::access;
using google::protobuf::internal::win32::chdir;
using google::protobuf::internal::win32::fopen;
diff --git a/src/google/protobuf/testing/googletest.cc b/src/google/protobuf/testing/googletest.cc
index 91f0ef89..8c89e5af 100644
--- a/src/google/protobuf/testing/googletest.cc
+++ b/src/google/protobuf/testing/googletest.cc
@@ -52,7 +52,7 @@
namespace google {
namespace protobuf {
-#ifdef _MSC_VER
+#ifdef _WIN32
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
using google::protobuf::internal::win32::close;
@@ -132,7 +132,7 @@ string GetTemporaryDirectoryName() {
// with "\\?\") but these will be degenerate in the sense that you cannot
// chdir into such directories (or navigate into them with Windows Explorer)
// nor can you open such files with some programs (e.g. Notepad).
- if (result.back() == '.') {
+ if (result[result.size() - 1] == '.') {
result[result.size() - 1] = '_';
}
// On Win32, tmpnam() returns a file prefixed with '\', but which is supposed
@@ -263,7 +263,7 @@ ScopedMemoryLog::~ScopedMemoryLog() {
active_log_ = NULL;
}
-const vector<string>& ScopedMemoryLog::GetMessages(LogLevel level) {
+const std::vector<string>& ScopedMemoryLog::GetMessages(LogLevel level) {
GOOGLE_CHECK(level == ERROR ||
level == WARNING);
return messages_[level];
diff --git a/src/google/protobuf/testing/googletest.h b/src/google/protobuf/testing/googletest.h
index 2db3bfee..81637486 100644
--- a/src/google/protobuf/testing/googletest.h
+++ b/src/google/protobuf/testing/googletest.h
@@ -83,10 +83,10 @@ class ScopedMemoryLog {
virtual ~ScopedMemoryLog();
// Fetches all messages with the given severity level.
- const vector<string>& GetMessages(LogLevel error);
+ const std::vector<string>& GetMessages(LogLevel error);
private:
- std::map<LogLevel, vector<string> > messages_;
+ std::map<LogLevel, std::vector<string> > messages_;
LogHandler* old_handler_;
static void HandleLog(LogLevel level, const char* filename, int line,