]> git.donarmstrong.com Git - lilypond.git/commitdiff
Avoid using ?: on lvalues in Protected_scm
authorDavid Kastrup <dak@gnu.org>
Mon, 13 Jun 2016 22:38:54 +0000 (00:38 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 13 Jun 2016 22:39:55 +0000 (00:39 +0200)
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

index 75091e19015ce3d78e87dd208be3fae1cf2b9f73..a9fabdc4f2e6fa69803b4c2aaa2c3583039d2154 100644 (file)
@@ -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 & ()