commit 529089b: [Minor] Css: Implement move only queue properly

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Feb 5 14:28:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-02-05 14:26:38 +0000
URL: https://github.com/rspamd/rspamd/commit/529089bab628319a7f3b7d50d070342421670af4 (HEAD -> master)

[Minor] Css: Implement move only queue properly

---
 src/libserver/css/css_tokeniser.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libserver/css/css_tokeniser.cxx b/src/libserver/css/css_tokeniser.cxx
index 03e70c32f..4f49a35ba 100644
--- a/src/libserver/css/css_tokeniser.cxx
+++ b/src/libserver/css/css_tokeniser.cxx
@@ -446,10 +446,10 @@ auto css_tokeniser::next_token(void) -> struct css_parser_token
 {
 	/* Check pushback queue */
 	if (!backlog.empty()) {
-		auto &tok = backlog.front();
+		auto tok = std::move(backlog.front());
 		backlog.pop_front();
 
-		return std::move(tok);
+		return tok;
 	}
 	/* Helpers */
 


More information about the Commits mailing list