summaryrefslogtreecommitdiffabout
path: root/include
authorMichael Krelin <hacker@klever.net>2008-02-08 22:16:15 (UTC)
committer Michael Krelin <hacker@klever.net>2008-02-08 22:16:15 (UTC)
commit16667a21c3052c89218d3e56098f0fc29dca2f1a (patch) (side-by-side diff)
tree7154633a771b96da02cc4c980167b7ad92b6d27e /include
parentf2ba7be73a62d115f293f5d690efabcafd5fcf4f (diff)
downloadlibopkele-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>
Diffstat (limited to 'include') (more/less context) (show whitespace changes)
-rw-r--r--include/opkele/basic_op.h2
-rw-r--r--include/opkele/expat.h16
-rw-r--r--include/opkele/iterator.h19
-rw-r--r--include/opkele/types.h1
4 files changed, 20 insertions, 18 deletions
diff --git a/include/opkele/basic_op.h b/include/opkele/basic_op.h
index 0326508..12306dd 100644
--- a/include/opkele/basic_op.h
+++ b/include/opkele/basic_op.h
@@ -37,24 +37,26 @@ namespace opkele {
* Claimed identifier
*/
string claimed_id;
/**
* The OP-Local identifier
*/
string identity;
/**
* The invalidate handle for the reply request
*/
string invalidate_handle;
+ virtual ~basic_OP() { }
+
void reset_vars();
/**
* @name Request information access
* Setting and retrieval of the information pertaining to the request being processed
* @{
*/
/**
* Check if the RP expects us to get back to them.
* @return true if RP supplied return_to URL
*/
bool has_return_to() const;
diff --git a/include/opkele/expat.h b/include/opkele/expat.h
index 60c41ac..3ab1630 100644
--- a/include/opkele/expat.h
+++ b/include/opkele/expat.h
@@ -17,47 +17,47 @@ namespace opkele {
virtual ~expat_t() throw();
expat_t& operator=(XML_Parser x);
operator const XML_Parser(void) const { return _x; }
operator XML_Parser(void) { return _x; }
inline bool parse(const char *s,int len,bool final=false) {
assert(_x);
return XML_Parse(_x,s,len,final);
}
- virtual void start_element(const XML_Char *n,const XML_Char **a) { }
- virtual void end_element(const XML_Char *n) { }
+ virtual void start_element(const XML_Char * /* n */,const XML_Char ** /* a */) { }
+ virtual void end_element(const XML_Char * /* n */) { }
void set_element_handler();
- virtual void character_data(const XML_Char *s,int l) { }
+ virtual void character_data(const XML_Char * /* s */,int /* l */) { }
void set_character_data_handler();
- virtual void processing_instruction(const XML_Char *t,const XML_Char *d) { }
+ virtual void processing_instruction(const XML_Char * /* t */,const XML_Char * /* d */) { }
void set_processing_instruction_handler();
- virtual void comment(const XML_Char *d) { }
+ virtual void comment(const XML_Char * /* d */) { }
void set_comment_handler();
virtual void start_cdata_section() { }
virtual void end_cdata_section() { }
void set_cdata_section_handler();
- virtual void default_handler(const XML_Char *s,int l) { }
+ virtual void default_handler(const XML_Char * /* s */,int /* l */) { }
void set_default_handler();
void set_default_handler_expand();
- virtual void start_namespace_decl(const XML_Char *p,const XML_Char *u) { }
- virtual void end_namespace_decl(const XML_Char *p) { }
+ virtual void start_namespace_decl(const XML_Char * /* p */,const XML_Char * /* u */) { }
+ virtual void end_namespace_decl(const XML_Char * /* p */) { }
void set_namespace_decl_handler();
inline enum XML_Error get_error_code() {
assert(_x); return XML_GetErrorCode(_x); }
static inline const XML_LChar *error_string(XML_Error c) {
return XML_ErrorString(c); }
inline long get_current_byte_index() {
assert(_x); return XML_GetCurrentByteIndex(_x); }
inline int get_current_line_number() {
assert(_x); return XML_GetCurrentLineNumber(_x); }
inline int get_current_column_number() {
diff --git a/include/opkele/iterator.h b/include/opkele/iterator.h
index 812a786..28c1c83 100644
--- a/include/opkele/iterator.h
+++ b/include/opkele/iterator.h
@@ -17,50 +17,49 @@ namespace opkele {
virtual basic_output_iterator_proxy_impl<T>* dup() const = 0;
basic_output_iterator_proxy_impl<T>& operator*() { return *this; };
virtual basic_output_iterator_proxy_impl<T>& operator=(const T& x) = 0;
};
template<typename IT,typename T=typename IT::value_type>
class output_iterator_proxy_impl : public basic_output_iterator_proxy_impl<T> {
public:
IT i;
- output_iterator_proxy_impl(const IT& i) : i(i) { }
+ output_iterator_proxy_impl(const IT& _i) : i(_i) { }
basic_output_iterator_proxy_impl<T>* dup() const {
return new output_iterator_proxy_impl<IT,T>(i); }
basic_output_iterator_proxy_impl<T>& operator=(const T& x) {
- (*i) = x;
- }
+ (*i) = x; return *this; }
};
template<typename T>
class output_iterator_proxy : public iterator<output_iterator_tag,T,void,T*,T&> {
public:
basic_output_iterator_proxy_impl<T> *I;
template<typename IT>
output_iterator_proxy(const IT& i)
: I(new output_iterator_proxy_impl<IT,T>(i)) { }
output_iterator_proxy(const output_iterator_proxy<T>& x)
: I(x.I->dup()) { }
~output_iterator_proxy() { delete I; }
output_iterator_proxy& operator=(const output_iterator_proxy<T>& x) {
delete I; I = x.I->dup(); }
output_iterator_proxy& operator*() { return *this; }
output_iterator_proxy& operator=(const T& x) {
- (**I) = x; }
+ (**I) = x; return *this; }
output_iterator_proxy& operator++() { return *this; }
output_iterator_proxy& operator++(int) { return *this; }
};
template <typename T,typename TR=T&,typename TP=T*>
class basic_forward_iterator_proxy_impl : public iterator<forward_iterator_tag,T,void,TP,TR> {
public:
virtual ~basic_forward_iterator_proxy_impl() { }
virtual basic_forward_iterator_proxy_impl<T,TR,TP>* dup() const = 0;
@@ -68,25 +67,25 @@ namespace opkele {
virtual bool operator!=(const basic_forward_iterator_proxy_impl<T,TR,TP>& x) const {
return !((*this)==x); }
virtual TR operator*() const = 0;
virtual TP operator->() const = 0;
virtual void advance() = 0;
};
template <typename IT>
class forward_iterator_proxy_impl : public basic_forward_iterator_proxy_impl<typename IT::value_type,typename IT::reference,typename IT::pointer> {
public:
IT i;
- forward_iterator_proxy_impl(const IT& i) : i(i) { }
+ forward_iterator_proxy_impl(const IT& _i) : i(_i) { }
virtual basic_forward_iterator_proxy_impl<typename IT::value_type,typename IT::reference,typename IT::pointer>* dup() const {
return new forward_iterator_proxy_impl<IT>(i); }
virtual bool operator==(const basic_forward_iterator_proxy_impl<typename IT::value_type,typename IT::reference,typename IT::pointer>& x) const {
return i==static_cast<const forward_iterator_proxy_impl<IT>*>(&x)->i; }
virtual bool operator!=(const basic_forward_iterator_proxy_impl<typename IT::value_type,typename IT::reference,typename IT::pointer>& x) const {
return i!=static_cast<const forward_iterator_proxy_impl<IT>*>(&x)->i; }
virtual typename IT::reference operator*() const { return *i; }
virtual typename IT::pointer operator->() const { return i.operator->(); }
virtual void advance() { ++i; }
};
@@ -127,26 +126,26 @@ namespace opkele {
class basic_filterator : public iterator<
typename IT::iterator_category,
typename IT::value_type,
typename IT::difference_type,
typename IT::pointer,
typename IT::reference> {
public:
IT it;
IT ei;
bool empty;
basic_filterator() : empty(true) { }
- basic_filterator(const IT& bi,const IT& ei)
- : it(bi), ei(ei) { empty = (bi==ei); }
+ basic_filterator(const IT& _bi,const IT& _ei)
+ : it(_bi), ei(_ei) { empty = (it==ei); }
basic_filterator(const basic_filterator<IT>& x)
: it(x.it), ei(x.ei), empty(x.empty) { }
virtual ~basic_filterator() { }
bool operator==(const basic_filterator<IT>& x) const {
return empty?x.empty:(it==x.it); }
bool operator!=(const basic_filterator<IT>& x) const {
return empty!=x.empty || it!=x.it; }
typename IT::reference operator*() const {
assert(!empty);
return *it; }
@@ -176,27 +175,27 @@ namespace opkele {
template<typename IT,typename T=typename IT::value_type::first_type,typename TR=T&,typename TP=T*>
class map_keys_iterator : public iterator<
typename IT::iterator_category,
T,void,TP,TR> {
public:
typedef map_keys_iterator<IT,T,TR,TP> self_type;
IT it;
IT ei;
bool empty;
map_keys_iterator() : empty(true) { }
- map_keys_iterator(const IT& bi,
- const IT& ei)
- : it(bi), ei(ei) { empty = (bi==ei); }
+ map_keys_iterator(const IT& _bi,
+ const IT& _ei)
+ : it(_bi), ei(_ei) { empty = (it==ei); }
map_keys_iterator(const self_type& x)
: it(x.it), ei(x.ei), empty(x.empty) { }
bool operator==(const self_type& x) const {
return empty?x.empty:(it==x.it); }
bool operator!=(const self_type& x) const {
return empty!=x.empty || it!=x.it; }
TR operator*() const {
assert(!empty);
return it->first; }
TP operator->() const {
diff --git a/include/opkele/types.h b/include/opkele/types.h
index 6ab51ef..a3b657d 100644
--- a/include/opkele/types.h
+++ b/include/opkele/types.h
@@ -117,24 +117,25 @@ namespace opkele {
* the shared_ptr<> for association_t object type
*/
typedef tr1mem::shared_ptr<association_t> assoc_t;
class basic_openid_message {
public:
typedef list<string> fields_t;
typedef util::forward_iterator_proxy<
string,const string&,const string*
> fields_iterator;
basic_openid_message() { }
+ virtual ~basic_openid_message() { }
basic_openid_message(const basic_openid_message& x);
void copy_to(basic_openid_message& x) const;
virtual bool has_field(const string& n) const = 0;
virtual const string& get_field(const string& n) const = 0;
virtual bool has_ns(const string& uri) const;
virtual string get_ns(const string& uri) const;
virtual fields_iterator fields_begin() const = 0;
virtual fields_iterator fields_end() const = 0;