Author Topic: settings.h : message for CB developers  (Read 2892 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5387
settings.h : message for CB developers
« on: August 09, 2006, 01:48:09 pm »
Hello,

After a litlle chat yesterday with Yiannis we came to the conclusion that :

1) the contents of "settings.h" can be entirely removed (we will keep the file for now, but empty)
2) no other files should include "settings.h"

We are talking about "settings.h" from CB not the <wx/settings.h> !!!

Why can it be removed ?

Well when we look at it we see it does a few things :
1) if MS VC6 it will include and pragma something
  - CB is being build with GCC (and 'suppose' it would ever get build with another compiler, it would certainly not be that old crappy totally not standard conformant buggy VC6 compiler) --> this part can be removed
2) On WINDOWS make a difference between MS compilers and others for export/import :
  - several files do not include it (so conflict with 1) ) -> not consistent
  - several files are including settings.h although they do NOT need it (as far as 2) is concerned) -> not consistent
  - some files do include it since they import/export things (example : toolsmanager.h, but it only does it for the ToolsManager but not for the Tool class --> not consistent, NOTE : a code change is coming up for the tools so if you read this topic in a weeks time the example might be outdated)
  - all symbols are exported/imported no matter what the DLLIMPORT/EVTIMPORT is -> so it has no use and only creates confusion

So as you can see, little consistency and it only brings confusion. To keep things simple, if it's not there, no need to worry about it or try to understand it.

So one day (probably during the weekend) a commit will happen will all these things cleaned up, in the meantime if you are modifying a file which includes the settings.h you can already remove it ;-)
We think we did not overlook anything and accordingly should not break anything. ;-)

We keep the settings.h a little while in the source tree, but probably it will also disappear. It might be possible that specific settings could enter through script or the global variables settings.

kind regards,
Lieven


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: settings.h : message for CB developers
« Reply #1 on: August 09, 2006, 01:51:32 pm »
Ugh... we still have that file? Didn't we already say that we'd remove it last September? :lol:

Must have forgotten...  8)


EDIT: Actually was on 20 December :)
« Last Edit: August 09, 2006, 01:56:16 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."