Optimisation

Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
JCW
2025-09-02 19:41:26 +01:00
parent 458bd8a3bd
commit c2aae2d846
3 changed files with 11 additions and 37 deletions

View File

@@ -79,14 +79,6 @@ operator<<(std::ostream& os, LogParameter<T> const& param);
namespace beast {
// Forward declaration for use in interfaces
namespace detail {
class SimpleJsonWriter;
}
// Type alias for journal attribute factory functions
using JournalAttributesFactory = void(detail::SimpleJsonWriter&);
namespace detail {
class SimpleJsonWriter

View File

@@ -831,15 +831,6 @@ public:
bool
serverOkay(std::string& reason) override;
beast::Journal
journal(
std::string const& name,
std::function<beast::JournalAttributesFactory> const& attributes)
override;
beast::Journal
journal(std::string const& name) override;
//--------------------------------------------------------------------------
bool
@@ -2175,20 +2166,6 @@ ApplicationImp::serverOkay(std::string& reason)
return true;
}
beast::Journal
ApplicationImp::journal(
std::string const& name,
std::function<beast::JournalAttributesFactory> const& attributes)
{
return logs_->journal(name, std::move(attributes));
}
beast::Journal
ApplicationImp::journal(std::string const& name)
{
return logs_->journal(name);
}
void
ApplicationImp::setMaxDisallowedLedger()
{

View File

@@ -257,13 +257,18 @@ public:
virtual bool
serverOkay(std::string& reason) = 0;
virtual beast::Journal
journal(
std::string const& name,
std::function<beast::JournalAttributesFactory> const& attributes) = 0;
template <typename TAttributesFactory>
beast::Journal
journal(std::string const& name, TAttributesFactory&& factory)
{
return logs().journal(name, std::forward<TAttributesFactory>(factory));
}
virtual beast::Journal
journal(std::string const& name) = 0;
beast::Journal
journal(std::string const& name)
{
return logs().journal(name);
}
/* Returns the number of file descriptors the application needs */
virtual int