Core/Log: Pass string_view by value instead of ref
This commit is contained in:
@@ -26,8 +26,8 @@ namespace Nz
|
||||
|
||||
virtual bool IsStdReplicationEnabled() const = 0;
|
||||
|
||||
virtual void Write(const std::string_view& string) = 0;
|
||||
virtual void WriteError(ErrorType type, const std::string_view& error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr);
|
||||
virtual void Write(std::string_view string) = 0;
|
||||
virtual void WriteError(ErrorType type, std::string_view error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr);
|
||||
|
||||
AbstractLogger& operator=(const AbstractLogger&) = default;
|
||||
AbstractLogger& operator=(AbstractLogger&&) noexcept = default;
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace Nz
|
||||
bool IsStdReplicationEnabled() const override;
|
||||
bool IsTimeLoggingEnabled() const;
|
||||
|
||||
void Write(const std::string_view& string) override;
|
||||
void WriteError(ErrorType type, const std::string_view& error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr) override;
|
||||
void Write(std::string_view string) override;
|
||||
void WriteError(ErrorType type, std::string_view error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr) override;
|
||||
|
||||
FileLogger& operator=(const FileLogger&) = delete;
|
||||
FileLogger& operator=(FileLogger&&) = default;
|
||||
|
||||
@@ -39,8 +39,8 @@ namespace Nz
|
||||
|
||||
static void SetLogger(AbstractLogger* logger);
|
||||
|
||||
static void Write(const std::string_view& string);
|
||||
static void WriteError(ErrorType type, const std::string_view& error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr);
|
||||
static void Write(std::string_view string);
|
||||
static void WriteError(ErrorType type, std::string_view error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr);
|
||||
|
||||
NazaraStaticSignal(OnLogWrite, const std::string_view& /*string*/);
|
||||
NazaraStaticSignal(OnLogWriteError, ErrorType /*type*/, const std::string_view& /*error*/, unsigned int /*line*/, const char* /*file*/, const char* /*function*/);
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Nz
|
||||
|
||||
bool IsStdReplicationEnabled() const override;
|
||||
|
||||
void Write(const std::string_view& error) override;
|
||||
void WriteError(ErrorType type, const std::string_view& error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr) override;
|
||||
void Write(std::string_view string) override;
|
||||
void WriteError(ErrorType type, std::string_view error, unsigned int line = 0, const char* file = nullptr, const char* function = nullptr) override;
|
||||
|
||||
StdLogger& operator=(const StdLogger&) = default;
|
||||
StdLogger& operator=(StdLogger&&) noexcept = default;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Nz
|
||||
bool SetCursorPos(UInt64 offset);
|
||||
|
||||
bool Write(const ByteArray& byteArray);
|
||||
bool Write(const std::string_view& string);
|
||||
bool Write(std::string_view string);
|
||||
inline std::size_t Write(const void* buffer, std::size_t size);
|
||||
|
||||
Stream& operator=(const Stream&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user