diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-02 20:41:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-02 20:41:01 +0300 |
commit | 1dab21b236d76900f3ddd2be32f9590aef394c2d (patch) | |
tree | 9ff63d2bf544a440c5d8de41faa401e900898012 /src/configuration.cpp | |
parent | f4f16b2fd6c455cd38e089a97db374c5ee3ea9fd (diff) | |
download | plus-1dab21b236d76900f3ddd2be32f9590aef394c2d.tar.gz plus-1dab21b236d76900f3ddd2be32f9590aef394c2d.tar.bz2 plus-1dab21b236d76900f3ddd2be32f9590aef394c2d.tar.xz plus-1dab21b236d76900f3ddd2be32f9590aef394c2d.zip |
Remove most C casts.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r-- | src/configuration.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp index 9055642a3..3b8aa6a92 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -733,12 +733,9 @@ void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer) logger->log("unused configuration option: " + i->first); } #endif - xmlTextWriterStartElement(writer, BAD_CAST "option"); - xmlTextWriterWriteAttribute(writer, - BAD_CAST "name", BAD_CAST i->first.c_str()); - - xmlTextWriterWriteAttribute(writer, - BAD_CAST "value", BAD_CAST i->second.c_str()); + XmlTextWriterStartElement(writer, "option"); + XmlTextWriterWriteAttribute(writer,"name", i->first.c_str()); + XmlTextWriterWriteAttribute(writer,"value", i->second.c_str()); xmlTextWriterEndElement(writer); } @@ -748,14 +745,14 @@ void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer) { const char *const name = it->first.c_str(); - xmlTextWriterStartElement(writer, BAD_CAST "list"); - xmlTextWriterWriteAttribute(writer, BAD_CAST "name", BAD_CAST name); + XmlTextWriterStartElement(writer, "list"); + XmlTextWriterWriteAttribute(writer, "name", name); // recurse on all elements for (ConfigurationList::const_iterator elt_it = it->second.begin(), elt_it_end = it->second.end(); elt_it != elt_it_end; ++elt_it) { - xmlTextWriterStartElement(writer, BAD_CAST name); + XmlTextWriterStartElement(writer, name); if (*elt_it) (*elt_it)->writeToXML(writer); xmlTextWriterEndElement(writer); @@ -794,7 +791,7 @@ void Configuration::write() xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, nullptr, nullptr, nullptr); // xmlTextWriterStartDocument(writer, nullptr, "utf8", nullptr); - xmlTextWriterStartElement(writer, BAD_CAST "configuration"); + XmlTextWriterStartElement(writer, "configuration"); writeToXML(writer); |