diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp index 820850a161c..ebc4eb4fe69 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp @@ -2,7 +2,7 @@ ** SVGCharHandlerFactory.cpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2017 Martin Gieseking <martin.gieseking@uos.de> ** +** Copyright (C) 2005-2018 Martin Gieseking <martin.gieseking@uos.de> ** ** ** ** This program is free software; you can redistribute it and/or ** ** modify it under the terms of the GNU General Public License as ** @@ -23,14 +23,14 @@ #include "SVGSingleCharTextHandler.hpp" #include "SVGCharTspanTextHandler.hpp" #include "SVGTree.hpp" +#include "utility.hpp" +using namespace std; -SVGCharHandler* SVGCharHandlerFactory::createHandler () { +unique_ptr<SVGCharHandler> SVGCharHandlerFactory::createHandler () { if (!SVGTree::USE_FONTS) - return new SVGCharPathHandler(SVGTree::CREATE_USE_ELEMENTS, SVGTree::RELATIVE_PATH_CMDS); + return util::make_unique<SVGCharPathHandler>(SVGTree::CREATE_USE_ELEMENTS, SVGTree::RELATIVE_PATH_CMDS); if (SVGTree::MERGE_CHARS) - return new SVGCharTspanTextHandler(SVGTree::CREATE_CSS); - else - return new SVGSingleCharTextHandler(SVGTree::CREATE_CSS); - return 0; -}
\ No newline at end of file + return util::make_unique<SVGCharTspanTextHandler>(SVGTree::CREATE_CSS); + return util::make_unique<SVGSingleCharTextHandler>(SVGTree::CREATE_CSS); +} |