Simplified some code
This commit is contained in:
parent
77e6694de5
commit
96dc3dcf9e
1 changed files with 4 additions and 5 deletions
|
|
@ -1397,13 +1397,12 @@ void inject_posts::operator()(post_t& post)
|
||||||
{
|
{
|
||||||
foreach (tags_list_pair& pair, tags_list) {
|
foreach (tags_list_pair& pair, tags_list) {
|
||||||
optional<value_t> tag_value = post.get_tag(pair.first, false);
|
optional<value_t> tag_value = post.get_tag(pair.first, false);
|
||||||
if (! tag_value &&
|
|
||||||
pair.second.second.find(post.xact) == pair.second.second.end()) {
|
|
||||||
// When checking if the transaction has the tag, only inject once
|
// When checking if the transaction has the tag, only inject once
|
||||||
// per transaction.
|
// per transaction.
|
||||||
|
if (! tag_value &&
|
||||||
|
pair.second.second.find(post.xact) == pair.second.second.end() &&
|
||||||
|
(tag_value = post.xact->get_tag(pair.first)))
|
||||||
pair.second.second.insert(post.xact);
|
pair.second.second.insert(post.xact);
|
||||||
tag_value = post.xact->get_tag(pair.first);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tag_value) {
|
if (tag_value) {
|
||||||
xact_t& xact = temps.copy_xact(*post.xact);
|
xact_t& xact = temps.copy_xact(*post.xact);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue