Skip to content

Add empty() to containers with size() #1041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/pointer-analysis/value_set_fivr.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ class value_set_fivrt
typedef objmapt::iterator iterator;

const_iterator find(unsigned k) { return objmap.find(k); }
iterator begin(void) { return objmap.begin(); }
const_iterator begin(void) const { return objmap.begin(); }
iterator end(void) { return objmap.end(); }
const_iterator end(void) const { return objmap.end(); }
size_t size(void) const { return objmap.size(); }
void clear(void) { objmap.clear(); validity_ranges.clear(); }
iterator begin() { return objmap.begin(); }
const_iterator begin() const { return objmap.begin(); }
iterator end() { return objmap.end(); }
const_iterator end() const { return objmap.end(); }
size_t size() const { return objmap.size(); }
bool empty() const { return objmap.empty(); }
void clear() { objmap.clear(); validity_ranges.clear(); }

objectt &operator[](unsigned k)
{
Expand All @@ -112,7 +113,7 @@ class value_set_fivrt
unsigned function;
unsigned from, to;

validity_ranget(void):
validity_ranget():
function(0), from(0), to(0)
{
}
Expand Down Expand Up @@ -318,7 +319,7 @@ class value_set_fivrt
const exprt &code,
const namespacet &ns);

bool handover(void);
bool handover();

void assign(
const exprt &lhs,
Expand Down
2 changes: 1 addition & 1 deletion src/pointer-analysis/value_set_fivrns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ bool value_set_fivrnst::object_map_dt::is_valid_at(
return false;
}

bool value_set_fivrnst::handover(void)
bool value_set_fivrnst::handover()
{
bool changed=false;

Expand Down
17 changes: 9 additions & 8 deletions src/pointer-analysis/value_set_fivrns.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ class value_set_fivrnst
typedef objmapt::iterator iterator;

const_iterator find(unsigned k) { return objmap.find(k); }
iterator begin(void) { return objmap.begin(); }
const_iterator begin(void) const { return objmap.begin(); }
iterator end(void) { return objmap.end(); }
const_iterator end(void) const { return objmap.end(); }
size_t size(void) const { return objmap.size(); }
void clear(void) { objmap.clear(); validity_ranges.clear(); }
iterator begin() { return objmap.begin(); }
const_iterator begin() const { return objmap.begin(); }
iterator end() { return objmap.end(); }
const_iterator end() const { return objmap.end(); }
size_t size() const { return objmap.size(); }
bool empty() const { return objmap.empty(); }
void clear() { objmap.clear(); validity_ranges.clear(); }

objectt &operator[](unsigned k)
{
Expand All @@ -113,7 +114,7 @@ class value_set_fivrnst
unsigned function;
unsigned from, to;

validity_ranget(void):
validity_ranget():
function(0), from(0), to(0)
{
}
Expand Down Expand Up @@ -315,7 +316,7 @@ class value_set_fivrnst
const exprt &code,
const namespacet &ns);

bool handover(void);
bool handover();

void assign(
const exprt &lhs,
Expand Down
1 change: 1 addition & 0 deletions src/solvers/sat/satcheck_minisat2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Author: Daniel Kroening, [email protected]
#include <stack>

#include <util/threeval.h>
#include <util/invariant.h>

#include "satcheck_minisat2.h"

Expand Down