Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/binpac_analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ namespace binpac {
// The interface for a connection analyzer
class ConnectionAnalyzer {
public:
virtual ~ConnectionAnalyzer() {}
virtual ~ConnectionAnalyzer() = default;
virtual void NewData(bool is_orig, const unsigned char* begin_of_data, const unsigned char* end_of_data) = 0;
};

// The interface for a flow analyzer
class FlowAnalyzer {
public:
virtual ~FlowAnalyzer() {}
virtual ~FlowAnalyzer() = default;
virtual void NewData(const unsigned char* begin_of_data, const unsigned char* end_of_data) = 0;
};

Expand Down
2 changes: 1 addition & 1 deletion src/pac_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void ConnDecl::GenGapFunc(Output* out_h, Output* out_cc) {
void ConnDecl::GenProcessFunc(Output* out_h, Output* out_cc) {
string proto = strfmt("%s(bool is_orig, const_byteptr begin, const_byteptr end)", kNewData);

out_h->println("void %s;", proto.c_str());
out_h->println("void %s override;", proto.c_str());

out_cc->println("void %s::%s {", class_name().c_str(), proto.c_str());
out_cc->inc_indent();
Expand Down
1 change: 1 addition & 0 deletions src/pac_enum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void EnumDecl::Prepare() {
}

void EnumDecl::GenForwardDeclaration(Output* out_h) {
out_h->println("// NOLINTNEXTLINE(performance-enum-size)");
out_h->println("enum %s {", id_->Name());
out_h->inc_indent();
int c = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/pac_flow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void FlowDecl::GenProcessFunc(Output* out_h, Output* out_cc) {
string proto = strfmt("%s(const_byteptr %s, const_byteptr %s)", kNewData, env_->LValue(begin_of_data),
env_->LValue(end_of_data));

out_h->println("void %s;", proto.c_str());
out_h->println("void %s override;", proto.c_str());

out_cc->println("void %s::%s {", class_name().c_str(), proto.c_str());
out_cc->inc_indent();
Expand Down
8 changes: 7 additions & 1 deletion src/pac_typedecl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,15 @@ void TypeDecl::GenConstructorFunc(Output* out_h, Output* out_cc) {
}

void TypeDecl::GenDestructorFunc(Output* out_h, Output* out_cc) {
vector<string> base_classes;
AddBaseClass(&base_classes);

string proto = strfmt("~%s()", class_name().c_str());

out_h->println("%s;", proto.c_str());
if ( base_classes.empty() )
out_h->println("%s;", proto.c_str());
else
out_h->println("%s override;", proto.c_str());

out_cc->println("%s::%s {", class_name().c_str(), proto.c_str());
out_cc->inc_indent();
Expand Down
Loading