mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
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:
parent
23e82b8121
commit
2041921fcb
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue