Skip to content

Commit

Permalink
maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored and github-actions[bot] committed May 27, 2024
1 parent d39aa24 commit c709ebf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions include/RE/H/hkpProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace RE
hkpPropertyValue(float a_value);
hkpPropertyValue(void* a_value);

[[nodiscard]] float GetFloat() const;
[[nodiscard]] void* GetPointer() const;
[[nodiscard]] std::int32_t GetSInt() const;
[[nodiscard]] float GetFloat() const;
[[nodiscard]] void* GetPointer() const;
[[nodiscard]] std::int32_t GetSInt() const;
[[nodiscard]] std::uint32_t GetUInt() const;
[[nodiscard]] std::uint64_t GetUInt64() const;

Expand All @@ -28,7 +28,7 @@ namespace RE
public:
hkpProperty() = default;
hkpProperty(std::uint32_t a_key, hkpPropertyValue a_value);

// members
std::uint32_t key; // 00
std::uint32_t alignmentPadding; // 04
Expand Down
16 changes: 8 additions & 8 deletions src/RE/H/hkpProperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ namespace RE
hkpPropertyValue::hkpPropertyValue(std::uint64_t a_value) :
data(a_value)
{}
hkpPropertyValue::hkpPropertyValue(std::int32_t a_value):

hkpPropertyValue::hkpPropertyValue(std::int32_t a_value) :
data(a_value)
{}

hkpPropertyValue::hkpPropertyValue(std::uint32_t a_value):
hkpPropertyValue::hkpPropertyValue(std::uint32_t a_value) :
data(static_cast<std::int32_t>(a_value))
{}

Expand All @@ -26,19 +26,19 @@ namespace RE
data = value.u;
}

hkpPropertyValue::hkpPropertyValue(void* a_value):
hkpPropertyValue::hkpPropertyValue(void* a_value) :
data(reinterpret_cast<std::uint64_t>(a_value))
{}

float hkpPropertyValue::GetFloat() const
{
union
{
float f;
float f;
std::uint32_t u;
} value{};
value.u = static_cast<std::uint32_t>(data);

value.u = static_cast<std::uint32_t>(data);
return value.f;
}

Expand All @@ -62,7 +62,7 @@ namespace RE
return data;
}

hkpProperty::hkpProperty(std::uint32_t a_key, hkpPropertyValue a_value):
hkpProperty::hkpProperty(std::uint32_t a_key, hkpPropertyValue a_value) :
key(a_key),
alignmentPadding(0),
value(a_value)
Expand Down
2 changes: 1 addition & 1 deletion src/RE/H/hkpWorldObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace RE
return property;
}
}

return std::nullopt;
}

Expand Down

0 comments on commit c709ebf

Please sign in to comment.