Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed Jul 25, 2023
1 parent 2d6f572 commit 89817fb
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Utils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include "colors.h"

namespace utils {

// -----------------------------------------------------------------------------
// LOGGING
utils::Log::Log() {}
utils::Log::~Log() {}

Expand All @@ -41,14 +44,14 @@ void utils::Log::info(std::string message) { std::cout << GREEN << "INFO: " << R
void utils::Log::warning(std::string message) { std::cout << YELLOW << "WARNING: " << RESET << message << std::endl; }
void utils::Log::error(std::string message) { std::cout << BOLDRED << "ERROR: " << RESET << message << std::endl; }

// -----------------------------------------------------------------------------
// EXCEPTIONS
const char* utils::NaNException::what() const noexcept {
return "Value is NaN!";
};

} // namespace utils

namespace utils {

// -----------------------------------------------------------------------------
// UTILITY FUNCTIONS
bool isInStrV(std::vector<std::string> v, std::string string) {
if (std::find(v.begin(), v.end(), string) != v.end())
return true;
Expand Down Expand Up @@ -79,10 +82,6 @@ void progress_bar(float part, float all) {
std::cout.flush();
}

} // namespace utils

namespace utils {

std::string get_version() {
return "v1.9.1";
}
Expand Down

0 comments on commit 89817fb

Please sign in to comment.