mirror of
https://github.com/SFML/SFML.git
synced 2025-01-20 00:05:13 +08:00
Minor improvement in sf::Err's default streambuf
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1765 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
87b207edc7
commit
030600ac07
@ -85,12 +85,9 @@ private :
|
||||
// Check if there is something into the write buffer
|
||||
if (pbase() != pptr())
|
||||
{
|
||||
// Retrieve the contents of the write buffer
|
||||
int size = static_cast<int>(pptr() - pbase());
|
||||
std::string buffer(pbase(), size);
|
||||
|
||||
// Write it into the standard error output
|
||||
fprintf(stderr, "%s", buffer.c_str());
|
||||
// Print the contents of the write buffer into the standard error output
|
||||
std::size_t size = static_cast<int>(pptr() - pbase());
|
||||
fwrite(pbase(), 1, size, stderr);
|
||||
|
||||
// Reset the pointer position to the beginning of the write buffer
|
||||
setp(pbase(), epptr());
|
||||
|
Loading…
Reference in New Issue
Block a user