Skip to content

Commit 0bc503a

Browse files
authored
Merge pull request #1041 from diffblue/add_empty
Add empty() to containers with size()
2 parents 7dbb203 + 7181e41 commit 0bc503a

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

src/pointer-analysis/value_set_fivr.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ class value_set_fivrt
8484
typedef objmapt::iterator iterator;
8585

8686
const_iterator find(unsigned k) { return objmap.find(k); }
87-
iterator begin(void) { return objmap.begin(); }
88-
const_iterator begin(void) const { return objmap.begin(); }
89-
iterator end(void) { return objmap.end(); }
90-
const_iterator end(void) const { return objmap.end(); }
91-
size_t size(void) const { return objmap.size(); }
92-
void clear(void) { objmap.clear(); validity_ranges.clear(); }
87+
iterator begin() { return objmap.begin(); }
88+
const_iterator begin() const { return objmap.begin(); }
89+
iterator end() { return objmap.end(); }
90+
const_iterator end() const { return objmap.end(); }
91+
size_t size() const { return objmap.size(); }
92+
bool empty() const { return objmap.empty(); }
93+
void clear() { objmap.clear(); validity_ranges.clear(); }
9394

9495
objectt &operator[](unsigned k)
9596
{
@@ -112,7 +113,7 @@ class value_set_fivrt
112113
unsigned function;
113114
unsigned from, to;
114115

115-
validity_ranget(void):
116+
validity_ranget():
116117
function(0), from(0), to(0)
117118
{
118119
}
@@ -318,7 +319,7 @@ class value_set_fivrt
318319
const exprt &code,
319320
const namespacet &ns);
320321

321-
bool handover(void);
322+
bool handover();
322323

323324
void assign(
324325
const exprt &lhs,

src/pointer-analysis/value_set_fivrns.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ bool value_set_fivrnst::object_map_dt::is_valid_at(
15081508
return false;
15091509
}
15101510

1511-
bool value_set_fivrnst::handover(void)
1511+
bool value_set_fivrnst::handover()
15121512
{
15131513
bool changed=false;
15141514

src/pointer-analysis/value_set_fivrns.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ class value_set_fivrnst
8585
typedef objmapt::iterator iterator;
8686

8787
const_iterator find(unsigned k) { return objmap.find(k); }
88-
iterator begin(void) { return objmap.begin(); }
89-
const_iterator begin(void) const { return objmap.begin(); }
90-
iterator end(void) { return objmap.end(); }
91-
const_iterator end(void) const { return objmap.end(); }
92-
size_t size(void) const { return objmap.size(); }
93-
void clear(void) { objmap.clear(); validity_ranges.clear(); }
88+
iterator begin() { return objmap.begin(); }
89+
const_iterator begin() const { return objmap.begin(); }
90+
iterator end() { return objmap.end(); }
91+
const_iterator end() const { return objmap.end(); }
92+
size_t size() const { return objmap.size(); }
93+
bool empty() const { return objmap.empty(); }
94+
void clear() { objmap.clear(); validity_ranges.clear(); }
9495

9596
objectt &operator[](unsigned k)
9697
{
@@ -113,7 +114,7 @@ class value_set_fivrnst
113114
unsigned function;
114115
unsigned from, to;
115116

116-
validity_ranget(void):
117+
validity_ranget():
117118
function(0), from(0), to(0)
118119
{
119120
}
@@ -315,7 +316,7 @@ class value_set_fivrnst
315316
const exprt &code,
316317
const namespacet &ns);
317318

318-
bool handover(void);
319+
bool handover();
319320

320321
void assign(
321322
const exprt &lhs,

src/solvers/sat/satcheck_minisat2.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Author: Daniel Kroening, [email protected]
1515
#include <stack>
1616

1717
#include <util/threeval.h>
18+
#include <util/invariant.h>
1819

1920
#include "satcheck_minisat2.h"
2021

0 commit comments

Comments
 (0)