Skip to content

Commit 8be6fc1

Browse files
committedSep 26, 2022
abstract-filter: provide default handleDef() implementation
... in GenericAbstractFilter to avoid duplicated code in its derivates. No changes in behavior intended by this change.
1 parent daf2af1 commit 8be6fc1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
 

‎src/abstract-filter.hh

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class GenericAbstractFilter: public AbstractWriter {
4141

4242
~GenericAbstractFilter() override = default;
4343

44+
void handleDef(const Defect &def) override {
45+
agent_->handleDef(def);
46+
}
47+
4448
void flush() override {
4549
agent_->flush();
4650
}

‎src/csgrep.cc

-6
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,6 @@ class DropScanProps: public GenericAbstractFilter {
384384
return emp_;
385385
}
386386

387-
protected:
388-
/// trivial pass-through
389-
void handleDef(const Defect &def) override {
390-
agent_->handleDef(def);
391-
}
392-
393387
private:
394388
const TScanProps emp_;
395389
};

0 commit comments

Comments
 (0)
Please sign in to comment.