author | Michael Krelin <hacker@klever.net> | 2009-09-13 11:40:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2009-09-13 11:45:19 (UTC) |
commit | cf7ef50cedc69f19e4077931fc58ef3ea44a3c87 (patch) (unidiff) | |
tree | 4f4624753175a06fc7abb9a46349e6d7ab0db339 /include | |
parent | c5e2a9ce7d7836adaa284dee30b70e04081b0d01 (diff) | |
download | libopkele-cf7ef50cedc69f19e4077931fc58ef3ea44a3c87.zip libopkele-cf7ef50cedc69f19e4077931fc58ef3ea44a3c87.tar.gz libopkele-cf7ef50cedc69f19e4077931fc58ef3ea44a3c87.tar.bz2 |
made compiler a bit happierpublic/next
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/expat.h | 2 | ||||
-rw-r--r-- | include/opkele/tidy.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/opkele/expat.h b/include/opkele/expat.h index 21be003..c154785 100644 --- a/include/opkele/expat.h +++ b/include/opkele/expat.h | |||
@@ -5,33 +5,33 @@ | |||
5 | #include <expat.h> | 5 | #include <expat.h> |
6 | 6 | ||
7 | namespace opkele { | 7 | namespace opkele { |
8 | 8 | ||
9 | namespace util { | 9 | namespace util { |
10 | 10 | ||
11 | class expat_t { | 11 | class expat_t { |
12 | public: | 12 | public: |
13 | XML_Parser _x; | 13 | XML_Parser _x; |
14 | 14 | ||
15 | expat_t() : _x(0) { } | 15 | expat_t() : _x(0) { } |
16 | expat_t(XML_Parser x) : _x(x) { } | 16 | expat_t(XML_Parser x) : _x(x) { } |
17 | virtual ~expat_t() throw(); | 17 | virtual ~expat_t() throw(); |
18 | 18 | ||
19 | expat_t& operator=(XML_Parser x); | 19 | expat_t& operator=(XML_Parser x); |
20 | 20 | ||
21 | operator const XML_Parser(void) const { return _x; } | 21 | operator XML_Parser(void) const { return _x; } |
22 | operator XML_Parser(void) { return _x; } | 22 | operator XML_Parser(void) { return _x; } |
23 | 23 | ||
24 | inline bool parse(const char *s,int len,bool final=false) { | 24 | inline bool parse(const char *s,int len,bool final=false) { |
25 | assert(_x); | 25 | assert(_x); |
26 | return XML_Parse(_x,s,len,final); | 26 | return XML_Parse(_x,s,len,final); |
27 | } | 27 | } |
28 | 28 | ||
29 | virtual int unknown_encoding(const XML_Char * /* n */,XML_Encoding * /* i */) { return XML_STATUS_ERROR; } | 29 | virtual int unknown_encoding(const XML_Char * /* n */,XML_Encoding * /* i */) { return XML_STATUS_ERROR; } |
30 | void set_unknown_encoding_handler(); | 30 | void set_unknown_encoding_handler(); |
31 | 31 | ||
32 | virtual void start_element(const XML_Char * /* n */,const XML_Char ** /* a */) { } | 32 | virtual void start_element(const XML_Char * /* n */,const XML_Char ** /* a */) { } |
33 | virtual void end_element(const XML_Char * /* n */) { } | 33 | virtual void end_element(const XML_Char * /* n */) { } |
34 | void set_element_handler(); | 34 | void set_element_handler(); |
35 | 35 | ||
36 | virtual void character_data(const XML_Char * /* s */,int /* l */) { } | 36 | virtual void character_data(const XML_Char * /* s */,int /* l */) { } |
37 | void set_character_data_handler(); | 37 | void set_character_data_handler(); |
diff --git a/include/opkele/tidy.h b/include/opkele/tidy.h index 059656d..039d13a 100644 --- a/include/opkele/tidy.h +++ b/include/opkele/tidy.h | |||
@@ -37,33 +37,33 @@ namespace opkele { | |||
37 | 37 | ||
38 | class tidy_doc_t { | 38 | class tidy_doc_t { |
39 | public: | 39 | public: |
40 | TidyDoc _x; | 40 | TidyDoc _x; |
41 | 41 | ||
42 | tidy_doc_t() : _x(0) { } | 42 | tidy_doc_t() : _x(0) { } |
43 | tidy_doc_t(TidyDoc x) : _x(x) { } | 43 | tidy_doc_t(TidyDoc x) : _x(x) { } |
44 | virtual ~tidy_doc_t() throw() { | 44 | virtual ~tidy_doc_t() throw() { |
45 | if(_x) tidyRelease(_x); } | 45 | if(_x) tidyRelease(_x); } |
46 | 46 | ||
47 | tidy_doc_t& operator=(TidyDoc x) { | 47 | tidy_doc_t& operator=(TidyDoc x) { |
48 | if(_x) tidyRelease(_x); | 48 | if(_x) tidyRelease(_x); |
49 | _x = x; | 49 | _x = x; |
50 | return *this; | 50 | return *this; |
51 | } | 51 | } |
52 | 52 | ||
53 | operator const TidyDoc(void) const { return _x; } | 53 | operator TidyDoc(void) const { return _x; } |
54 | operator TidyDoc(void) { return _x; } | 54 | operator TidyDoc(void) { return _x; } |
55 | 55 | ||
56 | inline bool opt_set(TidyOptionId o,bool v) { | 56 | inline bool opt_set(TidyOptionId o,bool v) { |
57 | assert(_x); | 57 | assert(_x); |
58 | return tidyOptSetBool(_x,o,v?yes:no); } | 58 | return tidyOptSetBool(_x,o,v?yes:no); } |
59 | inline bool opt_set(TidyOptionId o,int v) { | 59 | inline bool opt_set(TidyOptionId o,int v) { |
60 | assert(_x); | 60 | assert(_x); |
61 | return tidyOptSetInt(_x,o,v); } | 61 | return tidyOptSetInt(_x,o,v); } |
62 | 62 | ||
63 | inline int parse_string(const string& s) { | 63 | inline int parse_string(const string& s) { |
64 | assert(_x); | 64 | assert(_x); |
65 | return tidyParseString(_x,s.c_str()); } | 65 | return tidyParseString(_x,s.c_str()); } |
66 | inline int clean_and_repair() { | 66 | inline int clean_and_repair() { |
67 | assert(_x); | 67 | assert(_x); |
68 | return tidyCleanAndRepair(_x); } | 68 | return tidyCleanAndRepair(_x); } |
69 | inline int save_buffer(TidyBuffer& ob) { | 69 | inline int save_buffer(TidyBuffer& ob) { |