cpp: Further type fixes