mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-04 20:57:49 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include "util/StreamHelpers.h"
|
||||
|
||||
namespace RBX
|
||||
{
|
||||
void readStreamIntoString(std::istream &stream, std::string& content)
|
||||
{
|
||||
size_t contentLength = 0;
|
||||
stream.seekg(0, std::ios::end);
|
||||
contentLength = static_cast<size_t>(stream.tellg());
|
||||
stream.seekg(0, std::ios::beg);
|
||||
|
||||
content = std::string(contentLength, '\0');
|
||||
stream.read(&content[0], contentLength);
|
||||
}
|
||||
} // RBX
|
||||
Reference in New Issue
Block a user