summaryrefslogtreecommitdiff
path: root/src/d/d_rawarchive.cpp
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2024-05-25 22:47:39 +0200
committerrobojumper <robojumper@gmail.com>2024-06-02 00:06:17 +0200
commiteea008649598ace5e625ec9771cb5291de04420c (patch)
treecf237e482909497fb3071d8b10a29aef824db754 /src/d/d_rawarchive.cpp
parent556fd33fc329f7634f9b0dadc94011bd46dc6b13 (diff)
Expatriate the inline string methods
Diffstat (limited to 'src/d/d_rawarchive.cpp')
-rw-r--r--src/d/d_rawarchive.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/d/d_rawarchive.cpp b/src/d/d_rawarchive.cpp
index 888ade40..75043513 100644
--- a/src/d/d_rawarchive.cpp
+++ b/src/d/d_rawarchive.cpp
@@ -1,8 +1,6 @@
#include <d/d_rawarchive.h>
+#include <inline_string.h>
#include <rvl/VI.h>
-// clang-format off
-#include <MSL_C/string.h>
-// clang-format on
class UnkManager {
public:
@@ -133,32 +131,6 @@ bool dRawArcEntry_c::loadArcFromDiskChecked(const char *fileName, const char *di
return false;
}
-// Regswap
-inline void inline_strncat(char *dest, const char *src, size_t destSize) {
- if (src != nullptr) {
- size_t destLen = strlen(dest);
- size_t copyLen = strlen(src);
-
- // Make sure copy length isnt more than destination length
- if (destLen + copyLen + 1 >= destSize) {
- copyLen = destSize - destLen - 1;
- }
-
- strncpy(dest + destLen, src, copyLen);
-
- // make sure string is null terminated
- size_t offset = destLen + copyLen;
- dest[offset] = '\0';
- }
-}
-
-inline void inline_strncpy(char *dest, const char *src, size_t destSize) {
- if (src != dest) {
- dest[0] = '\0';
- inline_strncat(dest, src, destSize);
- }
-}
-
bool dRawArcEntry_c::loadArcFromDisk(const char *arcName, const char *arcPath, u8 mountDirection, EGG::Heap *heap) {
mpDvdReq = mDvd_mountMemArchive_c::create(arcPath, mountDirection, heap);
if (mpDvdReq == nullptr) {