-rw-r--r-- | lib/openid_message.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/openid_message.cc b/lib/openid_message.cc index 4b9179b..e244f43 100644 --- a/lib/openid_message.cc +++ b/lib/openid_message.cc @@ -15,11 +15,9 @@ namespace opkele { const basic_openid_message& from; basic_openid_message& to; __om_copier(basic_openid_message& t,const basic_openid_message& f) - : from(f), to(t) { - to.reset_fields(); - } + : from(f), to(t) { } result_type operator()(argument_type f) { to.set_field(f,from.get_field(f)); } }; @@ -27,8 +25,13 @@ namespace opkele { basic_openid_message::basic_openid_message(const basic_openid_message& x) { x.copy_to(*this); } void basic_openid_message::copy_to(basic_openid_message& x) const { + x.reset_fields(); + for_each(fields_begin(),fields_end(), + __om_copier(x,*this) ); + } + void basic_openid_message::append_to(basic_openid_message& x) const { for_each(fields_begin(),fields_end(), __om_copier(x,*this) ); } |