-rw-r--r-- | test/kingate_openid_message.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/kingate_openid_message.h b/test/kingate_openid_message.h index 37dcdfa..7029ff7 100644 --- a/test/kingate_openid_message.h +++ b/test/kingate_openid_message.h | |||
@@ -36,50 +36,50 @@ class join_iterator : public iterator< | |||
36 | assert(!ranges.empty()); | 36 | assert(!ranges.empty()); |
37 | assert(ranges.front().first!=ranges.front().second); | 37 | assert(ranges.front().first!=ranges.front().second); |
38 | return ranges.front().first.operator->(); } | 38 | return ranges.front().first.operator->(); } |
39 | 39 | ||
40 | join_iterator<IT>& operator++() { | 40 | join_iterator<IT>& operator++() { |
41 | cleanup(); | 41 | cleanup(); |
42 | if(ranges.empty()) return *this; | 42 | if(ranges.empty()) return *this; |
43 | do { | 43 | do { |
44 | ++ranges.front().first; | 44 | ++ranges.front().first; |
45 | }while(cleanup() && !ranges.empty()); | 45 | }while(cleanup() && !ranges.empty()); |
46 | return *this; | 46 | return *this; |
47 | } | 47 | } |
48 | join_iterator<IT> operator++(int) { | 48 | join_iterator<IT> operator++(int) { |
49 | join_iterator<IT> rv(*this); | 49 | join_iterator<IT> rv(*this); |
50 | ++(*this); return rv; } | 50 | ++(*this); return rv; } |
51 | }; | 51 | }; |
52 | 52 | ||
53 | template<typename IT> | 53 | template<typename IT> |
54 | class cut_prefix_filterator : public opkele::util::basic_filterator<IT> { | 54 | class cut_prefix_filterator : public opkele::util::basic_filterator<IT> { |
55 | public: | 55 | public: |
56 | string pfx; | 56 | string pfx; |
57 | mutable string tmp; | 57 | mutable string tmp; |
58 | 58 | ||
59 | cut_prefix_filterator() { } | 59 | cut_prefix_filterator() { } |
60 | cut_prefix_filterator(const IT& bi,const IT&ei,const string& pfx) | 60 | cut_prefix_filterator(const IT& _bi,const IT&_ei,const string& p) |
61 | : opkele::util::basic_filterator<IT>(bi,ei), pfx(pfx) { | 61 | : opkele::util::basic_filterator<IT>(_bi,_ei), pfx(p) { |
62 | this->prepare(); | 62 | this->prepare(); |
63 | } | 63 | } |
64 | 64 | ||
65 | bool is_interesting() const { | 65 | bool is_interesting() const { |
66 | return pfx.length()==0 || !strncmp(this->it->c_str(),pfx.c_str(),pfx.length()); | 66 | return pfx.length()==0 || !strncmp(this->it->c_str(),pfx.c_str(),pfx.length()); |
67 | } | 67 | } |
68 | 68 | ||
69 | typename IT::reference operator*() const { | 69 | typename IT::reference operator*() const { |
70 | assert(!this->empty); | 70 | assert(!this->empty); |
71 | tmp = *this->it; tmp.erase(0,pfx.length()); | 71 | tmp = *this->it; tmp.erase(0,pfx.length()); |
72 | return tmp; } | 72 | return tmp; } |
73 | typename IT::pointer operator->() const { | 73 | typename IT::pointer operator->() const { |
74 | assert(!this->empty); | 74 | assert(!this->empty); |
75 | return &this->operator*(); } | 75 | return &this->operator*(); } |
76 | }; | 76 | }; |
77 | 77 | ||
78 | class kingate_openid_message_t : public opkele::basic_openid_message { | 78 | class kingate_openid_message_t : public opkele::basic_openid_message { |
79 | typedef join_iterator<kingate::cgi_gateway::params_t::const_iterator> jitterator; | 79 | typedef join_iterator<kingate::cgi_gateway::params_t::const_iterator> jitterator; |
80 | typedef opkele::util::map_keys_iterator< | 80 | typedef opkele::util::map_keys_iterator< |
81 | jitterator, | 81 | jitterator, |
82 | fields_iterator::value_type, | 82 | fields_iterator::value_type, |
83 | fields_iterator::reference, | 83 | fields_iterator::reference, |
84 | fields_iterator::pointer> keys_iterator; | 84 | fields_iterator::pointer> keys_iterator; |
85 | typedef cut_prefix_filterator<keys_iterator> pfilterator; | 85 | typedef cut_prefix_filterator<keys_iterator> pfilterator; |