compile problem from recent ObjectListWnd change

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

compile problem from recent ObjectListWnd change

#1 Post by Dilvish »

Code: Select all

/home/FO/programs/freeorion_test/UI/ObjectListWnd.cpp:830:121: error: invalid initialization of non-const reference of type ‘std::set<{anonymous}::VIS_DISPLAY>&’ from an rvalue of type ‘std::set<{anonymous}::VIS_DISPLAY>’
Since it didn't look like a large set I just took out the ampersand & it compiled fine, but I didn't commit any changes yet-- Geoff, would you prefer some other solution?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: compile problem from recent ObjectListWnd change

#2 Post by Geoff the Medio »

Removing the & should be fine. Or changing to

Code: Select all

const std::set<VIS_DISPLAY>& shown_vis ...

Post Reply