From 3991af9ed6a06c62b935fe65fb889a5f1b2cfc8e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 19 May 2022 21:10:20 +0200 Subject: [PATCH] Use += instead of temporaries clang-tidy explains this is better. I hate C++. --- src/builtins/path.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/builtins/path.cpp b/src/builtins/path.cpp index c0ffe8301..41a2c53b4 100644 --- a/src/builtins/path.cpp +++ b/src/builtins/path.cpp @@ -691,7 +691,9 @@ static int path_resolve(parser_t &parser, io_streams_t &streams, int argc, const real = normalize_path(*real, false); break; } - rest = wbasename(next) + L'/' + rest; + rest = wbasename(next); + rest += L'/'; + rest += rest; } if (!real) { continue;