mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 23:58:25 +00:00
Remove trailing whitespace
This commit is contained in:
@@ -50,12 +50,12 @@ namespace Test
|
||||
throw Test::CompilerOutput::InvalidFormat(format);
|
||||
pos += mod.size();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/// Constructs a compiler output handler.
|
||||
///
|
||||
/// \param format Pre-defined compiler output format.
|
||||
@@ -72,10 +72,10 @@ namespace Test
|
||||
"%file:%line: %text", // GCC
|
||||
"%file(%line) : %text" // MSVC
|
||||
};
|
||||
|
||||
|
||||
_format = table[format];
|
||||
}
|
||||
|
||||
|
||||
/// Constructs a compiler output handler.
|
||||
///
|
||||
/// \param format %Output format to use.
|
||||
@@ -89,7 +89,7 @@ namespace Test
|
||||
_stream(stream)
|
||||
{
|
||||
int expr(0), file(0), line(0);
|
||||
|
||||
|
||||
for (string::size_type pos = 0;
|
||||
(pos = _format.find_first_of('%', pos)) != string::npos; )
|
||||
{
|
||||
@@ -100,34 +100,34 @@ namespace Test
|
||||
else
|
||||
throw InvalidFormat(format);
|
||||
}
|
||||
|
||||
|
||||
if (!expr && !file && !line)
|
||||
throw InvalidFormat(format);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CompilerOutput::assertment(const Source& s)
|
||||
{
|
||||
string fmt(_format);
|
||||
string::size_type pos;
|
||||
|
||||
|
||||
fmt.reserve(fmt.size() + 128);
|
||||
|
||||
|
||||
if ((pos = fmt.find("%file")) != string::npos)
|
||||
fmt.replace(pos, 5, s.file());
|
||||
|
||||
|
||||
if ((pos = fmt.find("%text")) != string::npos)
|
||||
fmt.replace(pos, 5, s.message());
|
||||
|
||||
|
||||
if ((pos = fmt.find("%line")) != string::npos)
|
||||
{
|
||||
ostringstream ss;
|
||||
ss << s.line();
|
||||
fmt.replace(pos, 5, ss.str());
|
||||
}
|
||||
|
||||
|
||||
_stream << fmt << endl;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user