Change paren_str to use format_string, removing a warning

This commit is contained in:
apio 2022-08-25 20:02:23 +02:00
parent b1c7a26cfb
commit a9a21b19e0

View File

@ -1,4 +1,5 @@
#include "Location.h" #include "Location.h"
#include "FormatString/FormatString.hpp"
#include <sstream> #include <sstream>
Location::Location(int ln, int col, std::string file) : line(ln), column(col), fname(file) 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 std::string Location::paren_str() const
{ {
return "(" + this->str() + ")"; return format_string("(%s)", this->str());
} }
void Location::advance() void Location::advance()