From 403f57757f223941169f544003bc58244e869984 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Fri, 9 Feb 2024 15:52:35 +0100 Subject: [PATCH] Fixed minor issues --- include/aidge/utils/Formatting.hpp | 6 ++---- src/scheduler/Scheduler.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/aidge/utils/Formatting.hpp b/include/aidge/utils/Formatting.hpp index 4bcb5cad6..54ed55f59 100644 --- a/include/aidge/utils/Formatting.hpp +++ b/include/aidge/utils/Formatting.hpp @@ -20,8 +20,7 @@ namespace Aidge { // The code snippet below is licensed under CC0 1.0. template<typename ... Args> std::string stringFormat(const std::string& format, Args... args) { -#if defined(__clang__) -#elif defined(__GNUC__) || defined(__GNUG__) +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) // Disable security warning on GCC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" @@ -39,8 +38,7 @@ std::string stringFormat(const std::string& format, Args... args) { std::unique_ptr<char[]> buf(new char[size]); std::snprintf(buf.get(), size, format.c_str(), args...); return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside -#if defined(__clang__) -#elif defined(__GNUC__) || defined(__GNUG__) +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff --git a/src/scheduler/Scheduler.cpp b/src/scheduler/Scheduler.cpp index 8273df21b..27900297a 100644 --- a/src/scheduler/Scheduler.cpp +++ b/src/scheduler/Scheduler.cpp @@ -283,7 +283,7 @@ void Aidge::SequentialScheduler::forward(bool forwardDims, bool verbose) { void Aidge::SequentialScheduler::saveSchedulingDiagram(const std::string& fileName) const { FILE* fp = std::fopen((fileName + ".mmd").c_str(), "w"); - std::fprintf(fp, "gantt\ndateFormat x\naxisFormat %%Q ms\n\n"); + std::fprintf(fp, "gantt\ndateFormat x\naxisFormat %%Q µs\n\n"); if (!mScheduling.empty()) { std::map<std::shared_ptr<Node>, std::string> namePtrTable = getNodesName(true); -- GitLab