Skip to content

Commit 2f029b6

Browse files
committed
feat: add BSResource::ID ctor
1 parent 15c7c08 commit 2f029b6

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

include/RE/B/BSResource_FileID.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ namespace RE::BSResource
88
[[nodiscard]] bool operator==(const FileID&) const noexcept = default;
99

1010
// members
11-
std::uint32_t file = 0; // 0
12-
std::uint32_t ext = 0; // 4
11+
std::uint32_t file{ 0 }; // 0
12+
std::uint32_t ext{ 0 }; // 4
1313
};
1414
static_assert(sizeof(FileID) == 0x8);
1515
}

include/RE/B/BSResource_ID.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ namespace RE::BSResource
88
public FileID // 0
99
{
1010
public:
11+
ID(const char* a_path)
12+
{
13+
GenerateFromPath(a_path);
14+
}
15+
1116
[[nodiscard]] bool operator==(const ID&) const noexcept = default;
1217

1318
void GenerateFromPath(const char* a_path)
@@ -18,7 +23,7 @@ namespace RE::BSResource
1823
}
1924

2025
// members
21-
std::uint32_t dir = 0; // 8
26+
std::uint32_t dir{ 0 }; // 8
2227
};
2328
static_assert(sizeof(ID) == 0xC);
2429
}

0 commit comments

Comments
 (0)