Skip to content

Commit

Permalink
Merge pull request #34 from Nightfallstorm/VariableGetType
Browse files Browse the repository at this point in the history
Add Variable::GetType
  • Loading branch information
powerof3 authored Oct 30, 2022
2 parents 68ea89b + ee7ed48 commit 2868ae2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/RE/V/Variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace RE
[[nodiscard]] bool IsObjectArray() const;
[[nodiscard]] bool IsString() const;

[[nodiscard]] TypeInfo GetType() const;
[[nodiscard]] std::int32_t GetSInt() const;
[[nodiscard]] std::uint32_t GetUInt() const;
[[nodiscard]] float GetFloat() const;
Expand Down
5 changes: 5 additions & 0 deletions src/RE/V/Variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ namespace RE
return varType.IsString();
}

TypeInfo Variable::GetType() const
{
return varType;
}

std::int32_t Variable::GetSInt() const
{
assert(IsInt());
Expand Down

0 comments on commit 2868ae2

Please sign in to comment.