mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
use container empty() rather than size() where appropriate
This commit is contained in:
parent
9b2eb2c373
commit
ffd1905f90
13 changed files with 37 additions and 37 deletions
|
@ -231,7 +231,7 @@ string ZInst::VName(int n, int inst_num, const FrameReMap* mappings) const
|
|||
ASSERT(i > 0);
|
||||
}
|
||||
|
||||
auto id = map.names.size() > 0 ? map.names[i-1] : map.ids[i-1]->Name();
|
||||
auto id = map.names.empty() ? map.ids[i-1]->Name() : map.names[i-1];
|
||||
|
||||
return util::fmt("%d (%s)", slot, id);
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ bool ZInstI::IsGlobalLoad() const
|
|||
|
||||
static std::unordered_set<ZOp> global_ops;
|
||||
|
||||
if ( global_ops.size() == 0 )
|
||||
if ( global_ops.empty() )
|
||||
{ // Initialize the set.
|
||||
for ( int t = 0; t < NUM_TYPES; ++t )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue