mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Adding .clang-tidy readability-braces-around-statements option.
clang-tidy automatic changes. NO manual changes.
This commit is contained in:
committed by
Ralf W. Grosse-Kunstleve
parent
8581584e60
commit
ddbc74c674
@@ -42,23 +42,27 @@ public:
|
||||
|
||||
template <class Container> Container *one_to_n(int n) {
|
||||
auto v = new Container();
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int i = 1; i <= n; i++) {
|
||||
v->emplace_back(i);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template <class Map> Map *times_ten(int n) {
|
||||
auto m = new Map();
|
||||
for (int i = 1; i <= n; i++)
|
||||
m->emplace(int(i), E_nc(10*i));
|
||||
for (int i = 1; i <= n; i++) {
|
||||
m->emplace(int(i), E_nc(10 * i));
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
template <class NestMap> NestMap *times_hundred(int n) {
|
||||
auto m = new NestMap();
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = 1; j <= n; j++)
|
||||
(*m)[i].emplace(int(j*10), E_nc(100*j));
|
||||
for (int i = 1; i <= n; i++) {
|
||||
for (int j = 1; j <= n; j++) {
|
||||
(*m)[i].emplace(int(j * 10), E_nc(100 * j));
|
||||
}
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
@@ -98,9 +102,11 @@ TEST_SUBMODULE(stl_binders, m) {
|
||||
m.def("get_nvnc", [](int n)
|
||||
{
|
||||
auto m = new std::map<int, std::vector<E_nc>>();
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = 1; j <= n; j++)
|
||||
for (int i = 1; i <= n; i++) {
|
||||
for (int j = 1; j <= n; j++) {
|
||||
(*m)[i].emplace_back(j);
|
||||
}
|
||||
}
|
||||
return m;
|
||||
});
|
||||
py::bind_map<std::map<int, std::map<int, E_nc>>>(m, "MapMapENC");
|
||||
|
||||
Reference in New Issue
Block a user