Linking constants to their declarations by reference instead of pointer.

This commit is contained in:
Patrick Lühne 2017-05-17 20:21:34 +02:00
parent 5d65cc3100
commit 94dd209e5e
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -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;
};
////////////////////////////////////////////////////////////////////////////////////////////////////