FreeOrion

Forums for the FreeOrion project
It is currently Sat Nov 18, 2017 6:09 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Apr 03, 2017 2:15 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
I'm missing something, and I'm hoping for advice.

C++ normally complains if you don't use unique identifiers.
In Condition.h, we have
Code:
struct FO_COMMON_API Building : public ConditionBase {

while in Building.h we have
Code:
class FO_COMMON_API Building : public UniverseObject {

Both of these headers are used in Building.cpp, and probably other places.
How is there not a conflict (since structs and classes are pretty much interchangeable)?
I was going to post an issue about renaming one of those Building variables (to reduce confusion), but I wanted to check if this was done by design (some overload trick I'm not thinking of).


Top
 Profile  
 
PostPosted: Mon Apr 03, 2017 2:56 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12012
Location: Munich
The Building condition is in the Condition namespace. The Building class derived from Universe is not.


Top
 Profile  
 
PostPosted: Mon Apr 03, 2017 3:57 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
Okay, I see that now. Thanks.

(Saw that it wasn't in the Building namespace, but missed the one in Condition. That is one file where indenting everything inside the namespace would have helped.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group