Obj: make the Location destructor non-virtual

Nobody ever derives from this class.  This removes an indirect call
and allows inlining the destructor.

This speeds up Zeek startup by 1-2%.
This commit is contained in:
Max Kellermann 2020-02-04 10:35:04 +01:00
parent 23e82b8121
commit 2041921fcb

View file

@ -6,7 +6,7 @@
class ODesc; class ODesc;
class Location { class Location final {
public: public:
Location(const char* fname, int line_f, int line_l, int col_f, int col_l) Location(const char* fname, int line_f, int line_l, int col_f, int col_l)
{ {
@ -30,7 +30,7 @@ public:
text = 0; text = 0;
} }
virtual ~Location() ~Location()
{ {
if ( delete_data ) if ( delete_data )
delete [] filename; delete [] filename;