The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: neroden on July 10, 2010, 10:15:34 pm

Title: Fix compilation failure on gcc... by being const-correct
Post by: neroden on July 10, 2010, 10:15:34 pm
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.)
Title: Re: Fix compilation failure on gcc... by being const-correct
Post by: neroden on July 11, 2010, 04:00:28 pm
You can forget this patch as the compilation failure was fixed another way. :-)