From 94dd209e5e468610ef1b889b74cb77ac22722db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 17 May 2017 20:21:34 +0200 Subject: [PATCH] Linking constants to their declarations by reference instead of pointer. --- lib/pddlparse/include/pddlparse/AST.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pddlparse/include/pddlparse/AST.h b/lib/pddlparse/include/pddlparse/AST.h index c7ce266..a46c16a 100644 --- a/lib/pddlparse/include/pddlparse/AST.h +++ b/lib/pddlparse/include/pddlparse/AST.h @@ -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; }; ////////////////////////////////////////////////////////////////////////////////////////////////////