fix error when compile with cpp
const-correctness