From a9d137fab6bfc627779106792739887a07ca5940 Mon Sep 17 00:00:00 2001 From: Username404 Date: Thu, 10 Jun 2021 21:57:56 +0200 Subject: [PATCH] Use the assign operator for a few variables in main.cpp. --- src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a323176..be981fe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,8 +17,7 @@ int main(int argc, char* argv[]) { if ((currentArg == "--printresult") || (currentArg == "-p")) printResult = true; else if (currentArg.starts_with("--target=")) { currentArg.remove_prefix(9); - target = '.'; - target += currentArg; + (target = '.') += currentArg; } else if (currentArg.ends_with(".ybcon")) files.push_back(currentArg); } @@ -29,7 +28,7 @@ int main(int argc, char* argv[]) { if (printResult) cout << "~~~~[Yerbacon compilation result]~~~~\n\n" << "[WIP]\n" << transpiledString << "\n\n"; fileName.remove_suffix(6); string outputFile; - outputFile.append(fileName); outputFile.append(target); + (outputFile = fileName).append(target); outputFileContent(outputFile, transpiledString); } }