From a9a21b19e0d76062293b6c254ddd40d9e702ed11 Mon Sep 17 00:00:00 2001 From: apio Date: Thu, 25 Aug 2022 20:02:23 +0200 Subject: [PATCH] Change paren_str to use format_string, removing a warning --- src/Location.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Location.cpp b/src/Location.cpp index 811931f..6d88788 100644 --- a/src/Location.cpp +++ b/src/Location.cpp @@ -1,4 +1,5 @@ #include "Location.h" +#include "FormatString/FormatString.hpp" #include Location::Location(int ln, int col, std::string file) : line(ln), column(col), fname(file) @@ -18,7 +19,7 @@ std::string Location::str() const std::string Location::paren_str() const { - return "(" + this->str() + ")"; + return format_string("(%s)", this->str()); } void Location::advance()