Forráskód Böngészése

Benchmarks: Fix compile error with custom string type (#490)

mwl4 2 éve
szülő
commit
7d8fc2bdfa

+ 1 - 1
Tests/Source/Benchmarks/BackgroundBorder.cpp

@@ -130,7 +130,7 @@ TEST_CASE("backgrounds_and_borders")
 		document->QuerySelectorAll(elements, "#" + id + " > div");
 		REQUIRE(!elements.empty());
 
-		bench.run("Border " + id, [&] {
+		bench.run(("Border " + id).c_str(), [&] {
 			for (auto& element : elements)
 				element->SetProperty(Rml::PropertyId::BorderLeftColor, Rml::Property(Colourb(), Unit::COLOUR));
 			context->Update();

+ 1 - 1
Tests/Source/Benchmarks/Selectors.cpp

@@ -282,7 +282,7 @@ TEST_CASE("Selectors")
 
 		bool hover_active = false;
 
-		bench.run(name, [&] {
+		bench.run(name.c_str(), [&] {
 			hover_active = !hover_active;
 			// Toggle some arbitrary pseudo class on the element to dirty the definition on this and all descendent elements.
 			el->SetPseudoClass("hover", hover_active);