From 3d7444ba9b7136904647d86a78dae8a40ffc6529 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 18 Jun 2018 14:56:14 +0200 Subject: Deprecate old IdString API with implizit global context Signed-off-by: Clifford Wolf --- common/nextpnr.h | 24 ++++++++++++------------ 1 file 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 -- cgit v1.2.3