From: David Kastrup Date: Mon, 13 Jun 2016 22:38:54 +0000 (+0200) Subject: Avoid using ?: on lvalues in Protected_scm X-Git-Tag: release/2.19.44-1~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5d40b498e0b3c7cb2e0fdf5e90ad7be54f72211c;p=lilypond.git 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. --- 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 & ()