From 7a6af7a6222b0ce1297448f4bd94a175286af66f Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Tue, 28 Jan 2025 12:15:33 +0000
Subject: [PATCH] Minor updates

- Remove unused empty CMakeLists.txt in src directory
- upd: 'approxEq' logging from error to notice in case of mismatch
- do not remove spaces at the beginning of a new line in log
---
 include/aidge/utils/TensorUtils.hpp | 2 +-
 src/CMakeLists.txt                  | 0
 src/utils/Log.cpp                   | 5 +----
 3 files changed, 2 insertions(+), 5 deletions(-)
 delete mode 100644 src/CMakeLists.txt

diff --git a/include/aidge/utils/TensorUtils.hpp b/include/aidge/utils/TensorUtils.hpp
index 5ba1f8ae5..794abf763 100644
--- a/include/aidge/utils/TensorUtils.hpp
+++ b/include/aidge/utils/TensorUtils.hpp
@@ -77,7 +77,7 @@ bool approxEq(const Tensor& t1, const Tensor& t2, float relative = 1e-5f, float
         const float threshold = absolute + (relative * static_cast<float>(std::abs(val2)));
 
         if (diff > threshold) {
-            Log::error("Tensor values differ at index {}: {} vs {} (diff: {}, threshold: {})\n"
+            Log::notice("Tensor values differ at index {}: {} vs {} (diff: {}, threshold: {})\n"
                 "Tensor 1:\n{}\nTensor 2:\n{}",
                 i, val1, val2, diff, threshold, t1, t2);
             return false;
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index e69de29bb..000000000
diff --git a/src/utils/Log.cpp b/src/utils/Log.cpp
index 45f03a7ae..3890b991a 100644
--- a/src/utils/Log.cpp
+++ b/src/utils/Log.cpp
@@ -140,10 +140,7 @@ void Log::log(Level level, const std::string& msg) {
             wrappedLines.push_back(text.substr(start, lineEnd - start));
 
             // Move to the next segment, skipping spaces
-            start = lineEnd;
-            while (start < text.size() && (text[start] == ' ' || text[start] == '\n')) {
-                ++start;
-            }
+            start = ++lineEnd;
         }
 
         return wrappedLines;
-- 
GitLab