summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-08-31 13:12:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-08-31 13:12:00 +0100
commit5f29ce0df5ced4301c686ffca154e7f7f2db14ab (patch)
tree0d9e454df4d03d4ee40458c2d19fd6f0e12d2ae3 /src
parentec6c7eada0d14e8dac5f5bf3dcc95fc31fd696a2 (diff)
downloadrspamd-5f29ce0df5ced4301c686ffca154e7f7f2db14ab.tar.gz
rspamd-5f29ce0df5ced4301c686ffca154e7f7f2db14ab.zip
[Fix] Another try to fix references safety
Issue: #3871
Diffstat (limited to 'src')
-rw-r--r--src/libserver/css/css_parser.cxx12
-rw-r--r--src/libserver/css/css_tokeniser.hxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libserver/css/css_parser.cxx b/src/libserver/css/css_parser.cxx
index ef3d6f666..d7d56f3e5 100644
--- a/src/libserver/css/css_parser.cxx
+++ b/src/libserver/css/css_parser.cxx
@@ -319,7 +319,7 @@ auto css_parser::simple_block_consumer(std::unique_ptr<css_consumed_block> &top,
/* Ignore whitespaces */
break;
default:
- tokeniser->pushback_token(std::move(next_token));
+ tokeniser->pushback_token(next_token);
ret = component_value_consumer(consume_current ? top : block);
break;
}
@@ -379,7 +379,7 @@ auto css_parser::qualified_rule_consumer(std::unique_ptr<css_consumed_block> &to
/* Ignore whitespaces */
break;
default:
- tokeniser->pushback_token(std::move(next_token));
+ tokeniser->pushback_token(next_token);
ret = component_value_consumer(block);
break;
};
@@ -442,7 +442,7 @@ auto css_parser::at_rule_consumer(std::unique_ptr<css_consumed_block> &top) -> b
want_more = false;
break;
default:
- tokeniser->pushback_token(std::move(next_token));
+ tokeniser->pushback_token(next_token);
ret = component_value_consumer(block);
break;
};
@@ -559,11 +559,11 @@ css_parser::consume_css_blocks(const std::string_view &sv) -> std::unique_ptr<cs
eof = true;
break;
case css_parser_token::token_type::at_keyword_token:
- tokeniser->pushback_token(std::move(next_token));
+ tokeniser->pushback_token(next_token);
ret = at_rule_consumer(consumed_blocks);
break;
default:
- tokeniser->pushback_token(std::move(next_token));
+ tokeniser->pushback_token(next_token);
ret = qualified_rule_consumer(consumed_blocks);
break;
}
@@ -595,7 +595,7 @@ css_parser::consume_css_rule(const std::string_view &sv) -> std::unique_ptr<css_
/* Ignore whitespaces */
break;
default:
- tokeniser->pushback_token(std::move(next_token));
+ tokeniser->pushback_token(next_token);
ret = component_value_consumer(rule_block);
break;
}
diff --git a/src/libserver/css/css_tokeniser.hxx b/src/libserver/css/css_tokeniser.hxx
index 36ab33d8a..ac38df463 100644
--- a/src/libserver/css/css_tokeniser.hxx
+++ b/src/libserver/css/css_tokeniser.hxx
@@ -186,8 +186,8 @@ public:
auto next_token(void) -> struct css_parser_token;
auto get_offset(void) const { return offset; }
- auto pushback_token(struct css_parser_token &&t) const -> void {
- backlog.push_back(std::forward<css_parser_token>(t));
+ auto pushback_token(const struct css_parser_token &t) const -> void {
+ backlog.push_back(t);
}
private:
std::string_view input;