author | Michael Krelin <hacker@klever.net> | 2008-06-27 18:32:31 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-06-27 18:32:31 (UTC) |
commit | a344edbdddeac51524001faa10d06f85cfdb041c (patch) (unidiff) | |
tree | bca2afabf4fdc53324fc48e101fc9de068404e47 /lib/fields.cc | |
parent | 9737a1eb0f01cdc805c4a28f0a86734eb3bb4d31 (diff) | |
download | libopkele-a344edbdddeac51524001faa10d06f85cfdb041c.zip libopkele-a344edbdddeac51524001faa10d06f85cfdb041c.tar.gz libopkele-a344edbdddeac51524001faa10d06f85cfdb041c.tar.bz2 |
Fix for gcc 4.3
Thanks to Oden Eriksson of Mandriva for report and patch
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/fields.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fields.cc b/lib/fields.cc index d494098..91fbc41 100644 --- a/lib/fields.cc +++ b/lib/fields.cc | |||
@@ -1,29 +1,31 @@ | |||
1 | #include <opkele/types.h> | 1 | #include <opkele/types.h> |
2 | #include <opkele/exception.h> | 2 | #include <opkele/exception.h> |
3 | #include <opkele/util.h> | 3 | #include <opkele/util.h> |
4 | #include <algorithm> | ||
4 | 5 | ||
5 | namespace opkele { | 6 | namespace opkele { |
7 | using std::for_each; | ||
6 | using std::unary_function; | 8 | using std::unary_function; |
7 | 9 | ||
8 | struct __om_copier : public unary_function<const string&,void> { | 10 | struct __om_copier : public unary_function<const string&,void> { |
9 | public: | 11 | public: |
10 | const basic_fields& from; | 12 | const basic_fields& from; |
11 | basic_fields& to; | 13 | basic_fields& to; |
12 | 14 | ||
13 | __om_copier(basic_fields& t,const basic_fields& f) | 15 | __om_copier(basic_fields& t,const basic_fields& f) |
14 | : from(f), to(t) { } | 16 | : from(f), to(t) { } |
15 | 17 | ||
16 | result_type operator()(argument_type f) { | 18 | result_type operator()(argument_type f) { |
17 | to.set_field(f,from.get_field(f)); } | 19 | to.set_field(f,from.get_field(f)); } |
18 | }; | 20 | }; |
19 | 21 | ||
20 | basic_fields::basic_fields(const basic_fields& x) { | 22 | basic_fields::basic_fields(const basic_fields& x) { |
21 | x.copy_to(*this); | 23 | x.copy_to(*this); |
22 | } | 24 | } |
23 | void basic_fields::copy_to(basic_fields& x) const { | 25 | void basic_fields::copy_to(basic_fields& x) const { |
24 | x.reset_fields(); | 26 | x.reset_fields(); |
25 | for_each(fields_begin(),fields_end(), | 27 | for_each(fields_begin(),fields_end(), |
26 | __om_copier(x,*this) ); | 28 | __om_copier(x,*this) ); |
27 | } | 29 | } |
28 | void basic_fields::append_to(basic_fields& x) const { | 30 | void basic_fields::append_to(basic_fields& x) const { |
29 | for_each(fields_begin(),fields_end(), | 31 | for_each(fields_begin(),fields_end(), |