Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#7561 from jwnimmer-tri/homebrew-cl…
Browse files Browse the repository at this point in the history
…ang-format

Force line breaks in lcm_vector_gen initializer_list
  • Loading branch information
sammy-tri authored Dec 5, 2017
2 parents 7cb2a38 + dd0adde commit 1f74edd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/vector_gen/lcm_vector_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def generate_indices_storage(cc, caller_context, fields):
INDICIES_NAMES_ACCESSOR_IMPL_START = """
const std::vector<std::string>& %(camel)sIndices::GetCoordinateNames() {
static const never_destroyed<std::vector<std::string>> coordinates(
std::vector<std::string> {
std::vector<std::string>{
"""
INDICES_NAMES_ACCESSOR_IMPL_MID = """ \"%(name)s\","""
INDICES_NAMES_ACCESSOR_IMPL_MID = """ \"%(name)s\", // BR"""
INDICES_NAMES_ACCESSOR_IMPL_END = """ });
return coordinates.access();
}"""
Expand Down
4 changes: 3 additions & 1 deletion tools/vector_gen/test/goal/sample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const int SampleIndices::kAbsone;
const std::vector<std::string>& SampleIndices::GetCoordinateNames() {
static const never_destroyed<std::vector<std::string>> coordinates(
std::vector<std::string>{
"x", "two_word", "absone",
"x", // BR
"two_word", // BR
"absone", // BR
});
return coordinates.access();
}
Expand Down

0 comments on commit 1f74edd

Please sign in to comment.