Make RelSlice uncopyable

Signed-off-by: D. Shah <dave@ds0.me>
This commit is contained in:
D. Shah 2021-01-27 20:47:02 +00:00
parent 75ee2fc4e6
commit b87ab0ee9d
2 changed files with 4 additions and 1 deletions

View File

@ -36,4 +36,7 @@ NPNR_PACKED_STRUCT(template <typename T> struct RelSlice {
const T &operator*() const { return *(get()); }
const T *operator->() const { return get(); }
RelSlice(const RelSlice &) = delete;
RelSlice &operator=(const RelSlice &) = delete;
});

View File

@ -186,7 +186,7 @@ struct NexusFasmWriter
{
int r = bel.tile / ctx->chip_info->width;
int c = bel.tile % ctx->chip_info->width;
auto bel_data = ctx->bel_data(bel);
auto &bel_data = ctx->bel_data(bel);
r += bel_data.rel_y;
c += bel_data.rel_x;
std::string s = stringf("R%dC%d_%s", r, c, ctx->nameOf(ctx->bel_data(bel).name));