cpp: More type fixes