C++20 fixes.
C++20 fixes.

Math between disparate enums is deprecated.  Cast to int.

Bug: chromium:1284275
Change-Id: If3107dc2ec3f4905eae7a075c328a07b0e0fbac8
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto