]> granicus.if.org Git - graphviz/commitdiff
tests: test_svg_analyzer: remove useless string copy
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 17 Aug 2022 18:30:26 +0000 (20:30 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 30 Aug 2022 20:17:05 +0000 (22:17 +0200)
Despite its name, 'shape_char_ptr' was already a std::string.

tests/test_svg_analyzer.cpp

index b4c2ea13a40f112ab20c7d1788d0c959db5d83d2..82286b200c3388be10bcb4baffa87937b0ffd8ed 100644 (file)
@@ -16,8 +16,7 @@ TEST_CASE("SvgAnalyzer",
           "an internal data structure and re-create the original SVG exactly "
           "from that data structure") {
 
-  const auto shape_char_ptr = GENERATE(from_range(all_node_shapes));
-  const std::string shape{shape_char_ptr};
+  const auto shape = GENERATE(from_range(all_node_shapes));
   INFO(fmt::format("Shape: {}", shape));
 
   auto dot = fmt::format("digraph g1 {{node [shape={}]; a -> b}}", shape);