diff options
author | Jisi Liu <liujisi@google.com> | 2017-09-29 10:24:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 10:24:32 -0700 |
commit | a38f876d40128bb5a6264d5f3d2c27ab33bb89d8 (patch) | |
tree | 25e30087b8def1b7e51cfe8b0980ad0eec3fe1a2 | |
parent | 655cc830d9a22022e89fffdf11ed3cc206e0852c (diff) | |
parent | d2738c04f5406ad99907727aad631787c703da69 (diff) | |
download | protobuf-a38f876d40128bb5a6264d5f3d2c27ab33bb89d8.tar.gz protobuf-a38f876d40128bb5a6264d5f3d2c27ab33bb89d8.tar.bz2 protobuf-a38f876d40128bb5a6264d5f3d2c27ab33bb89d8.zip |
Merge pull request #3691 from pherl/stringback
Fix C++11 string accessors
-rw-r--r-- | src/google/protobuf/testing/file.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/testing/file.cc b/src/google/protobuf/testing/file.cc index f32222b7..f68aba9a 100644 --- a/src/google/protobuf/testing/file.cc +++ b/src/google/protobuf/testing/file.cc @@ -121,7 +121,7 @@ void File::WriteStringToFileOrDie(const string& contents, const string& name) { bool File::CreateDir(const string& name, int mode) { if (!name.empty()) { - GOOGLE_CHECK_OK(name.back() != '.'); + GOOGLE_CHECK_OK(name[name.size() - 1] != '.'); } return mkdir(name.c_str(), mode) == 0; } |