From 5d40b498e0b3c7cb2e0fdf5e90ad7be54f72211c Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 14 Jun 2016 00:38:54 +0200 Subject: [PATCH] Avoid using ?: on lvalues in Protected_scm This might have caused problems with older compilers. C++11 sounds like it would have been fine with th original code. --- lily/protected-scm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lily/protected-scm.cc b/lily/protected-scm.cc index 75091e1901..a9fabdc4f2 100644 --- a/lily/protected-scm.cc +++ b/lily/protected-scm.cc @@ -72,7 +72,9 @@ Protected_scm::operator = (Protected_scm const &s) Protected_scm::operator SCM const & () const { - return SCM_CONSP (object_) ? *SCM_CARLOC (object_) : object_; + if (SCM_CONSP (object_)) + return *SCM_CARLOC (object_); + return object_; } Protected_scm::operator SCM & () -- 2.39.2