Remove empty checks

This commit is contained in:
Jason Rhinelander 2020-05-11 15:51:01 -03:00
parent 3ca750c5e1
commit 53057e9c8b
2 changed files with 4 additions and 7 deletions

View file

@ -17,13 +17,10 @@ namespace epee {
void operator()(const array_entry_t<t_type>& a)
{
m_strm << '[';
if (!a.m_array.empty())
for (auto it = a.m_array.begin(); it != a.m_array.end(); it++)
{
for (auto it = a.m_array.begin(); it != a.m_array.end(); it++)
{
if (it != a.m_array.begin()) m_strm << ',';
dump_as_json(m_strm, *it, m_indent, m_pretty);
}
if (it != a.m_array.begin()) m_strm << ',';
dump_as_json(m_strm, *it, m_indent, m_pretty);
}
m_strm << "]";
}

View file

@ -490,7 +490,7 @@ namespace cryptonote
MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)tx_weight));
if (!opts.kept_by_block && !opts.do_not_relay && !m_tx_notify.empty())
if (!opts.kept_by_block && !opts.do_not_relay)
for (auto& notify : m_tx_notify)
notify(id, tx, blob, opts);