Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ashton <joshua@froggi.es>2022-08-21 02:43:18 +0300
committerJoshua Ashton <joshua@froggi.es>2022-08-21 22:16:08 +0300
commit9684a1f2d4c0145c3550bfcb0c228c6bbca4f380 (patch)
tree12874eea982c79e601595553c48f91448c24c76c
parent0dc3200951f57b596f56beec7de69de46174e1de (diff)
[util] Rename always_inline to force_inlinenative-pr-always-inline
This conflicts with other libraries using the always_inline attribute in GCC as it defines it with the same name.
-rw-r--r--src/util/rc/util_rc.h4
-rw-r--r--src/util/rc/util_rc_ptr.h4
-rw-r--r--src/util/util_likely.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/util/rc/util_rc.h b/src/util/rc/util_rc.h
index f8e8c230..b92cf00b 100644
--- a/src/util/rc/util_rc.h
+++ b/src/util/rc/util_rc.h
@@ -17,7 +17,7 @@ namespace dxvk {
* \brief Increments reference count
* \returns New reference count
*/
- always_inline uint32_t incRef() {
+ force_inline uint32_t incRef() {
return ++m_refCount;
}
@@ -25,7 +25,7 @@ namespace dxvk {
* \brief Decrements reference count
* \returns New reference count
*/
- always_inline uint32_t decRef() {
+ force_inline uint32_t decRef() {
return --m_refCount;
}
diff --git a/src/util/rc/util_rc_ptr.h b/src/util/rc/util_rc_ptr.h
index 55540f60..bc4b4bdd 100644
--- a/src/util/rc/util_rc_ptr.h
+++ b/src/util/rc/util_rc_ptr.h
@@ -102,12 +102,12 @@ namespace dxvk {
T* m_object = nullptr;
- always_inline void incRef() const {
+ force_inline void incRef() const {
if (m_object != nullptr)
m_object->incRef();
}
- always_inline void decRef() const {
+ force_inline void decRef() const {
if (m_object != nullptr) {
if (m_object->decRef() == 0)
delete m_object;
diff --git a/src/util/util_likely.h b/src/util/util_likely.h
index cf6a970d..df71cee0 100644
--- a/src/util/util_likely.h
+++ b/src/util/util_likely.h
@@ -3,9 +3,9 @@
#ifdef __GNUC__
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
-#define always_inline inline __attribute__((always_inline))
+#define force_inline inline __attribute__((always_inline))
#else
#define likely(x) (x)
#define unlikely(x) (x)
-#define always_inline inline
+#define force_inline inline
#endif