mirror of
https://github.com/SFML/SFML.git
synced 2025-02-01 06: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
|
// Check if there is something into the write buffer
|
||||||
if (pbase() != pptr())
|
if (pbase() != pptr())
|
||||||
{
|
{
|
||||||
// Retrieve the contents of the write buffer
|
// Print the contents of the write buffer into the standard error output
|
||||||
int size = static_cast<int>(pptr() - pbase());
|
std::size_t size = static_cast<int>(pptr() - pbase());
|
||||||
std::string buffer(pbase(), size);
|
fwrite(pbase(), 1, size, stderr);
|
||||||
|
|
||||||
// Write it into the standard error output
|
|
||||||
fprintf(stderr, "%s", buffer.c_str());
|
|
||||||
|
|
||||||
// Reset the pointer position to the beginning of the write buffer
|
// Reset the pointer position to the beginning of the write buffer
|
||||||
setp(pbase(), epptr());
|
setp(pbase(), epptr());
|
||||||
|
Loading…
Reference in New Issue
Block a user