mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-04-20 03:01:31 -04:00
37 lines
476 B
C++
37 lines
476 B
C++
/*
|
|
* RuntimeBranching.h
|
|
*
|
|
*/
|
|
|
|
#ifndef GC_RUNTIMEBRANCHING_H_
|
|
#define GC_RUNTIMEBRANCHING_H_
|
|
|
|
namespace GC
|
|
{
|
|
|
|
class RuntimeBranching
|
|
{
|
|
bool tainted;
|
|
|
|
public:
|
|
RuntimeBranching() : tainted(false)
|
|
{
|
|
}
|
|
|
|
void untaint()
|
|
{
|
|
bool was_tainted = tainted;
|
|
tainted = false;
|
|
if (was_tainted)
|
|
throw needs_cleaning();
|
|
}
|
|
void taint()
|
|
{
|
|
tainted = true;
|
|
}
|
|
};
|
|
|
|
} /* namespace GC */
|
|
|
|
#endif /* GC_RUNTIMEBRANCHING_H_ */
|