mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
Style, whitespace.
This commit is contained in:
parent
a1a662b23f
commit
6ce903b1d6
|
@ -20,7 +20,7 @@ Revision History:
|
|||
#include "common_msgs.h"
|
||||
|
||||
reslimit::reslimit():
|
||||
m_cancel(false),
|
||||
m_cancel(0),
|
||||
m_count(0),
|
||||
m_limit(0) {
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ uint64 reslimit::count() const {
|
|||
return m_count;
|
||||
}
|
||||
|
||||
|
||||
bool reslimit::inc() {
|
||||
++m_count;
|
||||
return m_cancel == 0 && (m_limit == 0 || m_count <= m_limit);
|
||||
|
@ -46,7 +45,7 @@ void reslimit::push(unsigned delta_limit) {
|
|||
new_limit = 0;
|
||||
}
|
||||
m_limits.push_back(m_limit);
|
||||
m_limit = m_limit==0?new_limit:std::min(new_limit, m_limit);
|
||||
m_limit = m_limit==0 ? new_limit : std::min(new_limit, m_limit);
|
||||
m_cancel = 0;
|
||||
}
|
||||
|
||||
|
@ -71,14 +70,14 @@ char const* reslimit::get_cancel_msg() const {
|
|||
void reslimit::push_child(reslimit* r) {
|
||||
#pragma omp critical (reslimit_cancel)
|
||||
{
|
||||
m_children.push_back(r);
|
||||
m_children.push_back(r);
|
||||
}
|
||||
}
|
||||
|
||||
void reslimit::pop_child() {
|
||||
#pragma omp critical (reslimit_cancel)
|
||||
{
|
||||
m_children.pop_back();
|
||||
m_children.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +98,7 @@ void reslimit::reset_cancel() {
|
|||
|
||||
void reslimit::inc_cancel() {
|
||||
#pragma omp critical (reslimit_cancel)
|
||||
{
|
||||
{
|
||||
set_cancel(m_cancel+1);
|
||||
}
|
||||
}
|
||||
|
@ -114,8 +113,8 @@ void reslimit::dec_cancel() {
|
|||
}
|
||||
}
|
||||
|
||||
void reslimit::set_cancel(unsigned f) {
|
||||
m_cancel = f;
|
||||
void reslimit::set_cancel(unsigned f) {
|
||||
m_cancel = f;
|
||||
for (unsigned i = 0; i < m_children.size(); ++i) {
|
||||
m_children[i]->set_cancel(f);
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ class reslimit {
|
|||
ptr_vector<reslimit> m_children;
|
||||
|
||||
void set_cancel(unsigned f);
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
reslimit();
|
||||
void push(unsigned delta_limit);
|
||||
void pop();
|
||||
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
bool inc();
|
||||
bool inc(unsigned offset);
|
||||
uint64 count() const;
|
||||
uint64 count() const;
|
||||
|
||||
|
||||
bool get_cancel_flag() const { return m_cancel > 0; }
|
||||
|
|
Loading…
Reference in a new issue