Optimisation

Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
JCW
2025-08-29 22:59:53 +01:00
parent dc344e4114
commit 53c0e7cace
12 changed files with 39 additions and 39 deletions

View File

@@ -68,11 +68,11 @@ private:
operator=(Sink const&) = delete;
void
write(beast::severities::Severity level, std::string const& text)
write(beast::severities::Severity level, std::string&& text)
override;
void
writeAlways(beast::severities::Severity level, std::string const& text)
writeAlways(beast::severities::Severity level, std::string&& text)
override;
};

View File

@@ -225,7 +225,7 @@ private:
severities::Severity severity) const;
static std::string
formatLog(std::string const& message);
formatLog(std::string&& message);
public:
//--------------------------------------------------------------------------
@@ -279,7 +279,7 @@ public:
level is below the current threshold().
*/
virtual void
write(Severity level, std::string const& text) = 0;
write(Severity level, std::string&& text) = 0;
/** Bypass filter and write text to the sink at the specified severity.
* Always write the message, but maintain the same formatting as if
@@ -289,7 +289,7 @@ public:
* @param text Text to write to sink.
*/
virtual void
writeAlways(Severity level, std::string const& text) = 0;
writeAlways(Severity level, std::string&& text) = 0;
private:
Severity thresh_;

View File

@@ -88,14 +88,14 @@ public:
}
void
write(beast::severities::Severity level, std::string const& text) override
write(beast::severities::Severity level, std::string&& text) override
{
using beast::Journal;
sink_.write(level, prefix_ + text);
}
void
writeAlways(severities::Severity level, std::string const& text) override
writeAlways(severities::Severity level, std::string&& text) override
{
using beast::Journal;
sink_.writeAlways(level, prefix_ + text);