3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-30 04:15:51 +00:00

Reorganizing source code. Created util dir

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-20 10:19:38 -07:00
parent 630ba0c675
commit 2c464d413d
153 changed files with 0 additions and 0 deletions

37
src/util/pop_scopes.h Normal file
View file

@ -0,0 +1,37 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
pop_scopes.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-06-02.
Revision History:
--*/
#ifndef _POP_SCOPES_H_
#define _POP_SCOPES_H_
#define POP_SCOPES(_num_scopes, _lim, _trail, _action) \
if (_num_scopes > 0) \
{ \
unsigned scope_lvl = _lim.size(); \
unsigned new_lvl = scope_lvl - _num_scopes; \
unsigned curr_size = _trail.size(); \
unsigned old_size = _lim[new_lvl]; \
for (unsigned i = curr_size-1; i >= old_size && i != static_cast<unsigned>(-1); --i) { \
_action; \
} \
_trail.shrink(old_size); \
_lim.shrink(new_lvl); \
}
#endif /* _POP_SCOPES_H_ */