From b4618dc514955091a93522d77aa81a1f3ae1f06c Mon Sep 17 00:00:00 2001 From: Oleksandr Labetskyi Date: Tue, 18 Jun 2024 19:49:16 +0300 Subject: [PATCH] Small fix 2 --- lib/preprocessor.cpp | 4 ++-- lib/preprocessor.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index b7a336a38e5..f3227d9f62a 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -49,10 +49,10 @@ Directive::Directive(std::string _file, const int _linenr, const std::string &_s str(trim(_str)) {} -Directive::DirectiveToken::DirectiveToken(const std::string & _str, int _line, int _column) : +Directive::DirectiveToken::DirectiveToken(std::string _str, int _line, int _column) : line(_line), column(_column), - tokStr(_str) + tokStr(std::move(_str)) {} char Preprocessor::macroChar = char(1); diff --git a/lib/preprocessor.h b/lib/preprocessor.h index fe9940679d5..bd05d0fcf65 100644 --- a/lib/preprocessor.h +++ b/lib/preprocessor.h @@ -57,7 +57,7 @@ struct CPPCHECKLIB Directive { std::string str; struct DirectiveToken { - explicit DirectiveToken(const std::string & _str, int _line, int _column); + explicit DirectiveToken(std::string _str, int _line, int _column); int line; int column; std::string tokStr;