@@ -1321,7 +1321,7 @@ namespace yy {
1321
1321
#line 319 "seclang-parser.yy"
1322
1322
{
1323
1323
// Initialize the initial location.
1324
- yyla.location .begin .filename = yyla.location .end .filename = new std::string (driver.file );
1324
+ yyla.location .begin .filename = yyla.location .end .filename = std::make_shared< const std::string> (driver.file );
1325
1325
}
1326
1326
1327
1327
#line 1328 "seclang-parser.cc"
@@ -2287,7 +2287,7 @@ namespace yy {
2287
2287
#line 1076 "seclang-parser.yy"
2288
2288
{
2289
2289
std::vector<actions::Action *> *a = new std::vector<actions::Action *>();
2290
- std::vector<actions::transformations::Transformation *> * t = new std::vector<actions::transformations::Transformation *>();
2290
+ auto t = std::make_shared<std:: vector<actions::transformations::Transformation *> >();
2291
2291
for (auto &i : *yystack_[0 ].value .as < std::unique_ptr<std::vector<std::unique_ptr<actions::Action> > > > ().get ()) {
2292
2292
if (dynamic_cast <actions::transformations::Transformation *>(i.get ())) {
2293
2293
t->push_back (dynamic_cast <actions::transformations::Transformation *>(i.release ()));
@@ -2305,7 +2305,7 @@ namespace yy {
2305
2305
/* op */ op,
2306
2306
/* variables */ v,
2307
2307
/* actions */ a,
2308
- /* transformations */ t,
2308
+ /* transformations */ t. get () ,
2309
2309
/* file name */ std::unique_ptr<std::string>(new std::string (*yystack_[3 ].location .end .filename )),
2310
2310
/* line number */ yystack_[3 ].location .end .line
2311
2311
));
@@ -2344,7 +2344,7 @@ namespace yy {
2344
2344
#line 1125 "seclang-parser.yy"
2345
2345
{
2346
2346
std::vector<actions::Action *> *a = new std::vector<actions::Action *>();
2347
- std::vector<actions::transformations::Transformation *> * t = new std::vector<actions::transformations::Transformation *>();
2347
+ auto t = std::make_shared<std:: vector<actions::transformations::Transformation *> >();
2348
2348
for (auto &i : *yystack_[0 ].value .as < std::unique_ptr<std::vector<std::unique_ptr<actions::Action> > > > ().get ()) {
2349
2349
if (dynamic_cast <actions::transformations::Transformation *>(i.get ())) {
2350
2350
t->push_back (dynamic_cast <actions::transformations::Transformation *>(i.release ()));
@@ -2354,7 +2354,7 @@ namespace yy {
2354
2354
}
2355
2355
std::unique_ptr<RuleUnconditional> rule (new RuleUnconditional (
2356
2356
/* actions */ a,
2357
- /* transformations */ t,
2357
+ /* transformations */ t. get () ,
2358
2358
/* file name */ std::unique_ptr<std::string>(new std::string (*yystack_[1 ].location .end .filename )),
2359
2359
/* line number */ yystack_[1 ].location .end .line
2360
2360
));
@@ -2368,7 +2368,7 @@ namespace yy {
2368
2368
{
2369
2369
std::string err;
2370
2370
std::vector<actions::Action *> *a = new std::vector<actions::Action *>();
2371
- std::vector<actions::transformations::Transformation *> * t = new std::vector<actions::transformations::Transformation *>();
2371
+ auto t = std::make_shared<std:: vector<actions::transformations::Transformation *> >();
2372
2372
for (auto &i : *yystack_[0 ].value .as < std::unique_ptr<std::vector<std::unique_ptr<actions::Action> > > > ().get ()) {
2373
2373
if (dynamic_cast <actions::transformations::Transformation *>(i.get ())) {
2374
2374
t->push_back (dynamic_cast <actions::transformations::Transformation *>(i.release ()));
@@ -2379,7 +2379,7 @@ namespace yy {
2379
2379
std::unique_ptr<RuleScript> r (new RuleScript (
2380
2380
/* path to script */ yystack_[1 ].value .as < std::string > (),
2381
2381
/* actions */ a,
2382
- /* transformations */ t,
2382
+ /* transformations */ t. get () ,
2383
2383
/* file name */ std::unique_ptr<std::string>(new std::string (*yystack_[1 ].location .end .filename )),
2384
2384
/* line number */ yystack_[1 ].location .end .line
2385
2385
));
0 commit comments