Gcode: Ensure std::string operations don't incur allocations