fix c++ magic-mode error

Signed-off-by: coldnew <coldnew.tw@gmail.com>