void StatisticInfo::sort() { std::stable_sort(Stats.begin(), Stats.end(), [](const Statistic *LHS, const Statistic *RHS) { if (int Cmp = std::strcmp(LHS->getDebugType(), RHS->getDebugType())) return Cmp < 0; if (int Cmp = std::strcmp(LHS->getName(), RHS->getName())) return Cmp < 0; return std::strcmp(LHS->getDesc(), RHS->getDesc()) < 0; }); }