From ccd6f05fe1e6cd5a1611b0df78974fa39869013d Mon Sep 17 00:00:00 2001 From: Aaron Burghardt Date: Fri, 15 Aug 2014 21:59:01 -0400 Subject: Change Clone() to be const, which required constructors with const references and a const GetValue(). --- src/Real.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Real.cpp') diff --git a/src/Real.cpp b/src/Real.cpp index 768d07c..ec300c9 100644 --- a/src/Real.cpp +++ b/src/Real.cpp @@ -32,7 +32,7 @@ Real::Real(plist_t node, Node* parent) : Node(node, parent) { } -Real::Real(PList::Real& d) : Node(PLIST_UINT) +Real::Real(const PList::Real& d) : Node(PLIST_UINT) { plist_set_real_val(_node, d.GetValue()); } @@ -53,7 +53,7 @@ Real::~Real() { } -Node* Real::Clone() +Node* Real::Clone() const { return new Real(*this); } @@ -63,7 +63,7 @@ void Real::SetValue(double d) plist_set_real_val(_node, d); } -double Real::GetValue() +double Real::GetValue() const { double d = 0.; plist_get_real_val(_node, &d); -- cgit v1.1-32-gdbae