Doing the same set of transformations for C++