more warnings fixed

This commit is contained in:
Jez Higgins 2010-01-10 18:47:09 +00:00
parent 708afa0ebd
commit 7f8d20b46f
8 changed files with 16 additions and 14 deletions

View file

@ -43,7 +43,7 @@ void generate_pyx(Arabica::DOM::Element<std::string> element)
if(element.hasAttributes()) if(element.hasAttributes())
{ {
Arabica::DOM::NamedNodeMap<std::string> attrs = element.getAttributes(); Arabica::DOM::NamedNodeMap<std::string> attrs = element.getAttributes();
for(int a = 0; a != attrs.getLength(); ++a) for(size_t a = 0; a != attrs.getLength(); ++a)
{ {
Arabica::DOM::Node<std::string> attr = attrs.item(a); Arabica::DOM::Node<std::string> attr = attrs.item(a);
std::cout << 'A' << attr.getNodeName() std::cout << 'A' << attr.getNodeName()

View file

@ -1,4 +1,6 @@
#ifdef _MSC_VER
#pragma warning(disable: 4250) #pragma warning(disable: 4250)
#endif
#include <iostream> #include <iostream>
#include <SAX/filter/Writer.hpp> #include <SAX/filter/Writer.hpp>

View file

@ -462,7 +462,7 @@ class DocumentImpl : public DOM::Document_impl<stringT, string_adaptorT>,
idNodes_.erase(n); idNodes_.erase(n);
} // removeElementId } // removeElementId
stringT const* const stringPool(const stringT& str) const stringT const* stringPool(const stringT& str) const
{ {
typename std::list<stringT>::const_iterator i = std::find(stringPool_.begin(), stringPool_.end(), str); typename std::list<stringT>::const_iterator i = std::find(stringPool_.begin(), stringPool_.end(), str);
if(i != stringPool_.end()) if(i != stringPool_.end())

View file

@ -32,7 +32,7 @@ class WhitespaceStripper : public SAX::XMLFilterImpl<string_type, string_adaptor
XMLFilterT::characters(Arabica::text::normalize_whitespace<string_type, string_adaptor>(ch)); XMLFilterT::characters(Arabica::text::normalize_whitespace<string_type, string_adaptor>(ch));
} // characters } // characters
virtual void ignorableWhitespace(const string_type& ch) virtual void ignorableWhitespace(const string_type& /* ch */)
{ {
} // ignorableWhitespace } // ignorableWhitespace
}; // class WhitespaceStripper }; // class WhitespaceStripper

View file

@ -86,7 +86,7 @@ public:
bool forward() const { return walker_->forward(); } bool forward() const { return walker_->forward(); }
bool reverse() const { return !walker_->forward(); } bool reverse() const { return !walker_->forward(); }
const DOM::Node<string_type, string_adaptor>& operator*() const { return node_; } const DOM::Node<string_type, string_adaptor>& operator*() const { return node_; }
const DOM::Node<string_type, string_adaptor>* const operator->() const { return &node_; } const DOM::Node<string_type, string_adaptor>* operator->() const { return &node_; }
AxisEnumerator& operator++() { advance(); return *this; } AxisEnumerator& operator++() { advance(); return *this; }
AxisEnumerator operator++(int) { AxisEnumerator copy(*this); advance(); return copy; } AxisEnumerator operator++(int) { AxisEnumerator copy(*this); advance(); return copy; }
@ -117,7 +117,7 @@ class AxisWalker
{ {
public: public:
virtual ~AxisWalker() { } virtual ~AxisWalker() { }
DOM::Node_impl<string_type, string_adaptor>* const get() const { return current_; } DOM::Node_impl<string_type, string_adaptor>* get() const { return current_; }
virtual void advance() = 0; virtual void advance() = 0;
bool forward() { return forward_; } bool forward() { return forward_; }
virtual AxisWalker<string_type, string_adaptor>* clone() const = 0; virtual AxisWalker<string_type, string_adaptor>* clone() const = 0;
@ -362,7 +362,7 @@ public:
virtual AxisWalker<string_type, string_adaptor>* clone() const { return new DescendantAxisWalker(*this); } virtual AxisWalker<string_type, string_adaptor>* clone() const { return new DescendantAxisWalker(*this); }
private: private:
const RawNodeT nextDescendant() RawNodeT nextDescendant()
{ {
RawNodeT next = BaseT::get()->getFirstChild(); RawNodeT next = BaseT::get()->getFirstChild();
if(next == 0) if(next == 0)

View file

@ -169,7 +169,7 @@ public:
LastFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : NumericXPathFunction<string_type, string_adaptor>(0, 0, args) { } LastFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : NumericXPathFunction<string_type, string_adaptor>(0, 0, args) { }
protected: protected:
virtual double doEvaluate(const DOM::Node<string_type, string_adaptor>& context, virtual double doEvaluate(const DOM::Node<string_type, string_adaptor>& /* context */,
const ExecutionContext<string_type, string_adaptor>& executionContext) const const ExecutionContext<string_type, string_adaptor>& executionContext) const
{ {
return executionContext.last(); return executionContext.last();
@ -184,7 +184,7 @@ public:
PositionFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : NumericXPathFunction<string_type, string_adaptor>(0, 0, args) { } PositionFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : NumericXPathFunction<string_type, string_adaptor>(0, 0, args) { }
protected: protected:
virtual double doEvaluate(const DOM::Node<string_type, string_adaptor>& context, virtual double doEvaluate(const DOM::Node<string_type, string_adaptor>& /* context */,
const ExecutionContext<string_type, string_adaptor>& executionContext) const const ExecutionContext<string_type, string_adaptor>& executionContext) const
{ {
return executionContext.position(); return executionContext.position();
@ -597,8 +597,8 @@ public:
TrueFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : BooleanXPathFunction<string_type, string_adaptor>(0, 0, args) { } TrueFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : BooleanXPathFunction<string_type, string_adaptor>(0, 0, args) { }
protected: protected:
virtual bool doEvaluate(const DOM::Node<string_type, string_adaptor>& context, virtual bool doEvaluate(const DOM::Node<string_type, string_adaptor>& /* context */,
const ExecutionContext<string_type, string_adaptor>& executionContext) const const ExecutionContext<string_type, string_adaptor>& /* executionContext */) const
{ {
return true; return true;
} // doEvaluate } // doEvaluate
@ -612,8 +612,8 @@ public:
FalseFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : BooleanXPathFunction<string_type, string_adaptor>(0, 0, args) { } FalseFn(const std::vector<XPathExpression<string_type, string_adaptor> >& args) : BooleanXPathFunction<string_type, string_adaptor>(0, 0, args) { }
protected: protected:
virtual bool doEvaluate(const DOM::Node<string_type, string_adaptor>& context, virtual bool doEvaluate(const DOM::Node<string_type, string_adaptor>& /* context */,
const ExecutionContext<string_type, string_adaptor>& executionContext) const const ExecutionContext<string_type, string_adaptor>& /* executionContext */) const
{ {
return false; return false;
} // evaluate } // evaluate

View file

@ -44,7 +44,7 @@ public:
virtual XPathFunction<string_type, string_adaptor>* virtual XPathFunction<string_type, string_adaptor>*
resolveFunction(const string_type& namespace_uri, resolveFunction(const string_type& namespace_uri,
const string_type& name, const string_type& name,
const std::vector<XPathExpression<string_type, string_adaptor> >& argExprs) const const std::vector<XPathExpression<string_type, string_adaptor> >& /* argExprs */) const
{ {
string_type error; string_type error;
if(!string_adaptor::empty(namespace_uri)) if(!string_adaptor::empty(namespace_uri))

View file

@ -116,7 +116,7 @@ std::codecvt_base::result base64codecvt::do_in(std::mbstate_t& state,
return (from_next == from_end) ? std::codecvt_base::ok : std::codecvt_base::partial; return (from_next == from_end) ? std::codecvt_base::ok : std::codecvt_base::partial;
} // do_in } // do_in
std::codecvt_base::result base64codecvt::do_unshift(std::mbstate_t& state, std::codecvt_base::result base64codecvt::do_unshift(std::mbstate_t& /* state */,
char* to, char* to,
char* to_limit, char* to_limit,
char*& to_next) const char*& to_next) const