Remove usage of VLA's as they aren't supported by C++.