Upgrade clang-format to version 15 (#6859)
This commit is contained in:
@@ -66,7 +66,8 @@ void readBoolVector(tar::FileReader &reader, const std::string &name, VectorT &d
|
||||
using BlockType = std::uint64_t;
|
||||
constexpr std::uint64_t BLOCK_BITS = CHAR_BIT * sizeof(BlockType);
|
||||
|
||||
const auto decode = [&](const BlockType block) {
|
||||
const auto decode = [&](const BlockType block)
|
||||
{
|
||||
auto read_size = std::min<std::size_t>(count - index, BLOCK_BITS);
|
||||
unpackBits<VectorT, BlockType>(data, index, read_size, block);
|
||||
index += BLOCK_BITS;
|
||||
@@ -87,7 +88,8 @@ void writeBoolVector(tar::FileWriter &writer, const std::string &name, const Vec
|
||||
|
||||
// FIXME on old boost version the function_input_iterator does not work with lambdas
|
||||
// so we need to wrap it in a function here.
|
||||
const std::function<BlockType()> encode_function = [&]() -> BlockType {
|
||||
const std::function<BlockType()> encode_function = [&]() -> BlockType
|
||||
{
|
||||
auto write_size = std::min<std::size_t>(count - index, BLOCK_BITS);
|
||||
auto packed = packBits<VectorT, BlockType>(data, index, write_size);
|
||||
index += BLOCK_BITS;
|
||||
|
||||
@@ -28,10 +28,10 @@ class SharedDataIndex
|
||||
// Build mapping from block name to region
|
||||
for (auto index : util::irange<std::uint32_t>(0, regions.size()))
|
||||
{
|
||||
regions[index].layout->List("",
|
||||
boost::make_function_output_iterator([&](const auto &name) {
|
||||
block_to_region[name] = index;
|
||||
}));
|
||||
regions[index].layout->List(
|
||||
"",
|
||||
boost::make_function_output_iterator([&](const auto &name)
|
||||
{ block_to_region[name] = index; }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,9 +223,12 @@ struct SharedRegionRegister
|
||||
// Returns the key of the region with the given name
|
||||
RegionID Find(const std::string &name) const
|
||||
{
|
||||
auto iter = std::find_if(regions.begin(), regions.end(), [&](const auto ®ion) {
|
||||
return std::strncmp(region.name, name.c_str(), SharedRegion::MAX_NAME_LENGTH) == 0;
|
||||
});
|
||||
auto iter = std::find_if(
|
||||
regions.begin(),
|
||||
regions.end(),
|
||||
[&](const auto ®ion) {
|
||||
return std::strncmp(region.name, name.c_str(), SharedRegion::MAX_NAME_LENGTH) == 0;
|
||||
});
|
||||
|
||||
if (iter == regions.end())
|
||||
{
|
||||
|
||||
@@ -113,7 +113,8 @@ class SharedMemory
|
||||
{
|
||||
auto shmid = shm.get_shmid();
|
||||
::shmid_ds xsi_ds;
|
||||
const auto errorToMessage = [](int error) -> std::string {
|
||||
const auto errorToMessage = [](int error) -> std::string
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
case EPERM:
|
||||
|
||||
@@ -241,9 +241,9 @@ inline auto make_contracted_metric_view(const SharedDataIndex &index, const std:
|
||||
|
||||
std::vector<util::vector_view<bool>> edge_filter;
|
||||
index.List(name + "/exclude",
|
||||
boost::make_function_output_iterator([&](const auto &filter_name) {
|
||||
edge_filter.push_back(make_vector_view<bool>(index, filter_name));
|
||||
}));
|
||||
boost::make_function_output_iterator(
|
||||
[&](const auto &filter_name)
|
||||
{ edge_filter.push_back(make_vector_view<bool>(index, filter_name)); }));
|
||||
|
||||
return contractor::ContractedMetricView{{node_list, edge_list}, std::move(edge_filter)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user