Skip to content

Commit 707ba88

Browse files
committed
feat: revert IDDB rename
- leave it as is for now
1 parent af71cf4 commit 707ba88

6 files changed

Lines changed: 24 additions & 26 deletions

File tree

include/REL/ID.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "REX/REX/FModule.h"
44

5-
#include "REL/FIDDB.h"
5+
#include "REL/IDDB.h"
66

77
namespace REL
88
{
@@ -34,7 +34,7 @@ namespace REL
3434

3535
[[nodiscard]] std::size_t offset() const
3636
{
37-
const auto iddb = FIDDB::GetSingleton();
37+
const auto iddb = IDDB::GetSingleton();
3838
return iddb->offset(m_id);
3939
}
4040

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
namespace REL
99
{
10-
class FIDDB :
11-
public REX::TSingleton<FIDDB>
10+
class IDDB :
11+
public REX::TSingleton<IDDB>
1212
{
1313
public:
1414
enum class Loader : std::uint32_t
@@ -35,7 +35,7 @@ namespace REL
3535
std::uint64_t offset;
3636
};
3737

38-
FIDDB();
38+
IDDB();
3939

4040
std::uint64_t offset(std::uint64_t a_id) const;
4141

@@ -67,6 +67,4 @@ namespace REL
6767
std::span<MAPPING> m_v0;
6868
std::span<std::uint32_t> m_v5;
6969
};
70-
71-
using IDDB [[deprecated("Renamed to 'REL::FIDDB'")]] = FIDDB;
7270
}

include/REL/Offset2ID.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "REL/FIDDB.h"
3+
#include "REL/IDDB.h"
44

55
#include "REX/BASE.h"
66

@@ -10,7 +10,7 @@ namespace REL
1010
public REX::TSingleton<Offset2ID>
1111
{
1212
public:
13-
using value_type = FIDDB::MAPPING;
13+
using value_type = IDDB::MAPPING;
1414
using container_type = std::vector<value_type>;
1515
using size_type = typename container_type::size_type;
1616
using const_iterator = typename container_type::const_iterator;

include/REL/REL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include "REL/ASM.h"
44
#include "REL/FHook.h"
55
#include "REL/FHookStore.h"
6-
#include "REL/FIDDB.h"
76
#include "REL/IAT.h"
87
#include "REL/ID.h"
8+
#include "REL/IDDB.h"
99
#include "REL/IHook.h"
1010
#include "REL/Offset.h"
1111
#include "REL/Offset2ID.h"
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "REL/FIDDB.h"
1+
#include "REL/IDDB.h"
22

33
#include "REL/Version.h"
44

@@ -9,7 +9,7 @@
99

1010
namespace REL
1111
{
12-
class FIDDB::STREAM
12+
class IDDB::STREAM
1313
{
1414
public:
1515
using stream_type = std::ifstream;
@@ -51,10 +51,10 @@ namespace REL
5151
stream_type _stream;
5252
};
5353

54-
class FIDDB::HEADER_V2
54+
class IDDB::HEADER_V2
5555
{
5656
public:
57-
HEADER_V2(FIDDB::STREAM& a_in)
57+
HEADER_V2(IDDB::STREAM& a_in)
5858
{
5959
a_in.readin(m_gameVersion);
6060

@@ -88,10 +88,10 @@ namespace REL
8888
std::int32_t m_addressCount{ 0 };
8989
};
9090

91-
class FIDDB::HEADER_V5
91+
class IDDB::HEADER_V5
9292
{
9393
public:
94-
HEADER_V5(FIDDB::STREAM& a_in)
94+
HEADER_V5(IDDB::STREAM& a_in)
9595
{
9696
a_in.readin(m_gameVersion);
9797
a_in.readin(m_name);
@@ -124,7 +124,7 @@ namespace REL
124124

125125
namespace REL
126126
{
127-
FIDDB::FIDDB()
127+
IDDB::IDDB()
128128
{
129129
std::unordered_map<Loader, std::vector<std::wstring>> g_rootMap{
130130
{ Loader::SKSE, { L"versionlib", L"version" } },
@@ -191,7 +191,7 @@ namespace REL
191191
}
192192
}
193193

194-
void FIDDB::load_v0()
194+
void IDDB::load_v0()
195195
{
196196
const auto mod = REX::FModule::GetExecutingModule();
197197
const auto mapName = std::format("COMMONLIB_IDDB_OFFSETS_{}", mod.GetFileVersion().string("_"));
@@ -206,7 +206,7 @@ namespace REL
206206
};
207207
}
208208

209-
void FIDDB::load_v2(STREAM& a_stream)
209+
void IDDB::load_v2(STREAM& a_stream)
210210
{
211211
try {
212212
HEADER_V2 header(a_stream);
@@ -244,7 +244,7 @@ namespace REL
244244
}
245245
}
246246

247-
void FIDDB::load_v5(STREAM& a_stream)
247+
void IDDB::load_v5(STREAM& a_stream)
248248
{
249249
try {
250250
HEADER_V5 header(a_stream);
@@ -272,7 +272,7 @@ namespace REL
272272
}
273273
}
274274

275-
void FIDDB::unpack_file(STREAM& a_stream, const HEADER_V2& a_header)
275+
void IDDB::unpack_file(STREAM& a_stream, const HEADER_V2& a_header)
276276
{
277277
std::uint8_t type = 0;
278278
std::uint64_t id = 0;
@@ -355,7 +355,7 @@ namespace REL
355355
}
356356
}
357357

358-
void FIDDB::validate_file()
358+
void IDDB::validate_file()
359359
{
360360
// clang-format off
361361
std::unordered_map<Loader, std::vector<std::pair<REL::Version, std::string_view>>> g_blacklistMap{
@@ -382,7 +382,7 @@ namespace REL
382382
}
383383
}
384384

385-
std::uint64_t FIDDB::offset(std::uint64_t a_id) const
385+
std::uint64_t IDDB::offset(std::uint64_t a_id) const
386386
{
387387
const auto mod = REX::FModule::GetExecutingModule();
388388
if (std::to_underlying(m_format) < 5) {

src/REL/Offset2ID.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace REL
77
{
88
void Offset2ID::load_v2()
99
{
10-
const auto iddb = FIDDB::GetSingleton();
11-
const auto id2offset = iddb->get_id2offset<FIDDB::MAPPING>();
10+
const auto iddb = IDDB::GetSingleton();
11+
const auto id2offset = iddb->get_id2offset<IDDB::MAPPING>();
1212
_offset2id.reserve(id2offset.size());
1313
_offset2id.insert(_offset2id.begin(), id2offset.begin(), id2offset.end());
1414
std::sort(std::execution::sequenced_policy{}, _offset2id.begin(), _offset2id.end(), [](auto&& a_lhs, auto&& a_rhs) {
@@ -18,7 +18,7 @@ namespace REL
1818

1919
void Offset2ID::load_v5()
2020
{
21-
const auto iddb = FIDDB::GetSingleton();
21+
const auto iddb = IDDB::GetSingleton();
2222
const auto id2offset = iddb->get_id2offset<std::uint32_t>();
2323
_offset2id.reserve(id2offset.size());
2424

0 commit comments

Comments
 (0)