mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-15 19:48:00 +01:00
Fixed string+int issues in headers
This commit is contained in:
parent
642efc8d00
commit
cc9355c038
2 changed files with 8 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <SAX/Attributes.hpp>
|
||||
#include <stdexcept>
|
||||
#include <deque>
|
||||
#include <sstream>
|
||||
|
||||
namespace Arabica
|
||||
{
|
||||
|
@ -546,9 +547,9 @@ private:
|
|||
void badIndex(unsigned int index)
|
||||
{
|
||||
// sort out
|
||||
std::string msg =
|
||||
"Attempt to modify attribute at illegal index: " + index;
|
||||
throw std::out_of_range(msg);
|
||||
std::stringstream msg;
|
||||
msg << "Attempt to modify attribute at illegal index: " << index;
|
||||
throw std::out_of_range(msg.str());
|
||||
}
|
||||
|
||||
class AttributeNamed
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef ARABICA_SAX_TAGGLE_HTML_SCANNER_HPP
|
||||
#define ARABICA_SAX_TAGGLE_HTML_SCANNER_HPP
|
||||
|
||||
#include <sstream>
|
||||
#include <SAX/SAXException.hpp>
|
||||
#include <SAX/Locator.hpp>
|
||||
#include <XML/XMLCharacterClasses.hpp>
|
||||
|
@ -473,7 +474,9 @@ public:
|
|||
outputBuffer_.clear();
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error("Can't process state " + action);
|
||||
throw std::runtime_error(
|
||||
"Can't process state " + static_cast<std::stringstream const&>(
|
||||
std::stringstream() << action).str());
|
||||
} // switch ...
|
||||
state_ = nextState_;
|
||||
} // while (state_ != S_DONE)
|
||||
|
|
Loading…
Reference in a new issue