Comment 41 for bug 642117

Revision history for this message
Niall Creech (sevenmachines-deactivatedaccount) wrote :

Indeed, using a cast to double in element.h:rxpos(), element.h:rypos() fails with the error

In file included from /tmp/buildd/musescore-0.9.6+dfsg/build/mscore/../../mscore/mscore/score.h:35,
                 from /tmp/buildd/musescore-0.9.6+dfsg/build/mscore/moc_score.cxx:10:
/tmp/buildd/musescore-0.9.6+dfsg/build/mscore/../../mscore/mscore/element.h: In member function 'double& Element::rxpos()':
/tmp/buildd/musescore-0.9.6+dfsg/build/mscore/../../mscore/mscore/element.h:192: error: invalid initialization of non-const reference of type 'double&' from a temporary of type 'double'
/tmp/buildd/musescore-0.9.6+dfsg/build/mscore/../../mscore/mscore/element.h: In member function 'double& Element::rypos()':
/tmp/buildd/musescore-0.9.6+dfsg/build/mscore/../../mscore/mscore/element.h:193: error: invalid initialization of non-const reference of type 'double&' from a temporary of type 'double'

I think i tried this before realising the reference return. In the end I thought it was better to use an __arm__ section than start to start possibly spreading the changes too wide. Theres probably a better way to do it but it was the first and simplest that sprung to my mind :)