diff options
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-common.h | 22 | ||||
| -rw-r--r-- | source/core/slang-persistent-cache.cpp | 2 | ||||
| -rw-r--r-- | source/core/slang-string-util.cpp | 4 |
3 files changed, 25 insertions, 3 deletions
diff --git a/source/core/slang-common.h b/source/core/slang-common.h index 855ea08db..8c84894ca 100644 --- a/source/core/slang-common.h +++ b/source/core/slang-common.h @@ -181,6 +181,28 @@ public: # define SLANG_EXHAUSTIVE_SWITCH_END #endif +#if SLANG_GCC +# define SLANG_ALLOW_DEPRECATED_BEGIN \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\""); +# define SLANG_ALLOW_DEPRECATED_END \ + _Pragma("GCC diagnostic pop"); +#elif SLANG_CLANG +# define SLANG_ALLOW_DEPRECATED_BEGIN \ + _Pragma("clang diagnostic push"); \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\""); +# define SLANG_ALLOW_DEPRECATED_END \ + _Pragma("clang diagnostic pop"); +#elif SLANG_VC +# define SLANG_ALLOW_DEPRECATED_BEGIN \ + _Pragma("warning(push)"); \ + _Pragma("warning(disable : 4996)"); +# define SLANG_ALLOW_DEPRECATED_END \ + _Pragma("warning(pop)"); +#else +# define SLANG_ALLOW_DEPRECATED_BEGIN +# define SLANG_ALLOW_DEPRECATED_END +#endif // // Use `SLANG_ASSUME(myBoolExpression);` to inform the compiler that the condition is true. diff --git a/source/core/slang-persistent-cache.cpp b/source/core/slang-persistent-cache.cpp index d934d1b26..2b4113e16 100644 --- a/source/core/slang-persistent-cache.cpp +++ b/source/core/slang-persistent-cache.cpp @@ -226,7 +226,7 @@ String PersistentCache::getEntryFileName(const Key& key) { StringBuilder str; str << m_cacheDirectory << "/" << key.toString(); - return std::move(str); + return str; } struct CacheIndexHeader diff --git a/source/core/slang-string-util.cpp b/source/core/slang-string-util.cpp index c7625e1e0..79f7307dc 100644 --- a/source/core/slang-string-util.cpp +++ b/source/core/slang-string-util.cpp @@ -332,7 +332,7 @@ UnownedStringSlice StringUtil::getAtInSplit(const UnownedStringSlice& in, char s append(format, args, builder); va_end(args); - return std::move(builder); + return builder; } /* static */UnownedStringSlice StringUtil::getSlice(ISlangBlob* blob) @@ -384,7 +384,7 @@ ComPtr<ISlangBlob> StringUtil::createStringBlob(const String& string) } builder.appendInPlace(dstChars, numChars); - return std::move(builder); + return builder; } /* static */String StringUtil::calcCharReplaced(const String& string, char fromChar, char toChar) |
