From 14b3684dee8d3d8612f9338cd0f55a44c5a16a8e Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 15 Jul 2015 13:20:23 -0700 Subject: Remove const_iterator typedef and add a range based loop test --- src/cpp/common/secure_auth_context.cc | 4 ++-- src/cpp/common/secure_auth_context.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cpp/common') diff --git a/src/cpp/common/secure_auth_context.cc b/src/cpp/common/secure_auth_context.cc index 53b940f108..3f805790f3 100644 --- a/src/cpp/common/secure_auth_context.cc +++ b/src/cpp/common/secure_auth_context.cc @@ -124,7 +124,7 @@ const AuthContext::Property AuthContext::PropertyIterator::operator*() { grpc::string(property_->value, property_->value_length)); } -SecureAuthContext::const_iterator SecureAuthContext::begin() const { +AuthContext::PropertyIterator SecureAuthContext::begin() const { if (ctx_) { grpc_auth_property_iterator iter = grpc_auth_context_property_iterator(ctx_); @@ -136,7 +136,7 @@ SecureAuthContext::const_iterator SecureAuthContext::begin() const { } } -SecureAuthContext::const_iterator SecureAuthContext::end() const { +AuthContext::PropertyIterator SecureAuthContext::end() const { return AuthContext::PropertyIterator(); } diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h index 9ea4eb1b5c..aa0f6a0db7 100644 --- a/src/cpp/common/secure_auth_context.h +++ b/src/cpp/common/secure_auth_context.h @@ -53,9 +53,9 @@ class SecureAuthContext GRPC_FINAL : public AuthContext { std::vector FindPropertyValues(const grpc::string& name) const GRPC_OVERRIDE; - const_iterator begin() const GRPC_OVERRIDE; + PropertyIterator begin() const GRPC_OVERRIDE; - const_iterator end() const GRPC_OVERRIDE; + PropertyIterator end() const GRPC_OVERRIDE; private: grpc_auth_context* ctx_; -- cgit v1.2.3