Merge pull request #4076 from pherl/stringback

Fix string::back() usage in googletest.cc
pull/4089/head
Jisi Liu 7 years ago committed by GitHub
commit 6c3c7f6d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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

Loading…
Cancel
Save