Skip to content

Commit 5441f0c

Browse files
vpkpp: VPP code doesnt need to use explicit sourcepp namespace
1 parent e1185d7 commit 5441f0c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/vpkpp/format/VPP.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
4141

4242
// Get file table offset
4343
static constexpr uint32_t headerSize = sizeof(uint32_t) * 4;
44-
reader.seek_in(headerSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, headerSize));
44+
reader.seek_in(headerSize + math::paddingForAlignment(VPP_ALIGNMENT, headerSize));
4545

4646
// Get base file offset
4747
const uint32_t fileTableSize = (60 + sizeof(uint32_t)) * entryCount;
48-
vpp->entryBaseOffset = headerSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, headerSize)
49-
+ fileTableSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, fileTableSize);
48+
vpp->entryBaseOffset = headerSize + math::paddingForAlignment(VPP_ALIGNMENT, headerSize)
49+
+ fileTableSize + math::paddingForAlignment(VPP_ALIGNMENT, fileTableSize);
5050

5151
// Get first file offset
5252
uint32_t entryOffset = 0;
@@ -63,7 +63,7 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
6363

6464
// Calculate file offset
6565
entry.offset = entryOffset;
66-
entryOffset += entry.length + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, entry.length);
66+
entryOffset += entry.length + math::paddingForAlignment(VPP_ALIGNMENT, entry.length);
6767

6868
// Put it in
6969
vpp->entries.emplace(entryPath, entry);
@@ -83,12 +83,12 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
8383

8484
// Get file table offset
8585
static constexpr uint32_t headerSize = sizeof(uint32_t) * 4;
86-
reader.seek_in(headerSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, headerSize));
86+
reader.seek_in(headerSize + math::paddingForAlignment(VPP_ALIGNMENT, headerSize));
8787

8888
// Get base file offset
8989
const uint32_t fileTableSize = (24 + sizeof(uint32_t) * 2) * entryCount;
90-
vpp->entryBaseOffset = headerSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, headerSize)
91-
+ fileTableSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, fileTableSize);
90+
vpp->entryBaseOffset = headerSize + math::paddingForAlignment(VPP_ALIGNMENT, headerSize)
91+
+ fileTableSize + math::paddingForAlignment(VPP_ALIGNMENT, fileTableSize);
9292

9393
// Get first file offset
9494
uint32_t entryOffset = 0;
@@ -112,7 +112,7 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
112112

113113
// Calculate file offset
114114
entry.offset = entryOffset;
115-
entryOffset += entry.length + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, entry.length);
115+
entryOffset += entry.length + math::paddingForAlignment(VPP_ALIGNMENT, entry.length);
116116

117117
// Put it in
118118
vpp->entries.emplace(entryPath, entry);
@@ -154,8 +154,8 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
154154

155155
// Set base data offset
156156
vpp->entryBaseOffset = VPP_ALIGNMENT
157-
+ entryDirectorySize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, entryDirectorySize)
158-
+ entryNamesSize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, entryNamesSize);
157+
+ entryDirectorySize + math::paddingForAlignment(VPP_ALIGNMENT, entryDirectorySize)
158+
+ entryNamesSize + math::paddingForAlignment(VPP_ALIGNMENT, entryNamesSize);
159159

160160
// Seek to file directory (alignment boundary)
161161
reader.seek_in(VPP_ALIGNMENT);
@@ -190,7 +190,7 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
190190

191191
// Get file name
192192
const auto lastPos = reader.tell_in();
193-
reader.seek_in(VPP_ALIGNMENT + entryDirectorySize + sourcepp::math::paddingForAlignment(VPP_ALIGNMENT, entryDirectorySize) + entryNameOffset);
193+
reader.seek_in(VPP_ALIGNMENT + entryDirectorySize + math::paddingForAlignment(VPP_ALIGNMENT, entryDirectorySize) + entryNameOffset);
194194
const auto entryPath = vpp->cleanEntryPath(reader.read_string(entryNamesSize - entryNameOffset));
195195
reader.seek_in_u(lastPos);
196196

0 commit comments

Comments
 (0)