From 64bbf86b623a3cca2eaf9009d7acdcde067592e3 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Wed, 3 May 2023 19:37:26 +0100 Subject: Moved code to src/openvic2 --- Logger.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Logger.cpp (limited to 'Logger.cpp') diff --git a/Logger.cpp b/Logger.cpp deleted file mode 100644 index 4d7378e..0000000 --- a/Logger.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "Logger.hpp" - -#include - -using namespace OpenVic2; - -Logger::log_func_t Logger::info_func = [](std::string&& str) { std::cout << str; }; -Logger::log_func_t Logger::error_func = [](std::string&& str) { std::cerr << str; }; - -char const* Logger::get_filename(char const* filepath) { - if (filepath == nullptr) return nullptr; - char const* last_slash = filepath; - while (*filepath != '\0') { - if (*filepath == '\\' || *filepath == '/') last_slash = filepath + 1; - filepath++; - } - return last_slash; -} - -void Logger::set_info_func(log_func_t log_func) { - info_func = log_func; -} - -void Logger::set_error_func(log_func_t log_func) { - error_func = log_func; -} -- cgit v1.2.3-56-ga3b1