Skip to content

Commit

Permalink
Add some clarification steemit#1161
Browse files Browse the repository at this point in the history
  • Loading branch information
theoreticalbts committed Jun 7, 2017
1 parent f62d92f commit 9f7213b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/plugins/tags/tags_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,14 @@ struct operation_visitor {
}
}

// We need to write the transformed tags into a temporary
// local container because we can't modify meta.tags concurrently
// as we iterate over it.
set< string > lower_tags;

uint8_t tag_limit = 5;
uint8_t count = 0;
for( const auto& tag : meta.tags )
for( const string& tag : meta.tags )
{
++count;
if( count > tag_limit || lower_tags.size() > tag_limit )
Expand Down Expand Up @@ -407,7 +410,7 @@ struct operation_visitor {
const auto& c = _db.get_comment( op.author, op.permlink );
update_tags( c );

auto meta = filter_tags( c );
comment_metadata meta = filter_tags( c );

for( const string& tag : meta.tags )
{
Expand Down

0 comments on commit 9f7213b

Please sign in to comment.