Skip to content

Commit 6345d50

Browse files
committed
feat: misc update
- minimum xmake version is now 3.0.0
1 parent 8e4c35b commit 6345d50

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/RE/O/Object.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ namespace RE::BSScript
9696
}
9797

9898
bVar3 = _InterlockedCompareExchange(reinterpret_cast<volatile long*>(&(this->refCountAndHandleLock)),
99-
uVar1 | 0x80000000, uVar1) == uVar1;
99+
uVar1 | 0x80000000, uVar1) == (long)uVar1;
100100

101101
} while (!bVar3);
102102
_mm_mfence();
@@ -107,13 +107,12 @@ namespace RE::BSScript
107107

108108
void Object::IncRef()
109109
{
110-
std::uint32_t uVar1;
110+
std::uint32_t uVar1 = 0;
111111
std::uint32_t uVar2;
112-
std::uint64_t uVar3;
113-
std::uint32_t uVar4;
112+
//std::uint64_t uVar3;
113+
std::uint32_t uVar4 = 0;
114114
bool bVar5;
115115

116-
uVar4 = 0;
117116
do {
118117
while (true) {
119118
_mm_mfence();
@@ -144,7 +143,7 @@ namespace RE::BSScript
144143
}
145144

146145
bVar5 = _InterlockedCompareExchange(reinterpret_cast<volatile long*>(&(this->refCountAndHandleLock)),
147-
uVar2 + 1, uVar2) == uVar2;
146+
uVar2 + 1, uVar2) == (long)uVar2;
148147
if (bVar5) {
149148
uVar1 = uVar2;
150149
return;

xmake-rules.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ rule("commonlibsf.plugin")
7272
target:set("arch", "x64")
7373
target:set("kind", "shared")
7474

75+
target:add("deps", "commonlibsf")
76+
7577
target:add("installfiles", target:targetfile(), { prefixdir = "SFSE/Plugins" })
7678
target:add("installfiles", target:symbolfile(), { prefixdir = "SFSE/Plugins" })
7779

xmake.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
-- set minimum xmake version
2-
set_xmakever("2.8.2")
2+
set_xmakever("3.0.0")
33

4-
-- set project
4+
-- set project constants
55
set_project("commonlibsf")
66
set_arch("x64")
77
set_languages("c++23")
88
set_warnings("allextra")
99
set_encodings("utf-8")
1010

11-
-- add rules
11+
-- add common rules
1212
add_rules("mode.debug", "mode.releasedbg")
1313

14-
-- add includes
14+
-- include subprojects
1515
includes("lib/commonlib-shared")
1616
includes("xmake-rules.lua")
1717

0 commit comments

Comments
 (0)