Linking constants to their declarations by reference instead of pointer.
This commit is contained in:
parent
5d65cc3100
commit
94dd209e5e
@ -26,7 +26,7 @@ namespace ast
|
||||
|
||||
struct Constant
|
||||
{
|
||||
explicit Constant(ConstantDeclaration *declaration)
|
||||
explicit Constant(ConstantDeclaration &declaration)
|
||||
: declaration{declaration}
|
||||
{
|
||||
}
|
||||
@ -36,7 +36,7 @@ struct Constant
|
||||
Constant(Constant &&other) = default;
|
||||
Constant &operator=(Constant &&other) = default;
|
||||
|
||||
ConstantDeclaration *declaration{nullptr};
|
||||
ConstantDeclaration &declaration;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user