Hi all,
there is a large chunk of code (~ 130 lines) that is essentially duplicated in both dyna-draw-context.cpp and eraser-context.cpp, namely the function fit_and_split(). The two versions only really differ in a few lines, but they also contains a couple of #ifdef switches that are used for debugging. The problem is that these are also dependent on the file (to wit, #ifdef ERASER_VERBOSE and #ifdef DYNA_DRAW_VERBOSE). I believe it would make sense to melt these two functions together, but how can this be done while at the same time respecting the #ifdefs? Is there a kind of #or directive?
Max
P.S.: It just occurred to me that the two contexts might share other code, too (although I haven't checked). Perhaps they could even be merged to a larger extent.