author | Michael Krelin <hacker@klever.net> | 2008-02-08 22:16:15 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-02-08 22:16:15 (UTC) |
commit | 16667a21c3052c89218d3e56098f0fc29dca2f1a (patch) (unidiff) | |
tree | 7154633a771b96da02cc4c980167b7ad92b6d27e /lib/expat.cc | |
parent | f2ba7be73a62d115f293f5d690efabcafd5fcf4f (diff) | |
download | libopkele-16667a21c3052c89218d3e56098f0fc29dca2f1a.zip libopkele-16667a21c3052c89218d3e56098f0fc29dca2f1a.tar.gz libopkele-16667a21c3052c89218d3e56098f0fc29dca2f1a.tar.bz2 |
minor fixes and making compiler a bit happier
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/expat.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/expat.cc b/lib/expat.cc index fa6fdde..c4dab7e 100644 --- a/lib/expat.cc +++ b/lib/expat.cc | |||
@@ -1,39 +1,40 @@ | |||
1 | #include <opkele/expat.h> | 1 | #include <opkele/expat.h> |
2 | 2 | ||
3 | namespace opkele { | 3 | namespace opkele { |
4 | 4 | ||
5 | namespace util { | 5 | namespace util { |
6 | 6 | ||
7 | expat_t::~expat_t() throw() { | 7 | expat_t::~expat_t() throw() { |
8 | if(_x) | 8 | if(_x) |
9 | XML_ParserFree(_x); | 9 | XML_ParserFree(_x); |
10 | } | 10 | } |
11 | 11 | ||
12 | expat_t& expat_t::operator=(XML_Parser x) { | 12 | expat_t& expat_t::operator=(XML_Parser x) { |
13 | if(_x) | 13 | if(_x) |
14 | XML_ParserFree(_x); | 14 | XML_ParserFree(_x); |
15 | _x = x; | 15 | _x = x; |
16 | return *this; | ||
16 | } | 17 | } |
17 | 18 | ||
18 | static void _start_element(void* ud,const XML_Char *n,const XML_Char **a) { | 19 | static void _start_element(void* ud,const XML_Char *n,const XML_Char **a) { |
19 | ((expat_t*)ud)->start_element(n,a); | 20 | ((expat_t*)ud)->start_element(n,a); |
20 | } | 21 | } |
21 | static void _end_element(void *ud,const XML_Char *n) { | 22 | static void _end_element(void *ud,const XML_Char *n) { |
22 | ((expat_t*)ud)->end_element(n); | 23 | ((expat_t*)ud)->end_element(n); |
23 | } | 24 | } |
24 | 25 | ||
25 | void expat_t::set_element_handler() { | 26 | void expat_t::set_element_handler() { |
26 | assert(_x); | 27 | assert(_x); |
27 | XML_SetElementHandler(_x,_start_element,_end_element); | 28 | XML_SetElementHandler(_x,_start_element,_end_element); |
28 | } | 29 | } |
29 | 30 | ||
30 | static void _character_data(void *ud,const XML_Char *s,int l) { | 31 | static void _character_data(void *ud,const XML_Char *s,int l) { |
31 | ((expat_t*)ud)->character_data(s,l); | 32 | ((expat_t*)ud)->character_data(s,l); |
32 | } | 33 | } |
33 | 34 | ||
34 | void expat_t::set_character_data_handler() { | 35 | void expat_t::set_character_data_handler() { |
35 | assert(_x); | 36 | assert(_x); |
36 | XML_SetCharacterDataHandler(_x,_character_data); | 37 | XML_SetCharacterDataHandler(_x,_character_data); |
37 | } | 38 | } |
38 | 39 | ||
39 | static void _processing_instruction(void *ud,const XML_Char *t,const XML_Char *d) { | 40 | static void _processing_instruction(void *ud,const XML_Char *t,const XML_Char *d) { |