aboutsummaryrefslogtreecommitdiffstats
path: root/json
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-26 14:13:52 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-26 14:13:52 +0200
commit103dde79de25e2f9250b27134aa3d547d42408e2 (patch)
treea1726abff970476179e2395403f9cd5da274ca30 /json
parentded9df61dc1ce390a6751c214c02a2acb3a57577 (diff)
downloadnextpnr-103dde79de25e2f9250b27134aa3d547d42408e2.tar.gz
nextpnr-103dde79de25e2f9250b27134aa3d547d42408e2.tar.bz2
nextpnr-103dde79de25e2f9250b27134aa3d547d42408e2.zip
Fixing Python bindings after adding unique_ptr
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'json')
-rw-r--r--json/jsonparse.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/json/jsonparse.cc b/json/jsonparse.cc
index 36c4f91b..418147e8 100644
--- a/json/jsonparse.cc
+++ b/json/jsonparse.cc
@@ -259,7 +259,7 @@ void vcc_net(Context *ctx, NetInfo *net)
cell->ports[port_info.name] = port_info;
- ctx->cells[cell->name] = std::move(cell);
+ ctx->cells[cell->name] = std::move(cell);
}
void floating_net(Context *ctx, NetInfo *net)
@@ -429,12 +429,12 @@ void json_import_ports(Context *ctx, const string &modname, const std::vector<Id
if (json_debug)
log_info(" Generating a new net, \'%d\'\n", net_num);
- std::unique_ptr<NetInfo> net = std::unique_ptr<NetInfo>(new NetInfo());
+ std::unique_ptr<NetInfo> net = std::unique_ptr<NetInfo>(new NetInfo());
net->name = net_id;
net->driver.cell = NULL;
net->driver.port = IdString();
ctx->nets[net_id] = std::move(net);
-
+
this_net = ctx->nets[net_id].get();
} else {
//
@@ -455,7 +455,7 @@ void json_import_ports(Context *ctx, const string &modname, const std::vector<Id
// values here.
//
// Constants always get their own new net
- std::unique_ptr<NetInfo> net = std::unique_ptr<NetInfo>(new NetInfo());
+ std::unique_ptr<NetInfo> net = std::unique_ptr<NetInfo>(new NetInfo());
net->name = ctx->id("$const_" + std::to_string(const_net_idx++));
if (wire_node->data_string.compare(string("0")) == 0) {
@@ -484,7 +484,7 @@ void json_import_ports(Context *ctx, const string &modname, const std::vector<Id
log_error(" Unknown fixed type wire node "
"value, \'%s\'\n",
wire_node->data_string.c_str());
- IdString n = net->name;
+ IdString n = net->name;
ctx->nets[net->name] = std::move(net);
this_net = ctx->nets[n].get();
}
@@ -652,7 +652,7 @@ static void insert_iobuf(Context *ctx, NetInfo *net, PortType type, const string
iobuf->ports[ctx->id("I")] = PortInfo{ctx->id("I"), nullptr, PORT_IN};
// Split the input and output nets for bidir ports
- std::unique_ptr<NetInfo> net2 = std::unique_ptr<NetInfo>(new NetInfo());
+ std::unique_ptr<NetInfo> net2 = std::unique_ptr<NetInfo>(new NetInfo());
net2->name = ctx->id("$" + net->name.str(ctx) + "$iobuf_i");
net2->driver = net->driver;
if (net->driver.cell != nullptr) {