Comment 5 for bug 1297688

Revision history for this message
Crise / MW (markuwil) wrote :

Poy: out of curiosity how did you think about pursuing this? Port DWT or replace it?

Personally I think if you intend to seriously pursue this, you should start by eliminating #ifdefs in dcpp lib, use separate cpp files for platform specific code and share only headers. This would limit preprocessor branching to inline functions that are platform specific and even that could be addressed by the use of .inl files for the most part. Same applies to DWT if porting it is the way you consider.

I know there are some arguments against this type of compartmentalized structure, but in the long run the code is likely to remain more maintainable if done like this in my opinion. And perhaps most importantly it would automatically mean that a good hard look is taken at each platform specific section of code during this process.