Remove a temporary variable and just construct a unique_ptr directly using make_unique.