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:
LaurentGom 2010-12-27 22:06:01 +00:00
parent 87b207edc7
commit 030600ac07

View File

@ -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());