mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Remove unions from the DebugInfo class
This commit is contained in:
parent
e692ca16cd
commit
02fef3f84a
@ -36,29 +36,11 @@ struct DebugInfo
|
||||
{
|
||||
String Path;
|
||||
|
||||
union
|
||||
{
|
||||
int FirstLine;
|
||||
int first_line;
|
||||
};
|
||||
int FirstLine;
|
||||
int FirstColumn;
|
||||
|
||||
union
|
||||
{
|
||||
int FirstColumn;
|
||||
int first_column;
|
||||
};
|
||||
|
||||
union
|
||||
{
|
||||
int LastLine;
|
||||
int last_line;
|
||||
};
|
||||
|
||||
union
|
||||
{
|
||||
int LastColumn;
|
||||
int last_column;
|
||||
};
|
||||
int LastLine;
|
||||
int LastColumn;
|
||||
};
|
||||
|
||||
I2_BASE_API std::ostream& operator<<(std::ostream& out, const DebugInfo& val);
|
||||
|
@ -41,6 +41,21 @@ do { \
|
||||
yycolumn += yyleng; \
|
||||
} while (0);
|
||||
|
||||
#define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) { \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} else { \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC(Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC(Rhs, 0).last_column; \
|
||||
} \
|
||||
while (YYID(0))
|
||||
|
||||
#define YY_INPUT(buf, result, max_size) \
|
||||
do { \
|
||||
result = yyextra->ReadInput(buf, max_size); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user