From 7124f2072f25e297adfda328da15d1bed74488ba Mon Sep 17 00:00:00 2001 From: adjoly Date: Wed, 11 Dec 2024 14:09:50 +0100 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=8F=97=EF=B8=8F=E3=80=8D=20wip(E?= =?UTF-8?q?x03):=20Now=20with=20verbose=20mode=20!=20(thx=20@bonsthie)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ex03/Log.cpp | 8 ++++++-- ex03/Makefile | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ex03/Log.cpp b/ex03/Log.cpp index 9dbf721..fe8ee18 100644 --- a/ex03/Log.cpp +++ b/ex03/Log.cpp @@ -1,12 +1,12 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* log.cpp :+: :+: :+: */ +/* Log.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/30 16:30:53 by adjoly #+# #+# */ -/* Updated: 2024/11/30 16:32:37 by adjoly ### ########.fr */ +/* Updated: 2024/12/11 14:09:08 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,9 +14,13 @@ #include void log(std::string emoji, std::string what, std::string who, std::string str) { +#ifdef VERBOSE if (who.empty()) std::cout << "「" << emoji << "」" << what << ": " << str << std::endl; else std::cout << "「" << emoji << "」" << what << "(" << who << "): " << str << std::endl; +#else + (void)emoji, (void)what, (void)who, (void)str; +#endif } diff --git a/ex03/Makefile b/ex03/Makefile index 34ae06e..09163c8 100644 --- a/ex03/Makefile +++ b/ex03/Makefile @@ -6,7 +6,7 @@ # By: adjoly +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/25 16:09:27 by adjoly #+# #+# # -# Updated: 2024/12/06 16:28:16 by adjoly ### ########.fr # +# Updated: 2024/12/11 14:08:19 by adjoly ### ########.fr # # # # **************************************************************************** # @@ -31,6 +31,10 @@ PURPLE = \e[0;35m NC = \033[0m DELETE = \x1B[2K\r +ifeq ($(VERBOSE),true) + FLAGS += -D VERBOSE +endif + all: $(NAME) $(NAME): $(OBJS)