diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-18 14:56:14 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-18 14:56:14 +0200 |
commit | 3d7444ba9b7136904647d86a78dae8a40ffc6529 (patch) | |
tree | 8214e56b302120d81a08878bcc0f32dbb72d9747 /common | |
parent | babd5f39abca556e6a3e2debfe040ce9a01af6d7 (diff) | |
download | nextpnr-3d7444ba9b7136904647d86a78dae8a40ffc6529.tar.gz nextpnr-3d7444ba9b7136904647d86a78dae8a40ffc6529.tar.bz2 nextpnr-3d7444ba9b7136904647d86a78dae8a40ffc6529.zip |
Deprecate old IdString API with implizit global context
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index e2de6c31..bd1ed52b 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -90,46 +90,46 @@ struct IdString // --- deprecated old API --- - IdString(const std::string &s) + IdString(const std::string &s) __attribute__ ((deprecated)) { assert(global_ctx != nullptr); set(global_ctx, s); } - IdString(const char *s) + IdString(const char *s) __attribute__ ((deprecated)) { assert(global_ctx != nullptr); set(global_ctx, s); } - const std::string &global_str() const + const std::string &global_str() const __attribute__ ((deprecated)) { assert(global_ctx != nullptr); return str(global_ctx); } - const std::string &str() const + const std::string &str() const __attribute__ ((deprecated)) { assert(global_ctx != nullptr); return str(global_ctx); } - const char *c_str() const + const char *c_str() const __attribute__ ((deprecated)) { assert(global_ctx != nullptr); return c_str(global_ctx); } - operator const char *() const { return c_str(); } - operator const std::string &() const { return str(); } + operator const char *() const __attribute__ ((deprecated)) { return c_str(); } + operator const std::string &() const __attribute__ ((deprecated)) { return str(); } - bool operator==(const std::string &s) const { return str() == s; } - bool operator==(const char *s) const { return str() == s; } + bool operator==(const std::string &s) const __attribute__ ((deprecated)) { return str() == s; } + bool operator==(const char *s) const __attribute__ ((deprecated)) { return str() == s; } - bool operator!=(const std::string &s) const { return str() != s; } - bool operator!=(const char *s) const { return str() != s; } + bool operator!=(const std::string &s) const __attribute__ ((deprecated)) { return str() != s; } + bool operator!=(const char *s) const __attribute__ ((deprecated)) { return str() != s; } - size_t size() const { return str().size(); } + size_t size() const __attribute__ ((deprecated)) { return str().size(); } }; NEXTPNR_NAMESPACE_END |