closed #5121, add const to getPercent method