From fe5e690b6e6fa1ca64f76bc1d0c602e07ed9715a Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Mon, 30 Sep 2024 14:11:21 +0200 Subject: [PATCH] fix README and inline def of logging_level_to_string --- CHANGELOG.md | 4 ++++ README.md | 2 +- include/htool/hmatrix/hmatrix_distributed_output.hpp | 2 +- include/htool/misc/logger.hpp | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f57bfde..699dbfdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ All notable changes to this project will be documented in this file. ## Unreleased +### Fixed + +- fix inline definition of `logging_level_to_string` + ## [0.9.0] - 2024-09-19 ### Added diff --git a/README.md b/README.md index 88e2dd10..840d548f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# HTOOL [![CI](https://github.com/htool-ddm/htool/actions/workflows/CI.yml/badge.svg?branch=develop)](https://github.com/htool-ddm/htool/actions/workflows/CI.yml) [![codecov](https://codecov.io/gh/htool-ddm/htool/branch/main/graph/badge.svg?token=1JJ40GPFA5)](https://codecov.io/gh/htool-ddm/htool) +# HTOOL [![CI](https://github.com/htool-ddm/htool/actions/workflows/CI.yml/badge.svg)](https://github.com/htool-ddm/htool/actions/workflows/CI.yml) [![codecov](https://codecov.io/gh/htool-ddm/htool/branch/main/graph/badge.svg?token=1JJ40GPFA5)](https://codecov.io/gh/htool-ddm/htool) ## What is Htool? diff --git a/include/htool/hmatrix/hmatrix_distributed_output.hpp b/include/htool/hmatrix/hmatrix_distributed_output.hpp index f5e40ad3..6f671eb3 100644 --- a/include/htool/hmatrix/hmatrix_distributed_output.hpp +++ b/include/htool/hmatrix/hmatrix_distributed_output.hpp @@ -23,7 +23,7 @@ namespace htool { -bool is_positive_integer(const std::string &s) { +inline bool is_positive_integer(const std::string &s) { return !s.empty() && std::find_if(s.begin(), s.end(), [](unsigned char c) { return !std::isdigit(c); }) == s.end(); } diff --git a/include/htool/misc/logger.hpp b/include/htool/misc/logger.hpp index 8dd9f27c..b8c42789 100644 --- a/include/htool/misc/logger.hpp +++ b/include/htool/misc/logger.hpp @@ -17,7 +17,7 @@ enum class LogLevel : unsigned int { INFO = 40, }; -std::string logging_level_to_string(LogLevel logging_level) { +inline std::string logging_level_to_string(LogLevel logging_level) { switch (logging_level) { case LogLevel::CRITICAL: return "[Htool critical] ";