Skip to content

Commit

Permalink
Improve naming of annotation variables
Browse files Browse the repository at this point in the history
This makes it easier to distinguish between variables of type
annotationt and java_annotationt.
  • Loading branch information
antlechner committed May 30, 2018
1 parent 9a0aa9c commit 4b7a195
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions jbmc/src/java_bytecode/java_bytecode_convert_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,19 +1015,18 @@ static void find_and_replace_parameters(
/// \param annotations: The java_annotationt collection to populate
void convert_annotations(
const java_bytecode_parse_treet::annotationst &parsed_annotations,
std::vector<java_annotationt> &annotations)
std::vector<java_annotationt> &java_annotations)
{
for(const auto &annotation : parsed_annotations)
{
annotations.emplace_back(annotation.type);
java_annotations.emplace_back(annotation.type);
std::vector<java_annotationt::valuet> &values =
annotations.back().get_values();
java_annotations.back().get_values();
std::transform(
annotation.element_value_pairs.begin(),
annotation.element_value_pairs.end(),
std::back_inserter(values),
[](const decltype(annotation.element_value_pairs)::value_type &value)
{
[](const decltype(annotation.element_value_pairs)::value_type &value) {
return java_annotationt::valuet(value.element_name, value.value);
});
}
Expand Down

0 comments on commit 4b7a195

Please sign in to comment.