2018-06-20 14:12:42 +02:00
|
|
|
#include "SimpleDwarfFilter.hpp"
|
|
|
|
|
2018-07-04 18:14:30 +02:00
|
|
|
SimpleDwarfFilter::SimpleDwarfFilter(bool enable): enable(enable)
|
2018-06-20 14:12:42 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
SimpleDwarf SimpleDwarfFilter::apply(const SimpleDwarf& dw) const {
|
2018-07-04 18:14:30 +02:00
|
|
|
if(!enable)
|
|
|
|
return dw;
|
2018-06-20 14:12:42 +02:00
|
|
|
return do_apply(dw);
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleDwarf SimpleDwarfFilter::operator()(const SimpleDwarf& dw) {
|
|
|
|
return apply(dw);
|
|
|
|
}
|