Node* TextReader::get_current_node()
{
- xmlNodePtr node = xmlTextReaderCurrentNode(impl_);
+ auto node = xmlTextReaderCurrentNode(impl_);
if(node)
{
Node::create_wrapper(node);
TODO: add a private constructor to Document.
Document* TextReader::CurrentDocument()
{
- xmlDocPtr doc = xmlTextReaderCurrentDoc(impl_);
+ auto doc = xmlTextReaderCurrentDoc(impl_);
if(doc)
return new Document(doc);
}
Node* TextReader::expand()
{
- xmlNodePtr node = xmlTextReaderExpand(impl_);
+ auto node = xmlTextReaderExpand(impl_);
if(node)
{
Node::create_wrapper(node);
void TextReader::setup_exceptions()
{
- xmlTextReaderErrorFunc func = 0;
- void* arg = 0;
+ xmlTextReaderErrorFunc func = nullptr;
+ void* arg = nullptr;
// We respect any other error handlers already setup:
xmlTextReaderGetErrorHandler(impl_, &func, &arg);
void TextReader::on_libxml_error(void* arg, const char* msg, int severity, void* /* locator */)
{
- TextReader* ths = (TextReader*)arg;
+ auto ths = (TextReader*)arg;
ths->severity_ = severity;
ths->error_ = msg ? msg : "unknown parse error";
}
if( severity_ == 0 )
return;
- TextReader* ths = const_cast<TextReader*>(this);
+ auto ths = const_cast<TextReader*>(this);
int severity = severity_;
ths->severity_ = 0;