From 102cd93c75fc51671f440658f760296e6d0c16ef Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Wed, 20 Sep 2023 14:54:21 -0600 Subject: [PATCH] CONJOIN: Use lambda in sort --- packages/seacas/applications/conjoin/CJ_Internals.C | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/seacas/applications/conjoin/CJ_Internals.C b/packages/seacas/applications/conjoin/CJ_Internals.C index 8b6361e7a5..91cd359088 100644 --- a/packages/seacas/applications/conjoin/CJ_Internals.C +++ b/packages/seacas/applications/conjoin/CJ_Internals.C @@ -32,8 +32,6 @@ namespace { return NC_INT; } - bool lessOffset(const Excn::Block &b1, const Excn::Block &b2) { return b1.offset_ < b2.offset_; } - int define_netcdf_vars(int exoid, const char *type, size_t count, const char *dim_num, const char *stat_var, const char *id_var, const char *name_var); @@ -134,7 +132,8 @@ int Excn::Internals::write_meta_data(const Mesh &mesh, const std::vector sorted_blocks(blocks); if (!order_ok) { - std::sort(sorted_blocks.begin(), sorted_blocks.end(), lessOffset); + std::sort(sorted_blocks.begin(), sorted_blocks.end(), + [](const Block &b1, const Block &b2) { return b1.offset_ < b2.offset_; }); // Now, update the position_ field based on the sorted order. for (size_t i = 0; i < blocks.size(); i++) {