Consolidate some optionsdb code

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Consolidate some optionsdb code

#1 Post by vincele »

The following patch factorize some cut-n-pasted code to serialize the XML config file. There were slight differences in the 6 different versions, I hope to have chosen the right copy...

diffstat is nice: 7 files changed, 26 insertions(+), 80 deletions(-)

[The extension diff has been deactivated and can no longer be displayed.]

Edit: here is another Directories.{cpp,h} consolidation, that may need compile testing under windows and macosx. Runtime testing would even be nicer...
Diffstat is additional to the previous one : 7 files changed, 52 insertions(+), 160 deletions(-)

[The extension diff has been deactivated and can no longer be displayed.]

All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Consolidate some optionsdb code

#2 Post by adrian_broher »

vincele wrote:The following patch factorize some cut-n-pasted code to serialize the XML config file. There were slight differences in the 6 different versions, I hope to have chosen the right copy...

diffstat is nice: 7 files changed, 26 insertions(+), 80 deletions(-)
Commited as r7686.
vincele wrote:Edit: here is another Directories.{cpp,h} consolidation, that may need compile testing under windows and macosx. Runtime testing would even be nicer...
Diffstat is additional to the previous one : 7 files changed, 52 insertions(+), 160 deletions(-)
Not commited, the boost::fs v2 api should go away soon.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: Consolidate some optionsdb code

#3 Post by vincele »

adrian_broher wrote:Commited as r7686.
Thanks
adrian_broher wrote:Not commited, the boost::fs v2 api should go away soon.
OK But part of that should still be of interrest, I'll rediff after the one from that other thread lands...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Consolidate some optionsdb code

#4 Post by adrian_broher »

vincele wrote:
adrian_broher wrote:Commited as r7686.
PK But part of that should still be of interrest, I'll rediff after the one from that other thread lands...
Feel free to do so.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: Consolidate some optionsdb code

#5 Post by vincele »

adrian_broher wrote:
vincele wrote:But part of that should still be of interest, I'll rediff after the one from that other thread lands...
Feel free to do so.
Now that we got rid of Boost FS v2, I rediffed the remaining piece of this cleanup against current svn trunk...

[The extension diff has been deactivated and can no longer be displayed.]

Diffstat still interesting : 7 files changed, 42 insertions(+), 137 deletions(-)
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

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

Re: Consolidate some optionsdb code

#6 Post by Geoff the Medio »

Edited version committed.

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: Consolidate some optionsdb code

#7 Post by vincele »

Thanks, can you explain what has been edited, so that maybe next time it won't be needed...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

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

Re: Consolidate some optionsdb code

#8 Post by Geoff the Medio »

I removed the AbsolutePath function as it wasn't used. I renamed Path to FilenameToPath as the former is too generic.

Post Reply