Make the argument of parseString a const reference.

This commit is contained in:
Username404-59 2021-03-05 14:41:46 +01:00
parent 915774cce3
commit 11b92f7346
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ string getFileContent(const string& file);
void setOutputFileContent(const string& language, const string& file, const string& content);
#include "ParseComponents.hpp"
ParseTree parseString(unique_ptr<string> toParse);
ParseTree parseString(const unique_ptr<string>& toParse);
string transpile(ParseTree toTranspile, string language);
#endif //YERBACON_MISC_HPP

View File

@ -6,7 +6,7 @@
using namespace std;
ParseTree parseString(unique_ptr<string> toParse) {
ParseTree parseString(const unique_ptr<string>& toParse) {
ParseTree parseTree = ParseTree();
auto lexed = lex(*toParse);
for (tok& token: lexed) {