mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-12-02 08:40:11 +00:00
output filename of the second value2 if different
in format_error.
This commit is contained in:
parent
6df75ad28e
commit
13c1f9c259
@ -262,10 +262,8 @@ inline std::string format_underline(const std::string& message,
|
|||||||
std::max(line_number1.size(), line_number2.size());
|
std::max(line_number1.size(), line_number2.size());
|
||||||
|
|
||||||
std::ostringstream retval;
|
std::ostringstream retval;
|
||||||
retval << message;
|
retval << message << newline;
|
||||||
retval << newline;
|
retval << " --> " << reg1.name() << newline;
|
||||||
retval << " --> ";
|
|
||||||
retval << reg1.name() << newline;;
|
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
retval << ' ' << std::setw(line_num_width) << line_number1;
|
retval << ' ' << std::setw(line_num_width) << line_number1;
|
||||||
retval << " | " << line1 << newline;
|
retval << " | " << line1 << newline;
|
||||||
@ -276,7 +274,14 @@ inline std::string format_underline(const std::string& message,
|
|||||||
retval << ' ';
|
retval << ' ';
|
||||||
retval << comment_for_underline1 << newline;
|
retval << comment_for_underline1 << newline;
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
|
if(reg2.name() != reg1.name())
|
||||||
|
{
|
||||||
|
retval << " --> " << reg2.name() << newline;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
retval << " ..." << newline;
|
retval << " ..." << newline;
|
||||||
|
}
|
||||||
retval << ' ' << std::setw(line_num_width) << line_number2;
|
retval << ' ' << std::setw(line_num_width) << line_number2;
|
||||||
retval << " | " << line2 << newline;
|
retval << " | " << line2 << newline;
|
||||||
retval << make_string(line_num_width + 1, ' ');
|
retval << make_string(line_num_width + 1, ' ');
|
||||||
|
Loading…
Reference in New Issue
Block a user