summaryrefslogtreecommitdiffstats
path: root/src/CommandOutput.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2023-05-11 22:05:17 +0200
committerMattes D <github@xoft.cz>2023-05-16 23:50:37 +0200
commitc9522fb740200ccef6230cec452c48efb31e5394 (patch)
tree7e74d70699e13dd0a92444a1a0add7a3059ac7ca /src/CommandOutput.cpp
parentTry a timeout for jobs. (diff)
downloadcuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.gz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.bz2
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.lz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.xz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.zst
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.zip
Diffstat (limited to 'src/CommandOutput.cpp')
-rw-r--r--src/CommandOutput.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/CommandOutput.cpp b/src/CommandOutput.cpp
index f4e223ed4..0bd549fb0 100644
--- a/src/CommandOutput.cpp
+++ b/src/CommandOutput.cpp
@@ -11,20 +11,6 @@
////////////////////////////////////////////////////////////////////////////////
-// cCommandOutputCallback:
-
-void cCommandOutputCallback::vOut(const char * a_Fmt, fmt::printf_args a_ArgList)
-{
- AString Output = ::vPrintf(a_Fmt, a_ArgList);
- Output.append("\n");
- Out(Output);
-}
-
-
-
-
-
-////////////////////////////////////////////////////////////////////////////////
// cStringAccumCommandOutputCallback:
void cStringAccumCommandOutputCallback::Out(const AString & a_Text)
@@ -39,7 +25,7 @@ void cStringAccumCommandOutputCallback::Out(const AString & a_Text)
////////////////////////////////////////////////////////////////////////////////
// cLogCommandOutputCallback:
-void cLogCommandOutputCallback::Finished(void)
+void cLogCommandOutputCallback::Finished()
{
// Log each line separately:
size_t len = m_Accum.length();
@@ -50,7 +36,7 @@ void cLogCommandOutputCallback::Finished(void)
{
case '\n':
{
- LOG("%s", m_Accum.substr(last, i - last).c_str());
+ LOG("%s", m_Accum.substr(last, i - last));
last = i + 1;
break;
}
@@ -58,7 +44,7 @@ void cLogCommandOutputCallback::Finished(void)
} // for i - m_Buffer[]
if (last < len)
{
- LOG("%s", m_Accum.substr(last).c_str());
+ LOG("%s", m_Accum.substr(last));
}
// Clear the buffer for the next command output: