api_generator: cpp: fix methodresult