diff options
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r-- | common/nextpnr.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 78bbf66e..2445bed1 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -110,7 +110,8 @@ struct IdString static void initialize_add(const BaseCtx *ctx, const char *s, int idx); - constexpr IdString(int index = 0) : index(index) {} + constexpr IdString() : index(0) {} + explicit constexpr IdString(int index) : index(index) {} void set(const BaseCtx *ctx, const std::string &s); @@ -229,9 +230,9 @@ struct IdStringList SSOArray<IdString, 4> ids; IdStringList(){}; - IdStringList(size_t n) : ids(n, IdString()){}; - IdStringList(IdString id) : ids(1, id){}; - template <typename Tlist> IdStringList(const Tlist &list) : ids(list){}; + explicit IdStringList(size_t n) : ids(n, IdString()){}; + explicit IdStringList(IdString id) : ids(1, id){}; + template <typename Tlist> explicit IdStringList(const Tlist &list) : ids(list){}; static IdStringList parse(Context *ctx, const std::string &str); void build_str(const Context *ctx, std::string &str) const; |