The International Simutrans Forum
September 10, 2010, 08:45:18 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
The Simutrans Blog
Interesting news about Simutrans World and more.
 
   Home   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Fix compilation failure on gcc... by being const-correct  (Read 172 times)
0 Members and 1 Guest are viewing this topic.
neroden
*
Offline Offline

Posts: 427

Nathanael Nerode


« on: July 10, 2010, 11: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.)

* climate-compilation-fix.diff (1.16 KB - downloaded 15 times.)
« Last Edit: July 11, 2010, 05:04:26 AM by neroden » Logged
neroden
*
Offline Offline

Posts: 427

Nathanael Nerode


« Reply #1 on: July 11, 2010, 05:00:28 PM »

You can forget this patch as the compilation failure was fixed another way. :-)
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.154 seconds with 21 queries.