Use emplace_back instead of creating a temporary in two places