make functions const where possible

5 jobs for master in 2 minutes and 34 seconds (queued for 8 seconds)
Status Name Job ID Coverage
  Build
passed build:lib #20061
docker

00:01:33

 
  Test
passed test:lib #20062
docker

00:01:01

 
  Trigger
passed trigger:android

passed trigger:javascript

failed trigger:python