Do bulk replace of stl types.
This commit is contained in:
parent
521486be62
commit
c25a56ee19
531 changed files with 2274 additions and 2181 deletions
|
@ -8,14 +8,14 @@
|
|||
#include "PathNode.h"
|
||||
#include "PolygonNode.h"
|
||||
|
||||
void addRect(const Point2& loc, std::vector<std::unique_ptr<MaterialNode> >& nodes, double radius = 0.0)
|
||||
void addRect(const Point2& loc, Vector<Ptr<MaterialNode> >& nodes, double radius = 0.0)
|
||||
{
|
||||
auto node = std::make_unique<RectangleNode>(Transform(loc), 150.0, 100.0);
|
||||
node->setRadius(radius);
|
||||
nodes.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void addCircle(const Point2& loc, std::vector<std::unique_ptr<MaterialNode> >& nodes, double minorRadius = 0.0)
|
||||
void addCircle(const Point2& loc, Vector<Ptr<MaterialNode> >& nodes, double minorRadius = 0.0)
|
||||
{
|
||||
const auto radius = 50.0;
|
||||
auto centre_loc = loc;
|
||||
|
@ -31,20 +31,20 @@ void addCircle(const Point2& loc, std::vector<std::unique_ptr<MaterialNode> >& n
|
|||
nodes.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void addLine(const Point2& loc, std::vector<std::unique_ptr<MaterialNode> >& nodes)
|
||||
void addLine(const Point2& loc, Vector<Ptr<MaterialNode> >& nodes)
|
||||
{
|
||||
std::vector<Point2> points = { Point2(150.0, 100.0) };
|
||||
Vector<Point2> points = { Point2(150.0, 100.0) };
|
||||
auto node = std::make_unique<LineNode>(Transform(loc), points);
|
||||
nodes.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void addPath(const Point2& loc, const std::string& path, std::vector<std::unique_ptr<MaterialNode> >& nodes)
|
||||
void addPath(const Point2& loc, const String& path, Vector<Ptr<MaterialNode> >& nodes)
|
||||
{
|
||||
auto node = std::make_unique<PathNode>(Transform(loc), path);
|
||||
nodes.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void addPolygon(const Point2& loc, std::vector<std::unique_ptr<MaterialNode> >& nodes)
|
||||
void addPolygon(const Point2& loc, Vector<Ptr<MaterialNode> >& nodes)
|
||||
{
|
||||
auto p0 = Point2{ 0.0, 0.0 };
|
||||
auto p1 = Point2{ 150.0, 0.0 };
|
||||
|
@ -55,7 +55,7 @@ void addPolygon(const Point2& loc, std::vector<std::unique_ptr<MaterialNode> >&
|
|||
nodes.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void addShapes(const Point2& start_loc, std::vector<std::unique_ptr<MaterialNode> >& nodes, bool use_fill = false)
|
||||
void addShapes(const Point2& start_loc, Vector<Ptr<MaterialNode> >& nodes, bool use_fill = false)
|
||||
{
|
||||
auto loc = start_loc;
|
||||
|
||||
|
@ -103,7 +103,7 @@ TEST_CASE(TestD2dOffScreenRendering_Outlines, "graphics")
|
|||
{
|
||||
TestRenderer renderer(800, 800);
|
||||
|
||||
std::vector<std::unique_ptr<MaterialNode> > nodes;
|
||||
Vector<Ptr<MaterialNode> > nodes;
|
||||
|
||||
auto loc = Point2(10, 10);
|
||||
|
||||
|
@ -123,7 +123,7 @@ TEST_CASE(TestD2dOffScreenRendering_Fill, "graphics")
|
|||
{
|
||||
TestRenderer renderer(800, 800);
|
||||
|
||||
std::vector<std::unique_ptr<MaterialNode> > nodes;
|
||||
Vector<Ptr<MaterialNode> > nodes;
|
||||
|
||||
auto loc = Point2(10, 10);
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include "Button.h"
|
||||
#include "TransformNode.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "Memory.h"
|
||||
#include "String.h"
|
||||
#include <iostream>
|
||||
|
||||
TEST_CASE(TestD2dRendering, "graphics")
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "Scene.h"
|
||||
#include "Widget.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "Memory.h"
|
||||
#include "String.h"
|
||||
#include <iostream>
|
||||
|
||||
TEST_CASE(TestDirectXRendering, "graphics")
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "TestFramework.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "Memory.h"
|
||||
#include "String.h"
|
||||
#include <iostream>
|
||||
|
||||
TEST_CASE(TestOpenGlRendering, "graphics")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue