Use `static_cast<>` instead of a C-style cast.
Use `static_cast<>` instead of a C-style cast.

Fixes #287.

Change-Id: I8b67c0b5088bb1a06a47017528bfd8e6f1ec4cca
Reviewed-on: https://code-review.googlesource.com/c/re2/+/58230
Reviewed-by: Paul Wankadia <62d4e38bb1380f055ec4b899baa75e52af09c5f7@google.com>

google/re2,google/re2,google/re2,google/re2,google/re2