aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2017-12-19 15:54:18 -0800
committerGitHub <noreply@github.com>2017-12-19 15:54:18 -0800
commit6c3c7f6d5d68433af01c5ca500978c2d69f15212 (patch)
tree815002eb75d5921c43b54e997fa1327a0d2dd974
parenteff55ece0813c16d318a80ec20c89d81bac34efc (diff)
parent19d0e9934c997b1dc46ad539c37d67ea6c6fc33f (diff)
downloadprotobuf-6c3c7f6d5d68433af01c5ca500978c2d69f15212.tar.gz
protobuf-6c3c7f6d5d68433af01c5ca500978c2d69f15212.tar.bz2
protobuf-6c3c7f6d5d68433af01c5ca500978c2d69f15212.zip
Merge pull request #4076 from pherl/stringback
Fix string::back() usage in googletest.cc
-rw-r--r--src/google/protobuf/testing/googletest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/testing/googletest.cc b/src/google/protobuf/testing/googletest.cc
index c329b6c1..b81d3994 100644
--- a/src/google/protobuf/testing/googletest.cc
+++ b/src/google/protobuf/testing/googletest.cc
@@ -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