Skip to content

Commit a4c1c0d

Browse files
committed
fix: clang-cl
1 parent 46b7491 commit a4c1c0d

10 files changed

Lines changed: 52 additions & 40 deletions

File tree

include/RE/H/hkStreamReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace RE
1919
// add
2020
virtual hkBool IsOk() = 0; // 0x20 [04]
2121
virtual std::int32_t Read([[maybe_unused]] void* a_buffer, [[maybe_unused]] std::int32_t a_numBytes) = 0; // 0x28 [05]
22-
virtual std::int32_t Skip([[maybe_unused]] std::int32_t a_numBytes) {} // 0x30 [06]
22+
virtual std::int32_t Skip([[maybe_unused]] std::int32_t a_numBytes) { return 0; } // 0x30 [06]
2323
virtual std::int32_t Peek([[maybe_unused]] void* a_buffer, [[maybe_unused]] std::int32_t a_numBytes) { return false; } // 0x38 [07]
2424
virtual hkSeekableStreamReader* IsSeekTellSupported() { return nullptr; } // 0x40 [08]
2525
};

include/RE/H/hkStridedVertices.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ namespace RE
1414
constexpr hkStridedVertices(const T* a_vertices, const std::int32_t a_numVertices)
1515
{
1616
static_assert(sizeof(T) > sizeof(float));
17-
vertices = (const float*)vertices;
18-
numVertices = a_numVertices;
19-
striding = sizeof(T);
17+
m_vertices = (const float*)a_vertices;
18+
m_numVertices = a_numVertices;
19+
m_striding = sizeof(T);
2020
}
2121

2222
hkStridedVertices(const hkArrayBase<hkVector4>& a_vertices)
2323
{
24-
vertices = (const float*)a_vertices.begin();
25-
numVertices = a_vertices.size();
26-
striding = sizeof(hkVector4);
24+
m_vertices = (const float*)a_vertices.begin();
25+
m_numVertices = a_vertices.size();
26+
m_striding = sizeof(hkVector4);
2727
}
2828

2929
constexpr std::int32_t size() const
3030
{
31-
return numVertices;
31+
return m_numVertices;
3232
}
3333

3434
// members
35-
const float* vertices{ nullptr }; // 0x00
36-
std::int32_t numVertices{ 0 }; // 0x08
37-
std::int32_t striding{ 0 }; // 0x0C - sizeof(T)
35+
const float* m_vertices{ nullptr }; // 0x00
36+
std::int32_t m_numVertices{ 0 }; // 0x08
37+
std::int32_t m_striding{ 0 }; // 0x0C - sizeof(T)
3838
};
3939
static_assert(sizeof(hkStridedVertices) == 0x10);
4040
}

include/RE/H/hkVector4.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace RE
5151

5252
namespace RE
5353
{
54-
inline constexpr hkVector4f hkVector4f::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F };
54+
inline const hkVector4f hkVector4f::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F };
5555

5656
constexpr hkVector4f::hkVector4f(float a_x, float a_y, float a_z, float a_w) noexcept :
5757
x(a_x), y(a_y), z(a_z), w(a_w)

include/RE/N/NiMatrix3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ namespace RE
5252

5353
namespace RE
5454
{
55-
inline constexpr NiMatrix3 NiMatrix3::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F };
56-
inline constexpr NiMatrix3 NiMatrix3::IDENTITY = { NiPoint4::IDENTITY0, NiPoint4::IDENTITY0, NiPoint4::IDENTITY0 };
55+
inline const NiMatrix3 NiMatrix3::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F };
56+
inline const NiMatrix3 NiMatrix3::IDENTITY = { NiPoint4::IDENTITY0, NiPoint4::IDENTITY0, NiPoint4::IDENTITY0 };
5757

5858
constexpr NiMatrix3::NiMatrix3(const NiPoint4& a_point0, const NiPoint4& a_point1, const NiPoint4& a_point2) noexcept
5959
{

include/RE/N/NiPoint2.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ namespace RE
171171
return *this;
172172
}
173173

174-
inline constexpr NiPoint2 NiPoint2::ZERO = { 0.0F, 0.0F };
175-
inline constexpr NiPoint2 NiPoint2::UNIT = { 1.0F, 1.0F };
176-
inline constexpr NiPoint2 NiPoint2::UNIT_X = { 1.0F, 0.0F };
177-
inline constexpr NiPoint2 NiPoint2::UNIT_Y = { 0.0F, 1.0F };
174+
inline const NiPoint2 NiPoint2::ZERO = { 0.0F, 0.0F };
175+
inline const NiPoint2 NiPoint2::UNIT = { 1.0F, 1.0F };
176+
inline const NiPoint2 NiPoint2::UNIT_X = { 1.0F, 0.0F };
177+
inline const NiPoint2 NiPoint2::UNIT_Y = { 0.0F, 1.0F };
178178
}
179179

180180
template <>

include/RE/N/NiPoint3.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,16 @@ namespace RE
239239
return x * x + y * y + z * z;
240240
}
241241

242-
inline constexpr NiPoint3 NiPoint3::ZERO = { 0.0F, 0.0F, 0.0F };
243-
inline constexpr NiPoint3 NiPoint3::UNIT = { 1.0F, 1.0F, 1.0F };
244-
inline constexpr NiPoint3 NiPoint3::UNIT_X = { 1.0F, 0.0F, 0.0F };
245-
inline constexpr NiPoint3 NiPoint3::UNIT_Y = { 0.0F, 1.0F, 0.0F };
246-
inline constexpr NiPoint3 NiPoint3::UNIT_Z = { 0.0F, 0.0F, 1.0F };
247-
inline constexpr NiPoint3A NiPoint3A::ZERO = { 0.0F, 0.0F, 0.0F };
248-
inline constexpr NiPoint3A NiPoint3A::UNIT = { 1.0F, 1.0F, 1.0F };
249-
inline constexpr NiPoint3A NiPoint3A::UNIT_X = { 1.0F, 0.0F, 0.0F };
250-
inline constexpr NiPoint3A NiPoint3A::UNIT_Y = { 0.0F, 1.0F, 0.0F };
251-
inline constexpr NiPoint3A NiPoint3A::UNIT_Z = { 0.0F, 0.0F, 1.0F };
242+
inline const NiPoint3 NiPoint3::ZERO = { 0.0F, 0.0F, 0.0F };
243+
inline const NiPoint3 NiPoint3::UNIT = { 1.0F, 1.0F, 1.0F };
244+
inline const NiPoint3 NiPoint3::UNIT_X = { 1.0F, 0.0F, 0.0F };
245+
inline const NiPoint3 NiPoint3::UNIT_Y = { 0.0F, 1.0F, 0.0F };
246+
inline const NiPoint3 NiPoint3::UNIT_Z = { 0.0F, 0.0F, 1.0F };
247+
inline const NiPoint3A NiPoint3A::ZERO = { 0.0F, 0.0F, 0.0F };
248+
inline const NiPoint3A NiPoint3A::UNIT = { 1.0F, 1.0F, 1.0F };
249+
inline const NiPoint3A NiPoint3A::UNIT_X = { 1.0F, 0.0F, 0.0F };
250+
inline const NiPoint3A NiPoint3A::UNIT_Y = { 0.0F, 1.0F, 0.0F };
251+
inline const NiPoint3A NiPoint3A::UNIT_Z = { 0.0F, 0.0F, 1.0F };
252252
}
253253

254254
template <>

include/RE/N/NiPoint4.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ namespace RE
202202
return *this;
203203
}
204204

205-
inline constexpr NiPoint4 NiPoint4::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F };
206-
inline constexpr NiPoint4 NiPoint4::IDENTITY0 = { 1.0F, 0.0F, 0.0F, 0.0F };
207-
inline constexpr NiPoint4 NiPoint4::IDENTITY1 = { 0.0F, 1.0F, 0.0F, 0.0F };
208-
inline constexpr NiPoint4 NiPoint4::IDENTITY2 = { 0.0F, 0.0F, 1.0F, 0.0F };
209-
inline constexpr NiPoint4 NiPoint4::IDENTITY3 = { 0.0F, 0.0F, 0.0F, 1.0F };
205+
inline const NiPoint4 NiPoint4::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F };
206+
inline const NiPoint4 NiPoint4::IDENTITY0 = { 1.0F, 0.0F, 0.0F, 0.0F };
207+
inline const NiPoint4 NiPoint4::IDENTITY1 = { 0.0F, 1.0F, 0.0F, 0.0F };
208+
inline const NiPoint4 NiPoint4::IDENTITY2 = { 0.0F, 0.0F, 1.0F, 0.0F };
209+
inline const NiPoint4 NiPoint4::IDENTITY3 = { 0.0F, 0.0F, 0.0F, 1.0F };
210210
}
211211

212212
template <>

include/RE/N/NiTransform.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ namespace RE
3333

3434
namespace RE
3535
{
36-
inline constexpr NiTransform NiTransform::ZERO = { NiMatrix3::ZERO, NiPoint3::ZERO, 0.0F };
37-
inline constexpr NiTransform NiTransform::IDENTITY = { NiMatrix3::IDENTITY, NiPoint3::ZERO, 1.0F };
36+
inline const NiTransform NiTransform::ZERO = { NiMatrix3::ZERO, NiPoint3::ZERO, 0.0F };
37+
inline const NiTransform NiTransform::IDENTITY = { NiMatrix3::IDENTITY, NiPoint3::ZERO, 1.0F };
3838

3939
constexpr NiTransform::NiTransform(const NiMatrix3& a_rotation, const NiPoint3& a_translation, const float a_scale) noexcept :
4040
rotate(a_rotation), translate(a_translation), scale(a_scale)

include/RE/P/PipboyCommand.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,23 @@ namespace RE
1010
static constexpr auto RTTI{ RTTI::PipboyCommand };
1111
static constexpr auto VTABLE{ VTABLE::PipboyCommand };
1212

13+
PipboyCommand(std::uint32_t a_id) :
14+
id(a_id)
15+
{
16+
REX::EMPLACE_VTABLE(this);
17+
}
18+
1319
// add
1420
virtual ~PipboyCommand(); // 00
1521
virtual void Init(Json::Value* a_json) = 0; // 01
1622
virtual const PipboyCommandResult* DoValidate(); // 02
1723
virtual const PipboyCommandResult* DoExecute(); // 03
1824

1925
// members
20-
const std::uint32_t id; // 08
21-
const PipboyCommandResult* validationResult; // 10
22-
const PipboyCommandResult* executionResult; // 18
23-
bool isReadonOnly; // 20
26+
const std::uint32_t id; // 0x08
27+
const PipboyCommandResult* validationResult{ nullptr }; // 0x10
28+
const PipboyCommandResult* executionResult{ nullptr }; // 0x18
29+
bool isReadonOnly{ false }; // 0x20
2430
};
2531
static_assert(sizeof(PipboyCommand) == 0x28);
2632
}

include/RE/P/PipboyCommandResult.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ namespace RE
88
static constexpr auto RTTI{ RTTI::PipboyCommandResult };
99
static constexpr auto VTABLE{ VTABLE::PipboyCommandResult };
1010

11+
PipboyCommandResult(std::uint32_t a_commandId, bool a_succeeded, bool a_shouldReply) :
12+
commandId(a_commandId), succeeded(a_succeeded), shouldReply(a_shouldReply)
13+
{
14+
REX::EMPLACE_VTABLE(this);
15+
}
16+
1117
// add
1218
virtual ~PipboyCommandResult(); // 00
1319
virtual void Serialize(Json::Value* a_json) = 0; // 01
1420

1521
// members
16-
const std::uint32_t commandID; // 08
22+
const std::uint32_t commandId; // 08
1723
const bool succeeded; // 0C
1824
const bool shouldReply; // 0D
1925
};

0 commit comments

Comments
 (0)