aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl/rpc_service_method.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc++/impl/rpc_service_method.h')
-rw-r--r--include/grpc++/impl/rpc_service_method.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h
index fcb0b7ccce..9d30d9627c 100644
--- a/include/grpc++/impl/rpc_service_method.h
+++ b/include/grpc++/impl/rpc_service_method.h
@@ -251,7 +251,11 @@ class RpcService {
void AddMethod(RpcServiceMethod* method) { methods_.emplace_back(method); }
RpcServiceMethod* GetMethod(int i) { return methods_[i].get(); }
- int GetMethodCount() const { return methods_.size(); }
+ int GetMethodCount() const {
+ // On win x64, int is only 32bit
+ GPR_ASSERT(methods_.size() <= INT_MAX);
+ return (int)methods_.size();
+ }
private:
std::vector<std::unique_ptr<RpcServiceMethod>> methods_;