mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 22:17:57 -05:00
Redirect Yao evaluator output to file if requested.
This commit is contained in:
@@ -17,13 +17,17 @@ class SwitchableOutput
|
||||
public:
|
||||
SwitchableOutput(bool on = true)
|
||||
{
|
||||
activate(false);
|
||||
activate(on);
|
||||
}
|
||||
|
||||
void activate(bool on)
|
||||
{
|
||||
if (on)
|
||||
out = &cout;
|
||||
{
|
||||
if (out == 0)
|
||||
out = &cout;
|
||||
}
|
||||
else
|
||||
out = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user