diff --git a/r5dev/common/sdkdefs.h b/r5dev/common/sdkdefs.h index d3678d4e..f3ed5817 100644 --- a/r5dev/common/sdkdefs.h +++ b/r5dev/common/sdkdefs.h @@ -17,7 +17,6 @@ using std::ostringstream; using std::unordered_map; namespace fs = std::filesystem; -namespace js = nlohmann; typedef const unsigned char* rsig_t; #endif // SDKDEFS_H diff --git a/r5dev/vpklib/packedstore.cpp b/r5dev/vpklib/packedstore.cpp index 39e69d72..32a8db29 100644 --- a/r5dev/vpklib/packedstore.cpp +++ b/r5dev/vpklib/packedstore.cpp @@ -147,7 +147,7 @@ vector CPackedStore::GetEntryPaths(const string& svPathIn) const // &jManifest - // Output : vector //----------------------------------------------------------------------------- -vector CPackedStore::GetEntryPaths(const string& svPathIn, const js::json& jManifest) const +vector CPackedStore::GetEntryPaths(const string& svPathIn, const nlohmann::json& jManifest) const { vector vPaths; fs::recursive_directory_iterator dir(svPathIn), end; @@ -199,7 +199,7 @@ string CPackedStore::GetLevelName(const string& svDirectoryName) const // Input : &svManifestName - // Output : json //----------------------------------------------------------------------------- -js::json CPackedStore::GetManifest(const string& svWorkSpace, const string& svManifestName) const +nlohmann::json CPackedStore::GetManifest(const string& svWorkSpace, const string& svManifestName) const { ostringstream ostream; ostream << svWorkSpace << "manifest/" << svManifestName << ".json"; @@ -207,11 +207,11 @@ js::json CPackedStore::GetManifest(const string& svWorkSpace, const string& svMa if (fs::exists(fsPath)) { - js::json jsOut; + nlohmann::json jsOut; try { ifstream iManifest(fsPath.string().c_str(), std::ios::binary); - jsOut = js::json::parse(iManifest); + jsOut = nlohmann::json::parse(iManifest); return jsOut; } @@ -294,7 +294,7 @@ VPKPair_t CPackedStore::BuildFileName(string svLanguage, string svContext, const //----------------------------------------------------------------------------- void CPackedStore::BuildManifest(const vector& vBlock, const string& svWorkSpace, const string& svManifestName) const { - js::json jEntry; + nlohmann::json jEntry; for (size_t i = 0; i < vBlock.size(); i++) { @@ -362,7 +362,7 @@ void CPackedStore::PackAll(const VPKPair_t& vPair, const string& svPathIn, const string svLevelName = GetLevelName(vPair.m_svDirectoryName); vector vPaths; vector vEntryBlocks; - js::json jManifest = GetManifest(svPathIn, svLevelName); + nlohmann::json jManifest = GetManifest(svPathIn, svLevelName); if (bManifestOnly) { @@ -387,7 +387,7 @@ void CPackedStore::PackAll(const VPKPair_t& vPair, const string& svPathIn, const { try { - js::json jEntry = jManifest[StringReplaceC(vPaths[i], svPathIn, "")]; + nlohmann::json jEntry = jManifest[StringReplaceC(vPaths[i], svPathIn, "")]; if (!jEntry.is_null()) { nPreloadData = jEntry.at("preloadData").get(); diff --git a/r5dev/vpklib/packedstore.h b/r5dev/vpklib/packedstore.h index 99da0a8c..13e642f1 100644 --- a/r5dev/vpklib/packedstore.h +++ b/r5dev/vpklib/packedstore.h @@ -128,9 +128,9 @@ public: string GetPackChunkFile(const string& svPackDirFile, int iArchiveIndex) const; vector GetEntryBlocks(CIOStream* reader) const; vector GetEntryPaths(const string& svPathIn) const; - vector GetEntryPaths(const string& svPathIn, const js::json& jManifest) const; + vector GetEntryPaths(const string& svPathIn, const nlohmann::json& jManifest) const; string GetLevelName(const string& svDirectoryName) const; - js::json GetManifest(const string& svWorkSpace, const string& svManifestName) const; + nlohmann::json GetManifest(const string& svWorkSpace, const string& svManifestName) const; string FormatBlockPath(string svName, const string& svPath, const string& svExtension) const; string StripLocalePrefix(const string& svPackDirFile) const;