simongeilfus / Cinder-Runtime

Runtime-Compiled C++ for Cinder
57 stars 43 forks source link

Move most of macro'd news to template helper routines #9

Closed richardeakin closed 7 years ago

richardeakin commented 7 years ago

Note this is on top of #8, the only commit to pay attention to is 635a3a8.

This has two benefits, 1) it combines common code into a more legible format (out of macros into regular cpp) and 2) allows you to step through it in the debugger. I used this to debug why BuildSettings was getting created 3 times on each load (and therein parsing the .vcxproj file each time). This actually reduces it to two (it can be reduced to only 1 by removing the extra construction here).

I think this code be even more condensed but seemed like a good start. I'm curious to know if the build times are any different, though I imagine it would only really affect initial startup, not runtime reloads, and that macros are not far off 1-level template methods. Haven't profiled, though.