@@ -1030,23 +1030,21 @@ static void find_and_replace_parameter(
1030
1030
get_final_name_component (
1031
1031
id2string (replacement_param.type_variable ().get_identifier ()));
1032
1032
});
1033
+ if (replacement_parameter_it == replacement_parameters.end ())
1034
+ return ;
1033
1035
1034
- // if a replacement parameter was found, update the identifier
1035
- if (replacement_parameter_it != replacement_parameters.end ())
1036
- {
1037
- const std::string &replacement_parameter_full_name =
1038
- id2string (replacement_parameter_it->type_variable ().get_identifier ());
1039
-
1040
- // the replacement parameter is a viable one, i.e., it comes from an outer
1041
- // class
1042
- PRECONDITION (
1043
- get_without_final_name_component (parameter_full_name)
1044
- .compare (get_without_final_name_component (
1045
- replacement_parameter_full_name)) > 0 );
1046
-
1047
- parameter.type_variable_ref ().set_identifier (
1048
- replacement_parameter_full_name);
1049
- }
1036
+ // A replacement parameter was found, update the identifier
1037
+ const std::string &replacement_parameter_full_name =
1038
+ id2string (replacement_parameter_it->type_variable ().get_identifier ());
1039
+
1040
+ // the replacement parameter is a viable one, i.e., it comes from an outer
1041
+ // class
1042
+ PRECONDITION (
1043
+ get_without_final_name_component (parameter_full_name)
1044
+ .compare (
1045
+ get_without_final_name_component (replacement_parameter_full_name)) > 0 );
1046
+
1047
+ parameter.type_variable_ref ().set_identifier (replacement_parameter_full_name);
1050
1048
}
1051
1049
1052
1050
// / Recursively find all generic type parameters of a given type and replace
0 commit comments