Linking constants to their declarations by reference instead of pointer.

This commit is contained in:
2017-05-17 20:21:34 +02:00
parent 5d65cc3100
commit 94dd209e5e

View File

@@ -26,7 +26,7 @@ namespace ast
struct Constant struct Constant
{ {
explicit Constant(ConstantDeclaration *declaration) explicit Constant(ConstantDeclaration &declaration)
: declaration{declaration} : declaration{declaration}
{ {
} }
@@ -36,7 +36,7 @@ struct Constant
Constant(Constant &&other) = default; Constant(Constant &&other) = default;
Constant &operator=(Constant &&other) = default; Constant &operator=(Constant &&other) = default;
ConstantDeclaration *declaration{nullptr}; ConstantDeclaration &declaration;
}; };
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////