From eae0bd8cfff2d460a7bad93c1f50758b8be58ff3 Mon Sep 17 00:00:00 2001 From: Mathieu Dutour Sikiric Date: Sat, 23 Nov 2024 17:32:01 +0100 Subject: [PATCH] Some cleanup. --- src_basic/Temp_common.h | 1 - src_graph/GRAPH_traces.h | 12 ++++---- src_svg/SVGfunctions.h | 62 ++++++++++++++++++++-------------------- 3 files changed, 37 insertions(+), 38 deletions(-) diff --git a/src_basic/Temp_common.h b/src_basic/Temp_common.h index a8e865e..4d36858 100644 --- a/src_basic/Temp_common.h +++ b/src_basic/Temp_common.h @@ -6,7 +6,6 @@ // Only standard includes are allowed. Forbidden are: // ---any boost include -// ---any TBB include // ---anything that requires a non-trivial installation // C-style includes diff --git a/src_graph/GRAPH_traces.h b/src_graph/GRAPH_traces.h index 3efd537..0d2f34d 100644 --- a/src_graph/GRAPH_traces.h +++ b/src_graph/GRAPH_traces.h @@ -130,7 +130,7 @@ TRACES_GetCanonicalOrdering_Arr(DataTraces &DT, for (size_t i = 0; i < n; i++) V[DT.lab1[i]] = Tidx(i); #ifdef TIMINGS - os << "|TRACES_GetCanonicalOrdering_Arr|=" << time << "\n"; + os << "|TRA: TRACES_GetCanonicalOrdering_Arr|=" << time << "\n"; #endif return V; } @@ -256,7 +256,7 @@ TRACES_GetCanonicalOrdering(Tgr const &eGR, [[maybe_unused]] std::ostream &os) { SG_FREE(sg1); SG_FREE(cg1); #ifdef TIMINGS - os << "|TRACES_GetCanonicalOrdering|=" << time << "\n"; + os << "|TRA: TRACES_GetCanonicalOrdering|=" << time << "\n"; #endif return V; } @@ -304,7 +304,7 @@ TRACES_GetListGenerators_Arr(DataTraces &DT, size_t const &n_last, freeschreier(NULL, &gens); schreier_freedyn(); #ifdef TIMINGS - os << "|TRACES_GetListGenerators_Arr|=" << time << "\n"; + os << "|TRA: TRACES_GetListGenerators_Arr|=" << time << "\n"; #endif return ListGen; } @@ -389,7 +389,7 @@ TRACES_GetListGenerators(Tgr const &eGR, size_t const &n_last, DYNFREE(orbits, orbits_sz); SG_FREE(sg1); #ifdef TIMINGS - os << "|TRACES_GetListGenerators|=" << time << "\n"; + os << "|TRA: TRACES_GetListGenerators|=" << time << "\n"; #endif return ListGen; } @@ -433,7 +433,7 @@ TRACES_GetCanonicalOrdering_ListGenerators_Arr( freeschreier(NULL, &gens); schreier_freedyn(); #ifdef TIMINGS - os << "|TRACES_GetCanonicalOrdering_ListGenerators_Arr|=" << time << "\n"; + os << "|TRA: TRACES_GetCanonicalOrdering_ListGenerators_Arr|=" << time << "\n"; #endif return {std::move(V), std::move(ListGen)}; } @@ -526,7 +526,7 @@ TRACES_GetCanonicalOrdering_ListGenerators(Tgr const &eGR, size_t n_last, SG_FREE(sg1); SG_FREE(cg1); #ifdef TIMINGS - os << "|TRACES_GetCanonicalOrdering_ListGenerators|=" << time << "\n"; + os << "|TRA: TRACES_GetCanonicalOrdering_ListGenerators|=" << time << "\n"; #endif return {std::move(V), std::move(ListGen)}; } diff --git a/src_svg/SVGfunctions.h b/src_svg/SVGfunctions.h index a1ce73e..142697d 100644 --- a/src_svg/SVGfunctions.h +++ b/src_svg/SVGfunctions.h @@ -19,8 +19,8 @@ coor operator-(coor const &c1, coor const &c2) { return {c1.x - c2.x, c1.y - c2.y}; } -std::ostream &operator<<(std::ostream &os, coor const &obj) { - os << "(" << obj.x << "," << obj.y << ")"; +std::ostream &operator<<(std::ostream &os_out, coor const &obj) { + os_out << "(" << obj.x << "," << obj.y << ")"; return os; } @@ -346,71 +346,71 @@ void GeneralWriteSVGfile(std::string const &eFile, // // First the preamble // - std::ofstream os(eFile); - os << std::fixed; - os << std::setprecision(9); - os << "\n"; + std::ofstream os_out(eFile); + os_out << std::fixed; + os_out << std::setprecision(9); + os_out << "\n"; // // Now the major loop for the data printing // for (auto &eGeneral : eSVGplot.ListGeneral) { if (eGeneral.svgtype == SvgType::clip) { - os << " \n"; - os << " \n"; - os << " \n"; + os_out << " \n"; + os_out << " \n"; - os << " \n"; - os << " \n"; + os_out << " \n"; + os_out << " \n"; } if (eGeneral.svgtype == SvgType::line) { coor ePt = eGeneral.line.ePt; coor fPt = eGeneral.line.fPt; - os << " \n"; } if (eGeneral.svgtype == SvgType::polyline) { - os << "\n"; } if (eGeneral.svgtype == SvgType::bezier) { auto eBez = eGeneral.bezier; - os << " \n"; } if (eGeneral.svgtype == SvgType::ellipse) { auto eEll = eGeneral.ellipse; - os << " \n"; + os_out << " \n"; } if (eGeneral.svgtype == SvgType::text) { auto eText = eGeneral.text; - os << " "; - os << eText.string << "\n"; + os_out << " "; + os_out << eText.string << "\n"; } } - os << "\n"; + os_out << "\n"; } // clang-format off