News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Fix compilation failure on gcc... by being const-correct

Started by neroden, July 10, 2010, 10:15:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

That 'casting away constness' bug?  Recent changes caused it to turn into a failure-to-compile bug on gcc.  (Sometimes the compiler believes you if you tell it that something is const....)  

I fixed it.  The function returns a non-const value now.  In addition, a section of code is restructured to use a modifiable lvalue rather than an rvalue.  Patch is attached.  (edit: compiles and runs.)

neroden

You can forget this patch as the compilation failure was fixed another way. :-)