cginternals / libzeug

deprecated: C++ sanctuary for small but powerful and frequently required, stand alone features.
MIT License
16 stars 13 forks source link

Fix reinterpret warning #88

Closed mjendruk closed 9 years ago

mjendruk commented 9 years ago

Okay, this is my second attempt. I strongly believe that these improvements do not complicate the system in any way. They even make it easier. The reinterpret_cast existed because of a design flaw, that is now removed. The majority of changes is in Property.h. It is not much. However, I had to remove the reinterpret_casts from most of the accept methods, that is why it seems like a lot changed. There is now only one Property template, which makes it less “fragile”. The specialization takes now place in the PropertyClass template. What still bothers me is that you have to forward the constructor of your own properties. If we are going to remove the “value storing properties”, I would like to remove this boilerplate code as well. I also simplified the code by merging the PropertyVisitor and PropertyCategoryVisitor.

Edit: Tested on Mac and Windows. ref #85. No macros used.

lanice commented 9 years ago

Works for me on Ubuntu 14.04 x64.

sbusch42 commented 9 years ago

Tested and fixed some issues on Linux/gcc platform. Please compile and test again on Windows and MacOS, then merge