C++11: Use std::shared_ptr insted of boost::shared_ptr
This commit is contained in:
parent
a9d2cb2838
commit
6f43d97ba3
9 changed files with 26 additions and 27 deletions
|
|
@ -36,7 +36,7 @@ public:
|
|||
const AbstractNode *root_node = tree.root();
|
||||
GeometryEvaluator geomevaluator(tree);
|
||||
CSGTermEvaluator evaluator(tree, &geomevaluator);
|
||||
boost::shared_ptr<CSGTerm> root_raw_term = evaluator.evaluateCSGTerm( *root_node, this->highlight_terms, this->background_terms );
|
||||
shared_ptr<CSGTerm> root_raw_term = evaluator.evaluateCSGTerm( *root_node, this->highlight_terms, this->background_terms );
|
||||
|
||||
PRINT("Compiling design (CSG Products normalization)...");
|
||||
call_progress_function();
|
||||
|
|
|
|||
|
|
@ -94,19 +94,19 @@ std::string Builtins::isDeprecated(const std::string &name)
|
|||
|
||||
Builtins::Builtins()
|
||||
{
|
||||
this->globalscope.assignments.push_back(Assignment("$fn", boost::shared_ptr<Expression>(new ExpressionConst(ValuePtr(0.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$fs", boost::shared_ptr<Expression>(new ExpressionConst(ValuePtr(2.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$fa", boost::shared_ptr<Expression>(new ExpressionConst(ValuePtr(12.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$t", boost::shared_ptr<Expression>(new ExpressionConst(ValuePtr(0.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$fn", shared_ptr<Expression>(new ExpressionConst(ValuePtr(0.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$fs", shared_ptr<Expression>(new ExpressionConst(ValuePtr(2.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$fa", shared_ptr<Expression>(new ExpressionConst(ValuePtr(12.0)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$t", shared_ptr<Expression>(new ExpressionConst(ValuePtr(0.0)))));
|
||||
|
||||
Value::VectorType zero3;
|
||||
zero3.push_back(ValuePtr(0.0));
|
||||
zero3.push_back(ValuePtr(0.0));
|
||||
zero3.push_back(ValuePtr(0.0));
|
||||
ValuePtr zero3val(zero3);
|
||||
this->globalscope.assignments.push_back(Assignment("$vpt", boost::shared_ptr<Expression>(new ExpressionConst(zero3val))));
|
||||
this->globalscope.assignments.push_back(Assignment("$vpr", boost::shared_ptr<Expression>(new ExpressionConst(zero3val))));
|
||||
this->globalscope.assignments.push_back(Assignment("$vpd", boost::shared_ptr<Expression>(new ExpressionConst(ValuePtr(500)))));
|
||||
this->globalscope.assignments.push_back(Assignment("$vpt", shared_ptr<Expression>(new ExpressionConst(zero3val))));
|
||||
this->globalscope.assignments.push_back(Assignment("$vpr", shared_ptr<Expression>(new ExpressionConst(zero3val))));
|
||||
this->globalscope.assignments.push_back(Assignment("$vpd", shared_ptr<Expression>(new ExpressionConst(ValuePtr(500)))));
|
||||
}
|
||||
|
||||
Builtins::~Builtins()
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ OGL_helper.h
|
|||
class ZRemover {
|
||||
public:
|
||||
CGAL_Nef_polyhedron2::Boundary boundary;
|
||||
boost::shared_ptr<CGAL_Nef_polyhedron2> tmpnef2d;
|
||||
boost::shared_ptr<CGAL_Nef_polyhedron2> output_nefpoly2d;
|
||||
shared_ptr<CGAL_Nef_polyhedron2> tmpnef2d;
|
||||
shared_ptr<CGAL_Nef_polyhedron2> output_nefpoly2d;
|
||||
CGAL::Direction_3<CGAL_Kernel3> up;
|
||||
ZRemover()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ void ColorMap::enumerateColorSchemesInPath(colorscheme_set_t &result_set, const
|
|||
|
||||
RenderColorScheme *colorScheme = new RenderColorScheme(path);
|
||||
if (colorScheme->valid() && (findColorScheme(colorScheme->name()) == 0)) {
|
||||
result_set.insert(colorscheme_set_t::value_type(colorScheme->index(), boost::shared_ptr<RenderColorScheme>(colorScheme)));
|
||||
result_set.insert(colorscheme_set_t::value_type(colorScheme->index(), shared_ptr<RenderColorScheme>(colorScheme)));
|
||||
PRINTDB("Found file '%s' with color scheme '%s' and index %d",
|
||||
colorScheme->path() % colorScheme->name() % colorScheme->index());
|
||||
} else {
|
||||
|
|
@ -297,7 +297,7 @@ ColorMap::colorscheme_set_t ColorMap::enumerateColorSchemes()
|
|||
|
||||
RenderColorScheme *defaultColorScheme = new RenderColorScheme();
|
||||
result_set.insert(colorscheme_set_t::value_type(defaultColorScheme->index(),
|
||||
boost::shared_ptr<RenderColorScheme>(defaultColorScheme)));
|
||||
shared_ptr<RenderColorScheme>(defaultColorScheme)));
|
||||
enumerateColorSchemesInPath(result_set, PlatformUtils::resourceBasePath());
|
||||
enumerateColorSchemesInPath(result_set, PlatformUtils::userConfigPath());
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <list>
|
||||
#include "linalg.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "memory.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ private:
|
|||
|
||||
class ColorMap
|
||||
{
|
||||
typedef std::multimap<int, boost::shared_ptr<RenderColorScheme>, std::less<int> > colorscheme_set_t;
|
||||
typedef std::multimap<int, shared_ptr<RenderColorScheme>, std::less<int> > colorscheme_set_t;
|
||||
|
||||
public:
|
||||
static ColorMap *inst(bool erase = false);
|
||||
|
|
|
|||
11
src/memory.h
11
src/memory.h
|
|
@ -1,8 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
using boost::shared_ptr;
|
||||
using boost::make_shared;
|
||||
using boost::dynamic_pointer_cast;
|
||||
using boost::static_pointer_cast;
|
||||
#include <memory>
|
||||
using std::shared_ptr;
|
||||
using std::make_shared;
|
||||
using std::dynamic_pointer_cast;
|
||||
using std::static_pointer_cast;
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ void ScintillaEditor::enumerateColorSchemesInPath(ScintillaEditor::colorscheme_s
|
|||
|
||||
EditorColorScheme *colorScheme = new EditorColorScheme(path);
|
||||
if (colorScheme->valid()) {
|
||||
result_set.insert(colorscheme_set_t::value_type(colorScheme->index(), boost::shared_ptr<EditorColorScheme>(colorScheme)));
|
||||
result_set.insert(colorscheme_set_t::value_type(colorScheme->index(), shared_ptr<EditorColorScheme>(colorScheme)));
|
||||
} else {
|
||||
delete colorScheme;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "scadlexer.h"
|
||||
#include "parsersettings.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "memory.h"
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class ScintillaEditor : public EditorInterface
|
|||
{
|
||||
Q_OBJECT;
|
||||
|
||||
typedef std::multimap<int, boost::shared_ptr<EditorColorScheme>, std::less<int> > colorscheme_set_t;
|
||||
typedef std::multimap<int, shared_ptr<EditorColorScheme>, std::less<int> > colorscheme_set_t;
|
||||
|
||||
public:
|
||||
ScintillaEditor(QWidget *parent);
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "memory.h"
|
||||
|
||||
class Assignment : public std::pair<std::string, boost::shared_ptr<class Expression> >
|
||||
class Assignment : public std::pair<std::string, shared_ptr<class Expression> >
|
||||
{
|
||||
public:
|
||||
Assignment(std::string name) { first = name; second = boost::shared_ptr<class Expression>(); }
|
||||
Assignment(std::string name, boost::shared_ptr<class Expression> expr) { first = name; second = expr; }
|
||||
Assignment(std::string name) { first = name; second = shared_ptr<class Expression>(); }
|
||||
Assignment(std::string name, shared_ptr<class Expression> expr) { first = name; second = expr; }
|
||||
};
|
||||
|
||||
typedef std::vector<Assignment> AssignmentList;
|
||||
|
|
|
|||
Loading…
Reference in a new issue