mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Obj: make no_location
constexpr
This ensures that the variable is initialized at compile time and may allow the compiler to apply more initializations.
This commit is contained in:
parent
2a7f2e0217
commit
2ac48ff1d4
2 changed files with 1 additions and 2 deletions
|
@ -10,7 +10,6 @@
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "plugin/Manager.h"
|
#include "plugin/Manager.h"
|
||||||
|
|
||||||
Location no_location("<no location>", 0, 0, 0, 0);
|
|
||||||
Location start_location("<start uninitialized>", 0, 0, 0, 0);
|
Location start_location("<start uninitialized>", 0, 0, 0, 0);
|
||||||
Location end_location("<end uninitialized>", 0, 0, 0, 0);
|
Location end_location("<end uninitialized>", 0, 0, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ typedef Location yyltype;
|
||||||
YYLTYPE GetCurrentLocation();
|
YYLTYPE GetCurrentLocation();
|
||||||
|
|
||||||
// Used to mean "no location associated with this object".
|
// Used to mean "no location associated with this object".
|
||||||
extern Location no_location;
|
inline constexpr Location no_location("<no location>", 0, 0, 0, 0);
|
||||||
|
|
||||||
// Current start/end location.
|
// Current start/end location.
|
||||||
extern Location start_location;
|
extern Location start_location;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue