Fix a lot of warnings and some errors

This commit is contained in:
Jérôme Leclercq
2020-09-26 11:44:09 +02:00
parent 267bd74a97
commit 65337c6a38
30 changed files with 78 additions and 65 deletions

View File

@@ -17,6 +17,8 @@ namespace Nz
{
public:
AbstractLogger() = default;
AbstractLogger(const AbstractLogger&) = default;
AbstractLogger(AbstractLogger&&) noexcept = default;
virtual ~AbstractLogger();
virtual void EnableStdReplication(bool enable) = 0;
@@ -25,6 +27,9 @@ namespace Nz
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);
AbstractLogger& operator=(const AbstractLogger&) = default;
AbstractLogger& operator=(AbstractLogger&&) noexcept = default;
};
}

View File

@@ -19,8 +19,8 @@ namespace Nz
{
public:
FileLogger(std::filesystem::path logPath = "NazaraLog.log");
FileLogger(const FileLogger&) = default;
FileLogger(FileLogger&&) = default;
FileLogger(const FileLogger&) = delete;
FileLogger(FileLogger&&) noexcept = default;
~FileLogger();
void EnableTimeLogging(bool enable);
@@ -32,8 +32,8 @@ namespace Nz
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;
FileLogger& operator=(const FileLogger&) = default;
FileLogger& operator=(FileLogger&&) = default;
FileLogger& operator=(const FileLogger&) = delete;
FileLogger& operator=(FileLogger&&) noexcept = default;
private:
std::fstream m_outputFile;