avoid allocating potentially large std::string in error_handler
This commit is contained in:
parent
f4694d03ff
commit
1382e57ebe
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ struct error_handler
|
|||
Iterator first, Iterator last,
|
||||
Iterator err_pos, boost::spirit::info const& what) const
|
||||
{
|
||||
MAPNIK_LOG_ERROR(error_handler) << what << " expected but got: " << where_message()(err_pos, last, 16);
|
||||
MAPNIK_LOG_ERROR(error_handler) << what << " expected but got: " << std::string(err_pos, std::min(err_pos + 16,last));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue