aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbutl/manifest-parser.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/libbutl/manifest-parser.cxx b/libbutl/manifest-parser.cxx
index ae0d43d..258a536 100644
--- a/libbutl/manifest-parser.cxx
+++ b/libbutl/manifest-parser.cxx
@@ -3,8 +3,8 @@
#include <libbutl/manifest-parser.hxx>
+#include <string>
#include <cassert>
-#include <sstream>
using namespace std;
@@ -479,11 +479,21 @@ namespace butl
static inline string
format (const string& n, uint64_t l, uint64_t c, const string& d)
{
- ostringstream os;
+ using std::to_string;
+
+ string r;
if (!n.empty ())
- os << n << ':';
- os << l << ':' << c << ": error: " << d;
- return os.str ();
+ {
+ r += n;
+ r += ':';
+ }
+
+ r += to_string (l);
+ r += ':';
+ r += to_string (c);
+ r += ": error: ";
+ r += d;
+ return r;
}
manifest_parsing::