Update simplifyPath.cpp