Version 0.8.1 (StealConsole)

This commit is contained in:
2022-11-14 15:25:26 +01:00
parent 8b70d0e9b7
commit 20c3a525c8
5 changed files with 40 additions and 6 deletions

17
source/StealConsole.cpp Normal file
View File

@ -0,0 +1,17 @@
#include <iostream>
#include <renderd7/StealConsole.hpp>
namespace RenderD7 {
StealConsole::StealConsole() {
std::streambuf *old = std::cout.rdbuf(this->stolen_stdout.rdbuf());
if (old) {
// To prevent from unused error
}
}
StealConsole::~StealConsole() {
// Do Nothing Here
}
std::string StealConsole::GetStdout() { return this->stolen_stdout.str(); }
} // namespace RenderD7