[.clang-format] Init @ root

This commit is contained in:
Samuel Marks 2021-12-06 23:00:43 -05:00
parent 7059eeb4b5
commit 6703e91046
No known key found for this signature in database
GPG Key ID: 43FD8EDE42E1A799
2 changed files with 5 additions and 0 deletions

4
.clang-format Normal file
View File

@ -0,0 +1,4 @@
# Run manually to reformat a file:
# clang-format -i --style=file <file>
BasedOnStyle: Google
DerivePointerAlignment: false

View File

@ -118,6 +118,7 @@ pybind11::tuple SpanToTuple(absl::Span<int64_t const> xs);
template <typename T>
std::vector<T> IterableToVector(const pybind11::iterable& iterable) {
std::vector<T> output;
output.reserve(std::distance(iterable.begin(), iterable.end()));
for (auto item : iterable) {
output.push_back(item.cast<T>());
}