diff options
author | 2015-02-20 14:46:15 -0800 | |
---|---|---|
committer | 2015-02-20 14:46:15 -0800 | |
commit | d539f69c7239261e7aee6375565c81b1616b79b2 (patch) | |
tree | 45128d2feb294de0fc48638072ef243b5c3107b8 /src | |
parent | b068809340f158fb14990db31dfd6462bdc15d1f (diff) | |
parent | 5b47818d9301ffd23f67a1433673db43698e941a (diff) |
Merge pull request #663 from vjpai/python
Minor changes for compatibility across different compilers
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/python_plugin.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc index ebe3660619..05c6b095d8 100644 --- a/src/compiler/python_plugin.cc +++ b/src/compiler/python_plugin.cc @@ -63,7 +63,7 @@ class PythonGrpcGenerator : public CodeGenerator { // Get output file name. string file_name; static const int proto_suffix_length = 6; // length of ".proto" - if (file->name().size() > proto_suffix_length && + if (file->name().size() > static_cast<size_t>(proto_suffix_length) && file->name().find_last_of(".proto") == file->name().size() - 1) { file_name = file->name().substr( 0, file->name().size() - proto_suffix_length) + "_pb2.py"; |