diff --git a/r5dev/thirdparty/cppnet/cppkore/Animation.cpp b/r5dev/thirdparty/cppnet/cppkore/Animation.cpp index 02e14434..a5910f1c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Animation.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Animation.cpp @@ -18,7 +18,7 @@ namespace Assets { } - List& Animation::GetNodeCurves(const string& NodeName) + List& Animation::GetNodeCurves(const String& NodeName) { if (Curves.ContainsKey(NodeName)) return Curves[NodeName]; @@ -27,7 +27,7 @@ namespace Assets return Curves[NodeName]; } - void Animation::AddNotification(const string& Name, uint32_t Frame) + void Animation::AddNotification(const String& Name, uint32_t Frame) { if (Notificiations.ContainsKey(Name)) Notificiations[Name].EmplaceBack(Frame); diff --git a/r5dev/thirdparty/cppnet/cppkore/Animation.h b/r5dev/thirdparty/cppnet/cppkore/Animation.h index 2c9d63b8..5d4d8058 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Animation.h +++ b/r5dev/thirdparty/cppnet/cppkore/Animation.h @@ -26,19 +26,19 @@ namespace Assets Animation(uint32_t BoneCount, float FrameRate); // The name of the animation - string Name; + String Name; // A collection of 3D bones for this animation. (May or may not represent the actual skeleton) List Bones; // The collection of curves that make up this animation. - Dictionary> Curves; + Dictionary> Curves; // A collection of notifications that may occur. - Dictionary> Notificiations; + Dictionary> Notificiations; // Gets a reference to a list of node curves. - List& GetNodeCurves(const string& NodeName); + List& GetNodeCurves(const String& NodeName); // Adds a notification to the animation. - void AddNotification(const string& Name, uint32_t Frame); + void AddNotification(const String& Name, uint32_t Frame); // Gets the count of frames in the animation. const uint32_t FrameCount(bool Legacy = false) const; diff --git a/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.cpp b/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.cpp index 13a05a0c..1bc45c58 100644 --- a/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.cpp @@ -145,7 +145,7 @@ namespace Assets this->Invalidate(); } - void AssetRenderer::SetAssetName(const string& Name) + void AssetRenderer::SetAssetName(const String& Name) { this->_DrawInformation.AssetName = Name; this->Redraw(); @@ -629,15 +629,15 @@ namespace Assets glColor4f(35 / 255.f, 206 / 255.f, 107 / 255.f, 1); - _RenderFont.RenderString(string((this->_ShowBones) ? "Hide Bones (b), " : "Draw Bones (b), ") + string((this->_ShowMaterials) ? "Shaded View (t), " : "Material View (t), ") + string((this->_UseWireframe) ? "Hide Wireframe (w)" : "Draw Wireframe (w)"), 22, this->_Height - 44.f, FontScale); + _RenderFont.RenderString(String((this->_ShowBones) ? "Hide Bones (b), " : "Draw Bones (b), ") + String((this->_ShowMaterials) ? "Shaded View (t), " : "Material View (t), ") + String((this->_UseWireframe) ? "Hide Wireframe (w)" : "Draw Wireframe (w)"), 22, this->_Height - 44.f, FontScale); glColor4f(0.9f, 0.9f, 0.9f, 1); - _RenderFont.RenderString((this->_DrawInformation.AssetName == "") ? string("N/A") : this->_DrawInformation.AssetName, 96, 22, FontScale); - _RenderFont.RenderString(string::Format("%d", this->_DrawInformation.MeshCount), 96, 38, FontScale); - _RenderFont.RenderString(string::Format("%d", this->_DrawInformation.VertexCount), 96, 54, FontScale); - _RenderFont.RenderString(string::Format("%d", this->_DrawInformation.TriangleCount), 96, 70, FontScale); - _RenderFont.RenderString(string::Format("%d", this->_DrawInformation.BoneCount), 96, 86, FontScale); + _RenderFont.RenderString((this->_DrawInformation.AssetName == "") ? String("N/A") : this->_DrawInformation.AssetName, 96, 22, FontScale); + _RenderFont.RenderString(String::Format("%d", this->_DrawInformation.MeshCount), 96, 38, FontScale); + _RenderFont.RenderString(String::Format("%d", this->_DrawInformation.VertexCount), 96, 54, FontScale); + _RenderFont.RenderString(String::Format("%d", this->_DrawInformation.TriangleCount), 96, 70, FontScale); + _RenderFont.RenderString(String::Format("%d", this->_DrawInformation.BoneCount), 96, 86, FontScale); break; case DrawMode::Texture: glColor4f(3 / 255.f, 169 / 255.f, 244 / 255.f, 1); @@ -649,10 +649,10 @@ namespace Assets glColor4f(0.9f, 0.9f, 0.9f, 1); - _RenderFont.RenderString((this->_DrawInformation.AssetName == "") ? string("N/A") : this->_DrawInformation.AssetName, 96, 22, FontScale); - _RenderFont.RenderString(string::Format("%d", this->_DrawInformation.Width), 96, 38, FontScale); - _RenderFont.RenderString(string::Format("%d", this->_DrawInformation.Height), 96, 54, FontScale); - _RenderFont.RenderString(string::Format("%d%%", this->_DrawInformation.Scale), 96, 70, FontScale); + _RenderFont.RenderString((this->_DrawInformation.AssetName == "") ? String("N/A") : this->_DrawInformation.AssetName, 96, 22, FontScale); + _RenderFont.RenderString(String::Format("%d", this->_DrawInformation.Width), 96, 38, FontScale); + _RenderFont.RenderString(String::Format("%d", this->_DrawInformation.Height), 96, 54, FontScale); + _RenderFont.RenderString(String::Format("%d%%", this->_DrawInformation.Scale), 96, 70, FontScale); break; } } diff --git a/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.h b/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.h index 8232f353..3639c316 100644 --- a/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.h +++ b/r5dev/thirdparty/cppnet/cppkore/AssetRenderer.h @@ -56,7 +56,7 @@ namespace Assets virtual ~AssetRenderer(); // Special function to stream in a material image - using MaterialStreamCallback = std::function(const string, const uint64_t)>; + using MaterialStreamCallback = std::function(const String, const uint64_t)>; // Clears the current model, if any, and assigns the new one void SetViewModel(const Model& Model); @@ -72,7 +72,7 @@ namespace Assets void ClearViewTexture(); // Sets the name of the model - void SetAssetName(const string& Name); + void SetAssetName(const String& Name); // Enable or disable wireframe rendering void SetUseWireframe(bool Value); @@ -121,7 +121,7 @@ namespace Assets int32_t Scale; - string AssetName; + String AssetName; uint32_t BoneCount; } _DrawInformation; diff --git a/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.cpp b/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.cpp index af910ccd..9b7d48a5 100644 --- a/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.cpp @@ -9,12 +9,12 @@ namespace Assets::Exporters { - bool AutodeskMaya::ExportAnimation(const Animation& Animation, const string& Path) + bool AutodeskMaya::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool AutodeskMaya::ExportModel(const Model& Model, const string& Path) + bool AutodeskMaya::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::StreamWriter(IO::File::Create(Path)); auto FileName = IO::Path::GetFileNameWithoutExtension(Path); @@ -207,7 +207,7 @@ namespace Assets::Exporters "createNode file -n \"%sFILE\";\n" "setAttr \".ftn\" -type \"string\" \"%s\";", MaterialName, - (char*)string(Material.Slots[DiffuseTexture].first).Replace("\\", "\\\\") + (char*)String(Material.Slots[DiffuseTexture].first).Replace("\\", "\\\\") ); } } @@ -401,7 +401,7 @@ namespace Assets::Exporters uint32_t BoneMapIndex = 0; Dictionary BoneMap; Dictionary ReverseBoneMap; - List BoneNames; + List BoneNames; for (auto& Vertex : Submesh.Vertices) { diff --git a/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.h b/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.h index dc20f2cb..22d3a935 100644 --- a/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.h +++ b/r5dev/thirdparty/cppnet/cppkore/AutodeskMaya.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~AutodeskMaya() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/BinaryReader.cpp b/r5dev/thirdparty/cppnet/cppkore/BinaryReader.cpp index fd91f782..1da6838b 100644 --- a/r5dev/thirdparty/cppnet/cppkore/BinaryReader.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/BinaryReader.cpp @@ -61,12 +61,12 @@ namespace IO return this->BaseStream->Read((uint8_t*)Buffer, Index, Count); } - string BinaryReader::ReadCString() + String BinaryReader::ReadCString() { if (!this->BaseStream) IOError::StreamBaseStream(); - string Buffer = ""; + String Buffer = ""; char Cur = this->Read(); while ((uint8_t)Cur > 0) @@ -78,12 +78,12 @@ namespace IO return std::move(Buffer); } - wstring BinaryReader::ReadWCString() + WString BinaryReader::ReadWCString() { if (!this->BaseStream) IOError::StreamBaseStream(); - wstring Buffer = L""; + WString Buffer = L""; wchar_t Cur = this->Read(); while (Cur != (wchar_t)'\0') @@ -95,23 +95,23 @@ namespace IO return std::move(Buffer); } - string BinaryReader::ReadSizeString(uint64_t Size) + String BinaryReader::ReadSizeString(uint64_t Size) { if (!this->BaseStream) IOError::StreamBaseStream(); - auto Buffer = string((uint32_t)Size, '\0'); + auto Buffer = String((uint32_t)Size, '\0'); this->BaseStream->Read((uint8_t*)&Buffer[0], 0, Size); return std::move(Buffer); } - string BinaryReader::ReadNetString() + String BinaryReader::ReadNetString() { if (!this->BaseStream) IOError::StreamBaseStream(); - auto Buffer = string(this->ReadVarInt(), '\0'); + auto Buffer = String(this->ReadVarInt(), '\0'); this->BaseStream->Read((uint8_t*)&Buffer[0], 0, (uint64_t)Buffer.Length()); return std::move(Buffer); @@ -135,7 +135,7 @@ namespace IO return Count; } - int64_t BinaryReader::SignatureScan(const string& Signature) + int64_t BinaryReader::SignatureScan(const String& Signature) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -166,7 +166,7 @@ namespace IO return SearchResult; } - int64_t BinaryReader::SignatureScan(const string& Signature, uint64_t Offset, uint64_t Count) + int64_t BinaryReader::SignatureScan(const String& Signature, uint64_t Offset, uint64_t Count) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -184,7 +184,7 @@ namespace IO return SearchResult; } - List BinaryReader::SignatureScanAll(const string & Signature) + List BinaryReader::SignatureScanAll(const String & Signature) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -217,7 +217,7 @@ namespace IO return ResultList; } - List BinaryReader::SignatureScanAll(const string & Signature, uint64_t Offset, uint64_t Count) + List BinaryReader::SignatureScanAll(const String & Signature, uint64_t Offset, uint64_t Count) { if (!this->BaseStream) IOError::StreamBaseStream(); diff --git a/r5dev/thirdparty/cppnet/cppkore/BinaryReader.h b/r5dev/thirdparty/cppnet/cppkore/BinaryReader.h index 69fe18cb..a73f39e9 100644 --- a/r5dev/thirdparty/cppnet/cppkore/BinaryReader.h +++ b/r5dev/thirdparty/cppnet/cppkore/BinaryReader.h @@ -39,26 +39,26 @@ namespace IO uint64_t Read(void* Buffer, uint64_t Index, uint64_t Count); // Reads a null-terminated string from the stream - string ReadCString(); + String ReadCString(); // Reads a wide null-terminated string from the stream - wstring ReadWCString(); + WString ReadWCString(); // Reads a size-string from the stream - string ReadSizeString(uint64_t Size); + String ReadSizeString(uint64_t Size); // Reads a .NET string from the stream - string ReadNetString(); + String ReadNetString(); // Reads an integer encoded into 7 bits, top bit = read more uint32_t ReadVarInt(); // Scan the stream for a given signature - int64_t SignatureScan(const string& Signature); + int64_t SignatureScan(const String& Signature); // Scan the stream for a given signature - int64_t SignatureScan(const string& Signature, uint64_t Offset, uint64_t Count); + int64_t SignatureScan(const String& Signature, uint64_t Offset, uint64_t Count); // Scan the process for a given signature (All occurences) - List SignatureScanAll(const string& Signature); + List SignatureScanAll(const String& Signature); // Scan the process for a given signature (All occurences) - List SignatureScanAll(const string& Signature, uint64_t Offset, uint64_t Count); + List SignatureScanAll(const String& Signature, uint64_t Offset, uint64_t Count); // Get the underlying stream Stream* GetBaseStream() const; diff --git a/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.cpp b/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.cpp index 255af5dc..c85f4025 100644 --- a/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.cpp @@ -56,7 +56,7 @@ namespace IO this->BaseStream->Write((uint8_t*)Buffer, Index, Count); } - void BinaryWriter::WriteCString(const string& Value) + void BinaryWriter::WriteCString(const String& Value) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -70,7 +70,7 @@ namespace IO this->BaseStream->Write(&NullBuffer, 0, 1); } - void BinaryWriter::WriteWCString(const wstring& Value) + void BinaryWriter::WriteWCString(const WString& Value) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -84,7 +84,7 @@ namespace IO this->BaseStream->Write((uint8_t*)&NullBuffer, 0, sizeof(uint16_t)); } - void BinaryWriter::WriteSizeString(const string& Value) + void BinaryWriter::WriteSizeString(const String& Value) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -92,7 +92,7 @@ namespace IO this->BaseStream->Write((uint8_t*)Value.begin(), 0, Value.Length()); } - void BinaryWriter::WriteNetString(const string& Value) + void BinaryWriter::WriteNetString(const String& Value) { if (!this->BaseStream) IOError::StreamBaseStream(); diff --git a/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.h b/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.h index e4f1d48d..196cdcdd 100644 --- a/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.h +++ b/r5dev/thirdparty/cppnet/cppkore/BinaryWriter.h @@ -35,13 +35,13 @@ namespace IO void Write(void* Buffer, uint64_t Index, uint64_t Count); // Writes a null-terminated string to the stream - void WriteCString(const string& Value); + void WriteCString(const String& Value); // Writes a wide null-terminated string to the stream - void WriteWCString(const wstring& Value); + void WriteWCString(const WString& Value); // Writes a already predetermined size string to the stream - void WriteSizeString(const string& Value); + void WriteSizeString(const String& Value); // Writes a .NET string to the stream - void WriteNetString(const string& Value); + void WriteNetString(const String& Value); // Writes an integer encoded into 7 bits, top bit = read more void WriteVarInt(uint32_t Value); diff --git a/r5dev/thirdparty/cppnet/cppkore/Bone.cpp b/r5dev/thirdparty/cppnet/cppkore/Bone.cpp index db0992be..a31bb852 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Bone.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Bone.cpp @@ -8,17 +8,17 @@ namespace Assets { } - Bone::Bone(const string& Name) + Bone::Bone(const String& Name) : Bone(Name, -1, { 0, 0, 0 }, { 0, 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 0, 1 }, { 1, 1, 1 }, BoneFlags::HasLocalSpaceMatrices) { } - Bone::Bone(const string& Name, int32_t ParentIndex) + Bone::Bone(const String& Name, int32_t ParentIndex) : Bone(Name, ParentIndex, { 0, 0, 0 }, { 0, 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 0, 1 }, { 1, 1, 1 }, BoneFlags::HasLocalSpaceMatrices) { } - Bone::Bone(const string& Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, BoneFlags Flags) + Bone::Bone(const String& Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, BoneFlags Flags) : Bone(Name, ParentIndex) { if (((int)Flags & (int)BoneFlags::HasLocalSpaceMatrices) == (int)BoneFlags::HasLocalSpaceMatrices) @@ -35,7 +35,7 @@ namespace Assets this->_Flags = Flags; } - Bone::Bone(const string & Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, Vector3 Scale, BoneFlags Flags) + Bone::Bone(const String & Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, Vector3 Scale, BoneFlags Flags) : Bone(Name, ParentIndex) { if (((int)Flags & (int)BoneFlags::HasLocalSpaceMatrices) == (int)BoneFlags::HasLocalSpaceMatrices) @@ -53,7 +53,7 @@ namespace Assets this->_Flags = Flags; } - Bone::Bone(const string& Name, int32_t ParentIndex, Vector3 LocalPosition, Quaternion LocalRotation, Vector3 GlobalPosition, Quaternion GlobalRotation, Vector3 Scale, BoneFlags Flags) + Bone::Bone(const String& Name, int32_t ParentIndex, Vector3 LocalPosition, Quaternion LocalRotation, Vector3 GlobalPosition, Quaternion GlobalRotation, Vector3 Scale, BoneFlags Flags) : _Name(Name), _Parent(ParentIndex), _LocalSpacePosition(LocalPosition), _LocalSpaceRotation(LocalRotation), _GlobalSpacePosition(GlobalPosition), _GlobalSpaceRotation(GlobalRotation), _Scale(Scale), _Flags(Flags) { } @@ -68,12 +68,12 @@ namespace Assets this->_Flags = Value ? (BoneFlags)((int)this->_Flags | (int)Flags) : (BoneFlags)((int)this->_Flags & ~(int)Flags); } - const string& Bone::Name() const + const String& Bone::Name() const { return this->_Name; } - void Bone::SetName(const string& Value) + void Bone::SetName(const String& Value) { this->_Name = Value; } diff --git a/r5dev/thirdparty/cppnet/cppkore/Bone.h b/r5dev/thirdparty/cppnet/cppkore/Bone.h index 57ec4f26..4f33409a 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Bone.h +++ b/r5dev/thirdparty/cppnet/cppkore/Bone.h @@ -18,15 +18,15 @@ namespace Assets // Initialize a blank 3D bone. Bone(); // Initialize a 3D bone with it's tag name. - Bone(const string& Name); + Bone(const String& Name); // Initialize a 3D bone with it's tag name, and parent index. - Bone(const string& Name, int32_t ParentIndex); + Bone(const String& Name, int32_t ParentIndex); // Initialize a 3D bone with it's tag name, parent index, and transposition matrix. - Bone(const string& Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, BoneFlags Flags = BoneFlags::HasLocalSpaceMatrices); + Bone(const String& Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, BoneFlags Flags = BoneFlags::HasLocalSpaceMatrices); // Initialize a 3D bone with it's tag name, parent index, transposition matrix, and scale transform. - Bone(const string& Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, Vector3 Scale, BoneFlags Flags = (BoneFlags::HasLocalSpaceMatrices | BoneFlags::HasScale)); + Bone(const String& Name, int32_t ParentIndex, Vector3 Position, Quaternion Rotation, Vector3 Scale, BoneFlags Flags = (BoneFlags::HasLocalSpaceMatrices | BoneFlags::HasScale)); // Initialize a 3D bone with it's tag name, parent index, local and global transposition matrix, and scale transform. - Bone(const string& Name, int32_t ParentIndex, Vector3 LocalPosition, Quaternion LocalRotation, Vector3 GlobalPosition, Quaternion GlobalRotation, Vector3 Scale, BoneFlags Flags = (BoneFlags::HasGlobalSpaceMatrices | BoneFlags::HasLocalSpaceMatrices | BoneFlags::HasScale)); + Bone(const String& Name, int32_t ParentIndex, Vector3 LocalPosition, Quaternion LocalRotation, Vector3 GlobalPosition, Quaternion GlobalRotation, Vector3 Scale, BoneFlags Flags = (BoneFlags::HasGlobalSpaceMatrices | BoneFlags::HasLocalSpaceMatrices | BoneFlags::HasScale)); // Destroy all 3D bone resources. ~Bone() = default; @@ -39,9 +39,9 @@ namespace Assets void SetFlag(BoneFlags Flags, bool Value); // Gets the tag name assigned to the bone. - const string& Name() const; + const String& Name() const; // Sets the tag name assigned to the bone. - void SetName(const string& Value); + void SetName(const String& Value); // Gets the parent bone index. const int32_t& Parent() const; @@ -75,7 +75,7 @@ namespace Assets private: // Internal tag name - string _Name; + String _Name; // Internal parent index int32_t _Parent; diff --git a/r5dev/thirdparty/cppnet/cppkore/CRC32.cpp b/r5dev/thirdparty/cppnet/cppkore/CRC32.cpp index e067c686..6461c3ed 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CRC32.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/CRC32.cpp @@ -51,7 +51,7 @@ namespace Hashing 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; - uint32_t CRC32::HashString(const string& Input, uint32_t Seed) + uint32_t CRC32::HashString(const String& Input, uint32_t Seed) { return ComputeHash((uint8_t*)(char*)Input, 0, Input.Length(), Seed); } diff --git a/r5dev/thirdparty/cppnet/cppkore/CRC32.h b/r5dev/thirdparty/cppnet/cppkore/CRC32.h index 560e3792..40a8d320 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CRC32.h +++ b/r5dev/thirdparty/cppnet/cppkore/CRC32.h @@ -18,7 +18,7 @@ namespace Hashing } // Computes the hash code of the input string using CRC32 algo. - static uint32_t HashString(const string& Input, uint32_t Seed = 0); + static uint32_t HashString(const String& Input, uint32_t Seed = 0); // Computes the hash code using the CRC32 algo. static uint32_t ComputeHash(uint8_t* Input, uint64_t InputOffset, uint64_t InputLength, uint32_t Seed = 0); diff --git a/r5dev/thirdparty/cppnet/cppkore/CastAsset.cpp b/r5dev/thirdparty/cppnet/cppkore/CastAsset.cpp index 9cefd774..3b5ac594 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CastAsset.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/CastAsset.cpp @@ -18,7 +18,7 @@ namespace Assets::Exporters static_assert(sizeof(CastHeader) == 0x10, "Cast header size mismatch"); - bool CastAsset::ExportAnimation(const Animation& Animation, const string& Path) + bool CastAsset::ExportAnimation(const Animation& Animation, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); @@ -194,7 +194,7 @@ namespace Assets::Exporters return true; } - bool CastAsset::ExportModel(const Model& Model, const string& Path) + bool CastAsset::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); @@ -271,7 +271,7 @@ namespace Assets::Exporters for (auto& Mesh : Model.Meshes) { - auto& MeshNode = ModelNode.Children.Emplace(CastId::Mesh, Hashing::XXHash::HashString(string::Format("mesh%02d", MeshIndex++))); + auto& MeshNode = ModelNode.Children.Emplace(CastId::Mesh, Hashing::XXHash::HashString(String::Format("mesh%02d", MeshIndex++))); MeshNode.Properties.EmplaceBack(CastPropertyId::Vector3, "vp"); MeshNode.Properties.EmplaceBack(CastPropertyId::Vector3, "vn"); @@ -302,7 +302,7 @@ namespace Assets::Exporters List UVLayers; for (uint8_t i = 0; i < Mesh.Vertices.UVLayerCount(); i++) - MeshNode.Properties.EmplaceBack(CastPropertyId::Vector2, string::Format("u%d", i)); + MeshNode.Properties.EmplaceBack(CastPropertyId::Vector2, String::Format("u%d", i)); auto& VertexPositions = MeshNode.Properties[0]; auto& VertexNormals = MeshNode.Properties[1]; diff --git a/r5dev/thirdparty/cppnet/cppkore/CastAsset.h b/r5dev/thirdparty/cppnet/cppkore/CastAsset.h index 28417145..4b959061 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CastAsset.h +++ b/r5dev/thirdparty/cppnet/cppkore/CastAsset.h @@ -12,9 +12,9 @@ namespace Assets::Exporters ~CastAsset() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/CastNode.cpp b/r5dev/thirdparty/cppnet/cppkore/CastNode.cpp index 6902298d..28b072e7 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CastNode.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/CastNode.cpp @@ -128,7 +128,7 @@ namespace Assets::Exporters this->IntegralValues.EmplaceBack(Value); } - void CastProperty::SetString(const string& Value) + void CastProperty::SetString(const String& Value) { this->StringValue = Value; } diff --git a/r5dev/thirdparty/cppnet/cppkore/CastNode.h b/r5dev/thirdparty/cppnet/cppkore/CastNode.h index 522741d1..123ee0c8 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CastNode.h +++ b/r5dev/thirdparty/cppnet/cppkore/CastNode.h @@ -116,14 +116,14 @@ namespace Assets::Exporters void AddVector3(Math::Vector3 Value); void AddVector4(Math::Quaternion Value); - void SetString(const string& Value); + void SetString(const String& Value); CastPropertyId Identifier; - string Name; + String Name; private: List IntegralValues; - string StringValue; + String StringValue; }; class CastNode diff --git a/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.cpp b/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.cpp index becc1f76..acc58b02 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.cpp @@ -8,12 +8,12 @@ namespace Assets::Exporters { - bool CoDXAssetExport::ExportAnimation(const Animation& Animation, const string& Path) + bool CoDXAssetExport::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool CoDXAssetExport::ExportModel(const Model& Model, const string& Path) + bool CoDXAssetExport::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::StreamWriter(IO::File::Create(Path)); diff --git a/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.h b/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.h index 749ae029..76a5a195 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.h +++ b/r5dev/thirdparty/cppnet/cppkore/CoDXAssetExport.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~CoDXAssetExport() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.cpp b/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.cpp index ed9c847f..cd8f5ec4 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.cpp @@ -9,17 +9,17 @@ namespace Forms { } - ColumnHeader::ColumnHeader(const string& Text) + ColumnHeader::ColumnHeader(const String& Text) : ColumnHeader(Text, 60) { } - ColumnHeader::ColumnHeader(const string& Text, int32_t Width) + ColumnHeader::ColumnHeader(const String& Text, int32_t Width) : ColumnHeader(Text, Width, HorizontalAlignment::Left) { } - ColumnHeader::ColumnHeader(const string& Text, int32_t Width, HorizontalAlignment Alignment) + ColumnHeader::ColumnHeader(const String& Text, int32_t Width, HorizontalAlignment Alignment) : _Text(Text), _Width(Width), _TextAlign(Alignment), _OwnerListView(nullptr), _IndexInternal(-1) { } @@ -78,12 +78,12 @@ namespace Forms this->_IndexInternal = Value; } - const string& ColumnHeader::Text() const + const String& ColumnHeader::Text() const { return this->_Text; } - void ColumnHeader::SetText(const string& Value) + void ColumnHeader::SetText(const String& Value) { _Text = Value; diff --git a/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.h b/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.h index 6443061f..71b9eb78 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.h +++ b/r5dev/thirdparty/cppnet/cppkore/ColumnHeader.h @@ -14,9 +14,9 @@ namespace Forms { public: ColumnHeader(); - ColumnHeader(const string& Text); - ColumnHeader(const string& Text, int32_t Width); - ColumnHeader(const string& Text, int32_t Width, HorizontalAlignment Alignment); + ColumnHeader(const String& Text); + ColumnHeader(const String& Text, int32_t Width); + ColumnHeader(const String& Text, int32_t Width, HorizontalAlignment Alignment); ~ColumnHeader() = default; // The index of this column. @@ -31,9 +31,9 @@ namespace Forms void SetDisplayIndexInternal(int32_t Value); // The text displayed in the column header. - const string& Text() const; + const String& Text() const; // The text displayed in the column header. - void SetText(const string& Value); + void SetText(const String& Value); // The width of the column in pixels. int32_t Width() const; @@ -62,7 +62,7 @@ namespace Forms int32_t _IndexInternal; // Text to display - string _Text; + String _Text; HorizontalAlignment _TextAlign; // Set the display indices of the ListView columns. diff --git a/r5dev/thirdparty/cppnet/cppkore/ComboBox.cpp b/r5dev/thirdparty/cppnet/cppkore/ComboBox.cpp index d0ebaf1d..a9b1dcfe 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ComboBox.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ComboBox.cpp @@ -170,15 +170,15 @@ namespace Forms OnSelectedItemChanged(); } - string ComboBox::SelectedText() + String ComboBox::SelectedText() { if (_DropDownStyle == ComboBoxStyle::DropDownList) return ""; - return Text().Substring(SelectionStart(), SelectionLength()); + return Text().SubString(SelectionStart(), SelectionLength()); } - void ComboBox::SetSelectedText(const string& Value) + void ComboBox::SetSelectedText(const String& Value) { if (_DropDownStyle != ComboBoxStyle::DropDownList) { @@ -377,14 +377,14 @@ namespace Forms void ComboBox::NativeClear() { - string Saved; + String Saved; if (_DropDownStyle != ComboBoxStyle::DropDownList) Saved = this->WindowText(); SendMessageA(this->_Handle, CB_RESETCONTENT, NULL, NULL); - if (!string::IsNullOrEmpty(Saved)) + if (!String::IsNullOrEmpty(Saved)) this->SetWindowText(Saved); } @@ -454,10 +454,10 @@ namespace Forms int32_t ComboBox::ComboBoxItemCollection::IndexOf(const imstring& Value) { - auto Str = string(Value); + auto Str = String(Value); auto Res = _Items.IndexOf(Str); - if (Res == List::InvalidPosition) + if (Res == List::InvalidPosition) return -1; return Res; @@ -484,12 +484,12 @@ namespace Forms return _Items.Count(); } - string* ComboBox::ComboBoxItemCollection::begin() const + String* ComboBox::ComboBoxItemCollection::begin() const { return _Items.begin(); } - string* ComboBox::ComboBoxItemCollection::end() const + String* ComboBox::ComboBoxItemCollection::end() const { return _Items.end(); } diff --git a/r5dev/thirdparty/cppnet/cppkore/ComboBox.h b/r5dev/thirdparty/cppnet/cppkore/ComboBox.h index c2e4daa8..d5632b50 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ComboBox.h +++ b/r5dev/thirdparty/cppnet/cppkore/ComboBox.h @@ -75,9 +75,9 @@ namespace Forms void SetSelectedIndex(int32_t Value); // Gets the selected text in the edit component of the ComboBox. - string SelectedText(); + String SelectedText(); // Sets the selected text in the edit component of the ComboBox. - void SetSelectedText(const string& Value); + void SetSelectedText(const String& Value); // Gets length, in characters, of the selection in the editbox. int32_t SelectionLength(); @@ -121,13 +121,13 @@ namespace Forms uint32_t Count(); // Iterater classes - string* begin() const; - string* end() const; + String* begin() const; + String* end() const; protected: // Internal references ComboBox* _Owner; - List _Items; + List _Items; } Items; // We must define control event bases here diff --git a/r5dev/thirdparty/cppnet/cppkore/Console.cpp b/r5dev/thirdparty/cppnet/cppkore/Console.cpp index e2baaed5..85697d48 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Console.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Console.cpp @@ -212,7 +212,7 @@ namespace System SetCurrentConsoleFontEx(hStdOut, false, &cFont); } - void Console::SetTitle(const string& Value) + void Console::SetTitle(const String& Value) { SetConsoleTitleA((const char*)Value); } @@ -384,12 +384,12 @@ namespace System SetConsoleScreenBufferInfoEx(hStdOut, &cBuffer); } - string Console::GetTitle() + String Console::GetTitle() { char Buffer[2048]{}; GetConsoleTitleA(Buffer, 2048); // Honestly it would be too big at 256... - return string(Buffer); + return String(Buffer); } bool Console::GetCursorVisible() @@ -451,7 +451,7 @@ namespace System ConsoleInstance.Out.Write("\r"); Console::Header(Heading, Color); - string Buffer(Width + 2, '\0', false); + String Buffer(Width + 2, '\0', false); Buffer.Append("["); uint32_t Blocks = min((uint32_t)((Progress / 100.f) * Width), Width); @@ -521,7 +521,7 @@ namespace System return ConsoleKeyInfo((char)iRecord.Event.KeyEvent.uChar.AsciiChar, (ConsoleKey)iRecord.Event.KeyEvent.wVirtualKeyCode, Shift, Alt, Control); } - string Console::ReadLine() + String Console::ReadLine() { return ConsoleInstance.In.ReadLine(); } diff --git a/r5dev/thirdparty/cppnet/cppkore/Console.h b/r5dev/thirdparty/cppnet/cppkore/Console.h index d1d35dda..5f1b3408 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Console.h +++ b/r5dev/thirdparty/cppnet/cppkore/Console.h @@ -42,7 +42,7 @@ namespace System // Changes the font of the console window static void SetFontSize(uint32_t Width, uint32_t Height, uint32_t Weight); // Sets the window title - static void SetTitle(const string& Value); + static void SetTitle(const String& Value); // Sets the window title static void SetTitle(const char* Value); // Sets whether or not the cursor is visible @@ -67,7 +67,7 @@ namespace System static void RemapAllConsoleColors(std::initializer_list Colors); // Gets the window title - static string GetTitle(); + static String GetTitle(); // Gets whether or not the cursor is visible static bool GetCursorVisible(); // Gets the current foreground color @@ -92,7 +92,7 @@ namespace System // Reads a key static ConsoleKeyInfo ReadKey(bool Intercept = false); // Reads a line from the console - static string ReadLine(); + static String ReadLine(); private: diff --git a/r5dev/thirdparty/cppnet/cppkore/Control.cpp b/r5dev/thirdparty/cppnet/cppkore/Control.cpp index 39df9c59..e52fa063 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Control.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Control.cpp @@ -625,12 +625,12 @@ namespace Forms return Drawing::Rectangle(Rc.left, Rc.top, (Rc.right - Rc.left), (Rc.bottom - Rc.top)); } - string Control::Text() + String Control::Text() { return this->WindowText(); } - void Control::SetText(const string& Value) + void Control::SetText(const String& Value) { this->SetWindowText(Value); OnTextChanged(); @@ -1627,20 +1627,20 @@ namespace Forms this->_RequiredScalingEnabled = Value; } - string Control::WindowText() + String Control::WindowText() { if (!GetState(ControlStates::StateCreated)) return _Text; auto Length = GetWindowTextLengthA(this->_Handle); - auto Result = string(Length); + auto Result = String(Length); GetWindowTextA(this->_Handle, (char*)Result, Length + 1); return Result; } - void Control::SetWindowText(const string& Value) + void Control::SetWindowText(const String& Value) { if (GetState(ControlStates::StateCreated)) SetWindowTextA(this->_Handle, (char*)Value); @@ -2670,7 +2670,7 @@ namespace Forms return ((Ctrl->GetStyle(ControlStyles::ContainerControl) && Ctrl->IsContainerControl())); } - string Control::RegisterWndClass(const char* ClassName, DWORD ClassStyle, bool& Subclass) + String Control::RegisterWndClass(const char* ClassName, DWORD ClassStyle, bool& Subclass) { // Check for a built-in class name... WNDCLASSEXA ExInfo{}; @@ -2712,7 +2712,7 @@ namespace Forms return ClassName; // We need to make a modified class, using the ClassName + Style - auto nClassName = string(ClassName) + string::Format(".%x", ClassStyle); + auto nClassName = String(ClassName) + String::Format(".%x", ClassStyle); ExInfo.style = ClassStyle; ExInfo.lpszClassName = (const char*)nClassName; @@ -2738,7 +2738,7 @@ namespace Forms RegisterClassExA(&ExInfo); - return string(ClassName); + return String(ClassName); } } } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/Control.h b/r5dev/thirdparty/cppnet/cppkore/Control.h index f3ff9b83..15a19e50 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Control.h +++ b/r5dev/thirdparty/cppnet/cppkore/Control.h @@ -173,9 +173,9 @@ namespace Forms Drawing::Rectangle RectangleToClient(const Drawing::Rectangle& Rect); // Gets the current text associated with this control. - virtual string Text(); + virtual String Text(); // Sets the current text associated with this control. - virtual void SetText(const string& Value); + virtual void SetText(const String& Value); // Brings this control to the front of the z-order. void BringToFront(); @@ -365,7 +365,7 @@ namespace Forms uint32_t _MinimumHeight; // Internal text caching - string _Text; + String _Text; // Contains the anchor information... struct AnchorDeltasCache @@ -439,9 +439,9 @@ namespace Forms uintptr_t BackColorBrush(); // Gets the current text of the Window - virtual string WindowText(); + virtual String WindowText(); // Sets the current text of the Window - virtual void SetWindowText(const string& Value); + virtual void SetWindowText(const String& Value); // Updates the control styles... void UpdateStyles(); @@ -569,6 +569,6 @@ namespace Forms static bool IsFocusManagingContainerControl(Control* Ctrl); // Internal routine to make sure a class is registered - static string RegisterWndClass(const char* ClassName, DWORD ClassStyle, bool& Subclass); + static String RegisterWndClass(const char* ClassName, DWORD ClassStyle, bool& Subclass); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/CreateParams.h b/r5dev/thirdparty/cppnet/cppkore/CreateParams.h index 878e90ad..191700fa 100644 --- a/r5dev/thirdparty/cppnet/cppkore/CreateParams.h +++ b/r5dev/thirdparty/cppnet/cppkore/CreateParams.h @@ -8,8 +8,8 @@ namespace Forms // A structure that contains the CreateWindow parameters for this control. struct CreateParams { - string ClassName; - string Caption; + String ClassName; + String Caption; uint32_t Style; uint32_t ExStyle; diff --git a/r5dev/thirdparty/cppnet/cppkore/Curve.cpp b/r5dev/thirdparty/cppnet/cppkore/Curve.cpp index 810c3f2c..e5a4897c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Curve.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Curve.cpp @@ -8,12 +8,12 @@ namespace Assets { } - Curve::Curve(const string& Name, CurveProperty Property) + Curve::Curve(const String& Name, CurveProperty Property) : Curve(Name, Property, AnimationCurveMode::Absolute) { } - Curve::Curve(const string& Name, CurveProperty Property, AnimationCurveMode Mode) + Curve::Curve(const String& Name, CurveProperty Property, AnimationCurveMode Mode) : Name(Name), Property(Property), Mode(Mode), _IsFrameIntegral(true) { } diff --git a/r5dev/thirdparty/cppnet/cppkore/Curve.h b/r5dev/thirdparty/cppnet/cppkore/Curve.h index 085d36ec..2a560834 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Curve.h +++ b/r5dev/thirdparty/cppnet/cppkore/Curve.h @@ -66,11 +66,11 @@ namespace Assets { public: Curve(); - Curve(const string& Name, CurveProperty Property); - Curve(const string& Name, CurveProperty Property, AnimationCurveMode Mode); + Curve(const String& Name, CurveProperty Property); + Curve(const String& Name, CurveProperty Property, AnimationCurveMode Mode); // The node name of this curve. - string Name; + String Name; // The property of the node for the curve. CurveProperty Property; diff --git a/r5dev/thirdparty/cppnet/cppkore/Directory.cpp b/r5dev/thirdparty/cppnet/cppkore/Directory.cpp index da81a85f..0c89569c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Directory.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Directory.cpp @@ -3,7 +3,7 @@ namespace IO { - void Directory::CreateDirectory(const string& Path) + void Directory::CreateDirectory(const String& Path) { if (Path.Length() == 0) return; @@ -18,14 +18,14 @@ namespace IO fLength--; // A list of directories to make - auto DirectoryStack = List(); + auto DirectoryStack = List(); if (fLength > rLength) { int32_t i = fLength - 1; while (i >= rLength) { - DirectoryStack.EmplaceBack(std::move(Path.Substring(0, i + 1))); + DirectoryStack.EmplaceBack(std::move(Path.SubString(0, i + 1))); while (i > rLength && Path[i] != Path::DirectorySeparatorChar && Path[1] != Path::AltDirectorySeparatorChar) i--; @@ -39,7 +39,7 @@ namespace IO CreateDirectoryA((const char*)DirectoryStack[i], NULL); } - bool Directory::Exists(const string& Path) + bool Directory::Exists(const String& Path) { if (Path.Length() == 0) return false; @@ -54,14 +54,14 @@ namespace IO return false; } - List Directory::GetFiles(const string& Path) + List Directory::GetFiles(const String& Path) { return Directory::GetFiles(Path, "*"); } - List Directory::GetFiles(const string& Path, const string& SearchPattern) + List Directory::GetFiles(const String& Path, const String& SearchPattern) { - auto Result = List(); + auto Result = List(); auto sQuery = (Path[Path.Length() - 1] == Path::DirectorySeparatorChar || Path[Path.Length() - 1] == Path::AltDirectorySeparatorChar) ? Path + SearchPattern : Path + Path::DirectorySeparatorChar + SearchPattern; @@ -93,9 +93,9 @@ namespace IO return Result; } - List Directory::GetDirectories(const string& Path) + List Directory::GetDirectories(const String& Path) { - auto Result = List(); + auto Result = List(); auto sQuery = (Path[Path.Length() - 1] == Path::DirectorySeparatorChar || Path[Path.Length() - 1] == Path::AltDirectorySeparatorChar) ? Path + "*" : Path + Path::DirectorySeparatorChar + "*"; @@ -127,9 +127,9 @@ namespace IO return Result; } - List Directory::GetLogicalDrives() + List Directory::GetLogicalDrives() { - auto Result = List(); + auto Result = List(); auto dCount = ::GetLogicalDrives(); if (dCount == 0) @@ -141,7 +141,7 @@ namespace IO while (d != 0) { if ((d & 1) != 0) - Result.EmplaceBack(std::move(string(Root, 3))); + Result.EmplaceBack(std::move(String(Root, 3))); d >>= 1; Root[0]++; @@ -150,7 +150,7 @@ namespace IO return Result; } - string Directory::GetCurrentDirectory() + String Directory::GetCurrentDirectory() { char Buffer[MAX_PATH + 1]{}; if (!GetCurrentDirectoryA(MAX_PATH, (char*)Buffer)) @@ -170,7 +170,7 @@ namespace IO return Buffer; } - void Directory::SetCurrentDirectory(const string& Path) + void Directory::SetCurrentDirectory(const String& Path) { auto Result = SetCurrentDirectoryA((const char*)Path); if (!Result) @@ -192,7 +192,7 @@ namespace IO } } - void Directory::Move(const string& SourcePath, const string& DestinationPath) + void Directory::Move(const String& SourcePath, const String& DestinationPath) { // Ensure that the roots are the same if (Path::GetPathRoot(SourcePath).ToLower() != Path::GetPathRoot(DestinationPath).ToLower()) @@ -218,7 +218,7 @@ namespace IO } } - void Directory::Copy(const string& SourcePath, const string& DestinationPath, bool OverWrite) + void Directory::Copy(const String& SourcePath, const String& DestinationPath, bool OverWrite) { auto Result = CopyFileA((const char*)SourcePath, (const char*)DestinationPath, !OverWrite); if (!Result) @@ -243,7 +243,7 @@ namespace IO } } - bool Directory::Delete(const string& Path, bool Recursive) + bool Directory::Delete(const String& Path, bool Recursive) { if (Path.Length() == 0) return false; @@ -278,7 +278,7 @@ namespace IO } else if (bReparse && fInfo.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) { - if (!DeleteVolumeMountPointA((const char*)Path::Combine(Path, string(fInfo.cFileName) + Path::DirectorySeparatorChar))) + if (!DeleteVolumeMountPointA((const char*)Path::Combine(Path, String(fInfo.cFileName) + Path::DirectorySeparatorChar))) return false; } } diff --git a/r5dev/thirdparty/cppnet/cppkore/Directory.h b/r5dev/thirdparty/cppnet/cppkore/Directory.h index 570e73e9..9a272267 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Directory.h +++ b/r5dev/thirdparty/cppnet/cppkore/Directory.h @@ -19,27 +19,27 @@ namespace IO { public: // Checks whether or not the specified path exists - static bool Exists(const string& Path); + static bool Exists(const String& Path); // Creates a new directory at the given path - static void CreateDirectory(const string& Path); + static void CreateDirectory(const String& Path); // Returns the current directory set - static string GetCurrentDirectory(); + static String GetCurrentDirectory(); // Sets the current directory - static void SetCurrentDirectory(const string& Path); + static void SetCurrentDirectory(const String& Path); // Moves the source path to the destination path - static void Move(const string& SourcePath, const string& DestinationPath); + static void Move(const String& SourcePath, const String& DestinationPath); // Copies the source path to the destination path - static void Copy(const string& SourcePath, const string& DestinationPath, bool OverWrite = false); + static void Copy(const String& SourcePath, const String& DestinationPath, bool OverWrite = false); // Deletes a directory, optionally recursive if it's not empty - static bool Delete(const string& Path, bool Recursive = true); + static bool Delete(const String& Path, bool Recursive = true); // Returns an array of files in the current path - static List GetFiles(const string& Path); + static List GetFiles(const String& Path); // Returns an array of files in the current path matching the search pattern - static List GetFiles(const string& Path, const string& SearchPattern); + static List GetFiles(const String& Path, const String& SearchPattern); // Returns an array of folders in the current path - static List GetDirectories(const string& Path); + static List GetDirectories(const String& Path); // Returns an array of logical drives - static List GetLogicalDrives(); + static List GetLogicalDrives(); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.cpp b/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.cpp index f951ba79..149de97c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.cpp @@ -3,7 +3,7 @@ namespace Forms { - DrawListViewItemEventArgs::DrawListViewItemEventArgs(HDC Dc, const string& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, ListViewItemStates State) + DrawListViewItemEventArgs::DrawListViewItemEventArgs(HDC Dc, const String& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, ListViewItemStates State) : Text(Text), Style(Style), Bounds(Bounds), ItemIndex(ItemIndex), DrawDefault(false), Graphics(std::make_unique(Dc)), State(State) { } diff --git a/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.h b/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.h index ff908a34..5de365bc 100644 --- a/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.h +++ b/r5dev/thirdparty/cppnet/cppkore/DrawListViewItemEventArgs.h @@ -13,11 +13,11 @@ namespace Forms class DrawListViewItemEventArgs { public: - DrawListViewItemEventArgs(HDC Dc, const string& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, ListViewItemStates State); + DrawListViewItemEventArgs(HDC Dc, const String& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, ListViewItemStates State); ~DrawListViewItemEventArgs() = default; // Gets the text of the item to draw. - const string Text; + const String Text; // Gets the style of the item to draw. const ListViewItemStyle Style; // Gets the state of the item to draw. diff --git a/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.cpp b/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.cpp index cee5dbc0..3fe040d5 100644 --- a/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.cpp @@ -3,7 +3,7 @@ namespace Forms { - DrawListViewSubItemEventArgs::DrawListViewSubItemEventArgs(HDC Dc, const string& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, int32_t SubItemIndex, ListViewItemStates State) + DrawListViewSubItemEventArgs::DrawListViewSubItemEventArgs(HDC Dc, const String& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, int32_t SubItemIndex, ListViewItemStates State) : Text(Text), Style(Style), Bounds(Bounds), ItemIndex(ItemIndex), SubItemIndex(SubItemIndex), DrawDefault(false), Graphics(std::make_unique(Dc)), State(State) { } diff --git a/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.h b/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.h index 3601810c..e79adb69 100644 --- a/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.h +++ b/r5dev/thirdparty/cppnet/cppkore/DrawListViewSubItemEventArgs.h @@ -13,11 +13,11 @@ namespace Forms class DrawListViewSubItemEventArgs { public: - DrawListViewSubItemEventArgs(HDC Dc, const string& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, int32_t SubItemIndex, ListViewItemStates State); + DrawListViewSubItemEventArgs(HDC Dc, const String& Text, const ListViewItemStyle Style, Drawing::Rectangle Bounds, int32_t ItemIndex, int32_t SubItemIndex, ListViewItemStates State); ~DrawListViewSubItemEventArgs() = default; // Gets the text of the item to draw. - const string Text; + const String Text; // Gets the style of the item to draw. const ListViewItemStyle Style; // Gets the state of the item to draw. diff --git a/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.cpp b/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.cpp index 1ce7cc41..f1402919 100644 --- a/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.cpp @@ -3,7 +3,7 @@ namespace Forms { - DrawToolTipEventArgs::DrawToolTipEventArgs(HDC Dc, Control* Window, Control* Ctrl, Drawing::Rectangle Bounds, const string& Text, Drawing::Color BackColor, Drawing::Color ForeColor, Drawing::Font* Font) + DrawToolTipEventArgs::DrawToolTipEventArgs(HDC Dc, Control* Window, Control* Ctrl, Drawing::Rectangle Bounds, const String& Text, Drawing::Color BackColor, Drawing::Color ForeColor, Drawing::Font* Font) : _Dc(Dc), AssociatedWindow(Window), AssociatedControl(Ctrl), Bounds(Bounds), ToolTipText(Text), BackColor(BackColor), ForeColor(ForeColor), Font(Font) { this->Graphics = std::make_unique(Dc); diff --git a/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.h b/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.h index b89b0d59..0e78271a 100644 --- a/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.h +++ b/r5dev/thirdparty/cppnet/cppkore/DrawToolTipEventArgs.h @@ -13,7 +13,7 @@ namespace Forms { public: DrawToolTipEventArgs() = default; - DrawToolTipEventArgs(HDC Dc, Control* Window, Control* Ctrl, Drawing::Rectangle Bounds, const string& Text, Drawing::Color BackColor, Drawing::Color ForeColor, Drawing::Font* Font); + DrawToolTipEventArgs(HDC Dc, Control* Window, Control* Ctrl, Drawing::Rectangle Bounds, const String& Text, Drawing::Color BackColor, Drawing::Color ForeColor, Drawing::Font* Font); ~DrawToolTipEventArgs() = default; // The graphics object used to paint during this event @@ -21,7 +21,7 @@ namespace Forms // The bounds used for painting during this event Drawing::Rectangle Bounds; // The text that should be drawn - string ToolTipText; + String ToolTipText; // The font used to draw tooltip text Drawing::Font* Font; diff --git a/r5dev/thirdparty/cppnet/cppkore/Environment.cpp b/r5dev/thirdparty/cppnet/cppkore/Environment.cpp index 3d50a432..e6b0eae2 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Environment.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Environment.cpp @@ -5,14 +5,14 @@ namespace System { - const string Environment::NewLine = "\r\n"; + const String Environment::NewLine = "\r\n"; void Environment::Exit(int32_t ExitCode) { std::exit(ExitCode); } - string Environment::GetFolderPath(SpecialFolder Folder) + String Environment::GetFolderPath(SpecialFolder Folder) { char Buffer[MAX_PATH + 1]{}; auto Result = SHGetFolderPathA(NULL, (int)Folder, NULL, SHGFP_TYPE_CURRENT, Buffer); @@ -20,10 +20,10 @@ namespace System if (Result < 0) return ""; - return string(Buffer); + return String(Buffer); } - string Environment::GetApplicationPath() + String Environment::GetApplicationPath() { char Buffer[MAX_PATH + 1]{}; auto mResult = GetModuleFileNameA(NULL, Buffer, MAX_PATH); @@ -34,7 +34,7 @@ namespace System return ""; } - string Environment::GetApplication() + String Environment::GetApplication() { char Buffer[MAX_PATH + 1]{}; auto mResult = GetModuleFileNameA(NULL, Buffer, MAX_PATH); @@ -45,14 +45,14 @@ namespace System return ""; } - string Environment::GetCommandLine() + String Environment::GetCommandLine() { - return string(GetCommandLineA()); + return String(GetCommandLineA()); } - List Environment::GetCommandLineArgs() + List Environment::GetCommandLineArgs() { - auto Result = List(); + auto Result = List(); int nArgs = 0; auto szArgList = CommandLineToArgvW(GetCommandLineW(), &nArgs); @@ -60,28 +60,28 @@ namespace System return Result; for (int i = 0; i < nArgs; i++) - Result.EmplaceBack(std::move(wstring(szArgList[i]).ToString())); + Result.EmplaceBack(std::move(WString(szArgList[i]).ToString())); LocalFree(szArgList); return Result; } - string Environment::GetUserName() + String Environment::GetUserName() { char Buffer[1024]{}; DWORD BufferSize = 1024; GetUserNameA(Buffer, &BufferSize); - return string(Buffer); + return String(Buffer); } - string Environment::GetComputerName() + String Environment::GetComputerName() { char Buffer[MAX_COMPUTERNAME_LENGTH + 1]{}; DWORD BufferSize = MAX_COMPUTERNAME_LENGTH; GetComputerNameA(Buffer, &BufferSize); - return string(Buffer); + return String(Buffer); } uint64_t Environment::GetTickCount() @@ -89,7 +89,7 @@ namespace System return GetTickCount64(); } - void Environment::SetEnvironmentVariable(const string& Key, const string& Value) + void Environment::SetEnvironmentVariable(const String& Key, const String& Value) { if (Key.Length() == 0 || Value.Length() == 0) return; @@ -97,22 +97,22 @@ namespace System SetEnvironmentVariableA((const char*)Key, (const char*)Value); } - string Environment::GetEnvironmentVariable(const string& Key) + String Environment::GetEnvironmentVariable(const String& Key) { char Buffer[1024]{}; GetEnvironmentVariableA((const char*)Key, Buffer, 1024); - return string(Buffer); + return String(Buffer); } - string Environment::ExpandEnvironmentVariables(const string& Path) + String Environment::ExpandEnvironmentVariables(const String& Path) { char Buffer[4096]{}; ExpandEnvironmentStringsA((const char*)Path, Buffer, 4096); // In theory, this should be ok, since, most paths will be used for actual file paths, < 260 chars anyways... - return string(Buffer); + return String(Buffer); } constexpr bool Environment::Is64BitProcess() diff --git a/r5dev/thirdparty/cppnet/cppkore/Environment.h b/r5dev/thirdparty/cppnet/cppkore/Environment.h index 8ea5a4dd..f557eb6e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Environment.h +++ b/r5dev/thirdparty/cppnet/cppkore/Environment.h @@ -20,33 +20,33 @@ namespace System static void Exit(int32_t ExitCode); // Gets the path to the specific system file folder - static string GetFolderPath(SpecialFolder Folder); + static String GetFolderPath(SpecialFolder Folder); // Returns the application path - static string GetApplicationPath(); + static String GetApplicationPath(); // Returns the application - static string GetApplication(); + static String GetApplication(); // Rethrns the full command line string - static string GetCommandLine(); + static String GetCommandLine(); // Returns a list of command line arguments - static List GetCommandLineArgs(); + static List GetCommandLineArgs(); // Returns the current users account name - static string GetUserName(); + static String GetUserName(); // Returns the current computer name - static string GetComputerName(); + static String GetComputerName(); // Returns the total tick count since startup static uint64_t GetTickCount(); // Sets an environment variable to the specified value - static void SetEnvironmentVariable(const string& Key, const string& Value); + static void SetEnvironmentVariable(const String& Key, const String& Value); // Gets an environment variable from the specified key - static string GetEnvironmentVariable(const string& Key); + static String GetEnvironmentVariable(const String& Key); // Expands environment variables in the given path - static string ExpandEnvironmentVariables(const string& Path); + static String ExpandEnvironmentVariables(const String& Path); // Returns whether or not we are a 64bit process constexpr static bool Is64BitProcess(); // Returns a newline string for the environment - const static string NewLine; + const static String NewLine; }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/Exporter.h b/r5dev/thirdparty/cppnet/cppkore/Exporter.h index a4adb456..c71d37fd 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Exporter.h +++ b/r5dev/thirdparty/cppnet/cppkore/Exporter.h @@ -23,9 +23,9 @@ namespace Assets::Exporters { public: // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path) = 0; + virtual bool ExportAnimation(const Animation& Animation, const String& Path) = 0; // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path) = 0; + virtual bool ExportModel(const Model& Model, const String& Path) = 0; // Gets the file extension for this exporters model format. virtual imstring ModelExtension() = 0; diff --git a/r5dev/thirdparty/cppnet/cppkore/File.cpp b/r5dev/thirdparty/cppnet/cppkore/File.cpp index 52264c34..549a761e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/File.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/File.cpp @@ -3,7 +3,7 @@ namespace IO { - void File::Copy(const string& SourceFileName, const string& DestinationFileName, bool OverWrite) + void File::Copy(const String& SourceFileName, const String& DestinationFileName, bool OverWrite) { auto Result = CopyFileA((const char*)SourceFileName, (const char*)DestinationFileName, !OverWrite); if (!Result) @@ -21,7 +21,7 @@ namespace IO } } - void File::Delete(const string& FilePath) + void File::Delete(const String& FilePath) { auto Result = DeleteFileA((const char*)FilePath); if (!Result) @@ -39,7 +39,7 @@ namespace IO } } - void File::Decrypt(const string& FilePath) + void File::Decrypt(const String& FilePath) { auto Result = DecryptFileA((const char*)FilePath, 0); if (!Result) @@ -57,7 +57,7 @@ namespace IO } } - void File::Encrypt(const string& FilePath) + void File::Encrypt(const String& FilePath) { auto Result = EncryptFileA((const char*)FilePath); if (!Result) @@ -75,7 +75,7 @@ namespace IO } } - bool File::Exists(const string& FilePath) + bool File::Exists(const String& FilePath) { if (FilePath.Length() == 0) return false; @@ -90,7 +90,7 @@ namespace IO return false; } - void File::Move(const string& SourceFileName, const string& DestinationFileName, bool OverWrite) + void File::Move(const String& SourceFileName, const String& DestinationFileName, bool OverWrite) { if (File::Exists(DestinationFileName)) { @@ -116,47 +116,47 @@ namespace IO } } - std::unique_ptr File::Create(const string& FilePath) + std::unique_ptr File::Create(const String& FilePath) { return std::make_unique(FilePath, FileMode::Create, FileAccess::ReadWrite, FileShare::None); } - std::unique_ptr File::Open(const string& FilePath, FileMode Mode) + std::unique_ptr File::Open(const String& FilePath, FileMode Mode) { return File::Open(FilePath, Mode, (Mode == FileMode::Append ? FileAccess::Write : FileAccess::ReadWrite), FileShare::None); } - std::unique_ptr File::Open(const string& FilePath, FileMode Mode, FileAccess Access) + std::unique_ptr File::Open(const String& FilePath, FileMode Mode, FileAccess Access) { return File::Open(FilePath, Mode, Access, FileShare::None); } - std::unique_ptr File::Open(const string& FilePath, FileMode Mode, FileAccess Access, FileShare Share) + std::unique_ptr File::Open(const String& FilePath, FileMode Mode, FileAccess Access, FileShare Share) { return std::make_unique(FilePath, Mode, Access, Share); } - std::unique_ptr File::OpenRead(const string& FilePath) + std::unique_ptr File::OpenRead(const String& FilePath) { return std::make_unique(FilePath, FileMode::Open, FileAccess::Read, FileShare::Read); } - std::unique_ptr File::OpenWrite(const string& FilePath) + std::unique_ptr File::OpenWrite(const String& FilePath) { return std::make_unique(FilePath, FileMode::OpenOrCreate, FileAccess::Write, FileShare::None); } - std::unique_ptr File::OpenAppend(const string & FilePath) + std::unique_ptr File::OpenAppend(const String & FilePath) { return std::make_unique(FilePath, FileMode::Append, FileAccess::Write, FileShare::None); } - string File::ReadAllText(const string& FilePath) + String File::ReadAllText(const String& FilePath) { return StreamReader(File::OpenRead(FilePath)).ReadToEnd(); } - List File::ReadAllBytes(const string& FilePath) + List File::ReadAllBytes(const String& FilePath) { auto FileReader = BinaryReader(File::OpenRead(FilePath)); auto FileLength = FileReader.GetBaseStream()->GetLength(); @@ -168,9 +168,9 @@ namespace IO return Result; } - List File::ReadAllLines(const string& FilePath) + List File::ReadAllLines(const String& FilePath) { - auto Result = List(); + auto Result = List(); auto FileReader = StreamReader(File::OpenRead(FilePath)); auto BaseStream = FileReader.GetBaseStream(); @@ -180,22 +180,22 @@ namespace IO return Result; } - void File::WriteAllText(const string& FilePath, const string& Text) + void File::WriteAllText(const String& FilePath, const String& Text) { StreamWriter(File::Create(FilePath)).Write(Text); } - void File::WriteAllBytes(const string& FilePath, const List& Bytes) + void File::WriteAllBytes(const String& FilePath, const List& Bytes) { BinaryWriter(File::Create(FilePath)).Write((uint8_t*)Bytes, 0, Bytes.Count()); } - void File::WriteAllBytes(const string& FilePath, const uint8_t* Bytes, uint64_t Count) + void File::WriteAllBytes(const String& FilePath, const uint8_t* Bytes, uint64_t Count) { BinaryWriter(File::Create(FilePath)).Write((uint8_t*)Bytes, 0, Count); } - void File::WriteAllLines(const string& FilePath, const List& Lines) + void File::WriteAllLines(const String& FilePath, const List& Lines) { auto Writer = StreamWriter(File::Create(FilePath)); diff --git a/r5dev/thirdparty/cppnet/cppkore/File.h b/r5dev/thirdparty/cppnet/cppkore/File.h index 16b65d4c..7e7ba9e4 100644 --- a/r5dev/thirdparty/cppnet/cppkore/File.h +++ b/r5dev/thirdparty/cppnet/cppkore/File.h @@ -20,47 +20,47 @@ namespace IO { public: // Copies an existing file to a new file, overwriting if specified - static void Copy(const string& SourceFileName, const string& DestinationFileName, bool OverWrite = false); + static void Copy(const String& SourceFileName, const String& DestinationFileName, bool OverWrite = false); // Deletes a file permanently - static void Delete(const string& FilePath); + static void Delete(const String& FilePath); // Decrypts a file from a NTFS volume - static void Decrypt(const string& FilePath); + static void Decrypt(const String& FilePath); // Encrypts a file from a NTFS volume - static void Encrypt(const string& FilePath); + static void Encrypt(const String& FilePath); // Whether or not the file exists - static bool Exists(const string& FilePath); + static bool Exists(const String& FilePath); // Moves an existing file to a new location, overwriting if specified - static void Move(const string& SourceFileName, const string& DestinationFileName, bool OverWrite = false); + static void Move(const String& SourceFileName, const String& DestinationFileName, bool OverWrite = false); // Creates a file in a particular path with ReadWrite access - static std::unique_ptr Create(const string& FilePath); + static std::unique_ptr Create(const String& FilePath); // Opens a file in a particular path with the given mode - static std::unique_ptr Open(const string& FilePath, FileMode Mode); + static std::unique_ptr Open(const String& FilePath, FileMode Mode); // Opens a file in a particular path with the given mode - static std::unique_ptr Open(const string& FilePath, FileMode Mode, FileAccess Access); + static std::unique_ptr Open(const String& FilePath, FileMode Mode, FileAccess Access); // Opens a file in a particular path with the given mode - static std::unique_ptr Open(const string& FilePath, FileMode Mode, FileAccess Access, FileShare Share); + static std::unique_ptr Open(const String& FilePath, FileMode Mode, FileAccess Access, FileShare Share); // Opens a file in a particular path for reading - static std::unique_ptr OpenRead(const string& FilePath); + static std::unique_ptr OpenRead(const String& FilePath); // Opens a file in a particular path for writing - static std::unique_ptr OpenWrite(const string& FilePath); + static std::unique_ptr OpenWrite(const String& FilePath); // Opens or creates a file in a particular path for appending - static std::unique_ptr OpenAppend(const string& FilePath); + static std::unique_ptr OpenAppend(const String& FilePath); // Reads the entire specified file as a text - static string ReadAllText(const string& FilePath); + static String ReadAllText(const String& FilePath); // Reads the entire specified file as bytes - static List ReadAllBytes(const string& FilePath); + static List ReadAllBytes(const String& FilePath); // Reads all the lines in the specified text file - static List ReadAllLines(const string& FilePath); + static List ReadAllLines(const String& FilePath); // Writes the specified text to the a file - static void WriteAllText(const string& FilePath, const string& Text); + static void WriteAllText(const String& FilePath, const String& Text); // Writes the specified bytes to the file - static void WriteAllBytes(const string& FilePath, const List& Bytes); + static void WriteAllBytes(const String& FilePath, const List& Bytes); // Writes the specified bytes to the file - static void WriteAllBytes(const string& FilePath, const uint8_t* Bytes, uint64_t Count); + static void WriteAllBytes(const String& FilePath, const uint8_t* Bytes, uint64_t Count); // Writes the specified lines to the file - static void WriteAllLines(const string& FilePath, const List& Lines); + static void WriteAllLines(const String& FilePath, const List& Lines); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/FileStream.cpp b/r5dev/thirdparty/cppnet/cppkore/FileStream.cpp index 7663014a..d4bea983 100644 --- a/r5dev/thirdparty/cppnet/cppkore/FileStream.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/FileStream.cpp @@ -3,22 +3,22 @@ namespace IO { - FileStream::FileStream(const string& Path, FileMode Mode) + FileStream::FileStream(const String& Path, FileMode Mode) : FileStream(Path, Mode, (Mode == FileMode::Append ? FileAccess::Write : FileAccess::ReadWrite), FileShare::Read) { } - FileStream::FileStream(const string& Path, FileMode Mode, FileAccess Access) + FileStream::FileStream(const String& Path, FileMode Mode, FileAccess Access) : FileStream(Path, Mode, Access, FileShare::Read) { } - FileStream::FileStream(const string& Path, FileMode Mode, FileAccess Access, FileShare Share) + FileStream::FileStream(const String& Path, FileMode Mode, FileAccess Access, FileShare Share) : FileStream(Path, Mode, Access, Share, FileStream::DefaultBufferSize) { } - FileStream::FileStream(const string & Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize) + FileStream::FileStream(const String & Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize) { this->SetupStream(Path, Mode, Access, Share, BufferSize); } @@ -421,7 +421,7 @@ namespace IO return TotalRead; } - void FileStream::SetupStream(const string& Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize) + void FileStream::SetupStream(const String& Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize) { // Easy way to make sure we have a fresh stream this->Close(); diff --git a/r5dev/thirdparty/cppnet/cppkore/FileStream.h b/r5dev/thirdparty/cppnet/cppkore/FileStream.h index c88f196a..406a86dd 100644 --- a/r5dev/thirdparty/cppnet/cppkore/FileStream.h +++ b/r5dev/thirdparty/cppnet/cppkore/FileStream.h @@ -15,10 +15,10 @@ namespace IO class FileStream : public Stream { public: - FileStream(const string& Path, FileMode Mode); - FileStream(const string& Path, FileMode Mode, FileAccess Access); - FileStream(const string& Path, FileMode Mode, FileAccess Access, FileShare Share); - FileStream(const string& Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize); + FileStream(const String& Path, FileMode Mode); + FileStream(const String& Path, FileMode Mode, FileAccess Access); + FileStream(const String& Path, FileMode Mode, FileAccess Access, FileShare Share); + FileStream(const String& Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize); virtual ~FileStream(); // Implement Getters and Setters @@ -71,7 +71,7 @@ namespace IO uint64_t ReadCore(uint8_t* Buffer, uint64_t Offset, uint64_t Count); // Sets up the FileStream - void SetupStream(const string& Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize); + void SetupStream(const String& Path, FileMode Mode, FileAccess Access, FileShare Share, uint32_t BufferSize); // Internal buffer size default 4k constexpr static uint32_t DefaultBufferSize = 4096; diff --git a/r5dev/thirdparty/cppnet/cppkore/HashComparer.h b/r5dev/thirdparty/cppnet/cppkore/HashComparer.h index 4ba92ad6..7767c0c6 100644 --- a/r5dev/thirdparty/cppnet/cppkore/HashComparer.h +++ b/r5dev/thirdparty/cppnet/cppkore/HashComparer.h @@ -12,7 +12,7 @@ struct HashComparer return Hashing::XXHash::HashValue(Value); else if constexpr (std::is_enum::value) return Hashing::XXHash::HashValue((uint32_t)Value); - else if constexpr (std::is_same::value) + else if constexpr (std::is_same::value) return Hashing::XXHash::HashString(Value); } diff --git a/r5dev/thirdparty/cppnet/cppkore/Icon.cpp b/r5dev/thirdparty/cppnet/cppkore/Icon.cpp index b8bcbe59..81504872 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Icon.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Icon.cpp @@ -37,7 +37,7 @@ namespace Drawing return this->_IconHandleSm; } - std::unique_ptr Icon::FromFile(const string& File) + std::unique_ptr Icon::FromFile(const String& File) { auto Result = std::make_unique(); diff --git a/r5dev/thirdparty/cppnet/cppkore/Icon.h b/r5dev/thirdparty/cppnet/cppkore/Icon.h index 1be7c8d7..57e4a09f 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Icon.h +++ b/r5dev/thirdparty/cppnet/cppkore/Icon.h @@ -21,7 +21,7 @@ namespace Drawing HICON SmallHandle(); // Loads an icon resouce from a file. - static std::unique_ptr FromFile(const string& File); + static std::unique_ptr FromFile(const String& File); // Loads an icon resource from a resource. static std::unique_ptr FromResource(const int32_t ID); // Loads the application defined icon. diff --git a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.cpp b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.cpp index 7b7dcc6e..2da58ba8 100644 --- a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.cpp @@ -50,7 +50,7 @@ namespace Assets::Exporters { auto& Texture = ObjectsNode.Children.Emplace("Texture"); - auto TextureName = Material.Name + "_c" + string("\u0000\u0001Texture", 9); + auto TextureName = Material.Name + "_c" + String("\u0000\u0001Texture", 9); Texture.AddPropertyInteger64(TextureId); Texture.AddPropertyString(TextureName); @@ -92,9 +92,9 @@ namespace Assets::Exporters Prop.AddPropertyInteger32(1); } - Texture.Children.Emplace("Media").AddPropertyString(Material.Name + "_c" + string("\u0000\u0001Video", 7)); + Texture.Children.Emplace("Media").AddPropertyString(Material.Name + "_c" + String("\u0000\u0001Video", 7)); - string DiffuseMap = ""; + String DiffuseMap = ""; if (Material.Slots.ContainsKey(MaterialSlotType::Albedo)) DiffuseMap = Material.Slots[MaterialSlotType::Albedo].first; else if (Material.Slots.ContainsKey(MaterialSlotType::Diffuse)) @@ -109,7 +109,7 @@ namespace Assets::Exporters auto& SkinDeformer = ObjectsNode.Children.Emplace("Deformer"); SkinDeformer.AddPropertyInteger64(DeformerId); - SkinDeformer.AddPropertyString(string::Format("KoreLibMesh%02d", SubmeshIndex) + string("\u0000\u0001Deformer", 10)); + SkinDeformer.AddPropertyString(String::Format("KoreLibMesh%02d", SubmeshIndex) + String("\u0000\u0001Deformer", 10)); SkinDeformer.AddPropertyString("Skin"); SkinDeformer.Children.Emplace("Version").AddPropertyInteger32(101); @@ -123,7 +123,7 @@ namespace Assets::Exporters auto& SubDeformer = ObjectsNode.Children.Emplace("Deformer"); SubDeformer.AddPropertyInteger64(DeformerId); - SubDeformer.AddPropertyString(string::Format("KoreLibMesh%02d_Bone%02d", SubmeshIndex, BoneIndex) + string("\u0000\u0001SubDeformer", 13)); + SubDeformer.AddPropertyString(String::Format("KoreLibMesh%02d_Bone%02d", SubmeshIndex, BoneIndex) + String("\u0000\u0001SubDeformer", 13)); SubDeformer.AddPropertyString("Cluster"); SubDeformer.Children.Emplace("Version").AddPropertyInteger32(100); @@ -146,12 +146,12 @@ namespace Assets::Exporters } } - bool KaydaraFBX::ExportAnimation(const Animation& Animation, const string& Path) + bool KaydaraFBX::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool KaydaraFBX::ExportModel(const Model& Model, const string& Path) + bool KaydaraFBX::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); auto FileName = IO::Path::GetFileNameWithoutExtension(Path); @@ -175,7 +175,7 @@ namespace Assets::Exporters auto& RootJointsNode = ObjectsNode.Children.Emplace("Model"); RootModelNode.AddPropertyInteger64(RootModelId); - RootModelNode.AddPropertyString(FileName + string("\u0000\u0001Model", 7)); + RootModelNode.AddPropertyString(FileName + String("\u0000\u0001Model", 7)); RootModelNode.AddPropertyString("Null"); RootJointsNode.AddPropertyInteger64(RootJointsId); @@ -215,7 +215,7 @@ namespace Assets::Exporters auto Rotation = Bone.LocalRotation().ToEulerAngles(); JointModelNode.AddPropertyInteger64(UniqueId); - JointModelNode.AddPropertyString(Bone.Name() + string("\u0000\u0001Model", 7)); + JointModelNode.AddPropertyString(Bone.Name() + String("\u0000\u0001Model", 7)); JointModelNode.AddPropertyString("LimbNode"); JointModelNode.Children.Emplace("Version").AddPropertyInteger32(232); @@ -314,7 +314,7 @@ namespace Assets::Exporters auto& MaterialNode = ObjectsNode.Children.Emplace("Material"); MaterialNode.AddPropertyInteger64(UniqueId); - MaterialNode.AddPropertyString(Mat.Name + string("\u0000\u0001Material", 10)); + MaterialNode.AddPropertyString(Mat.Name + String("\u0000\u0001Material", 10)); MaterialNode.AddPropertyString(""); MaterialNode.Children.Emplace("Version").AddPropertyInteger32(102); @@ -326,13 +326,13 @@ namespace Assets::Exporters UniqueId++; MatIndex++; - string DiffuseMap = ""; + String DiffuseMap = ""; if (Mat.Slots.ContainsKey(MaterialSlotType::Albedo)) DiffuseMap = Mat.Slots[MaterialSlotType::Albedo].first; else if (Mat.Slots.ContainsKey(MaterialSlotType::Diffuse)) DiffuseMap = Mat.Slots[MaterialSlotType::Diffuse].first; - if (!string::IsNullOrWhiteSpace(DiffuseMap)) + if (!String::IsNullOrWhiteSpace(DiffuseMap)) { InitializeMaterialTexture(ObjectsNode, Mat, UniqueId); AddObjectPropertyConnection(ConnectionsNode, UniqueId, UniqueId - 1, "DiffuseColor"); @@ -346,7 +346,7 @@ namespace Assets::Exporters auto& MeshModelNode = ObjectsNode.Children.Emplace("Model"); MeshModelNode.AddPropertyInteger64(ModelId); - MeshModelNode.AddPropertyString(string::Format("KoreLibMesh%02d", SubmeshIndex) + string("\u0000\u0001Model", 7)); + MeshModelNode.AddPropertyString(String::Format("KoreLibMesh%02d", SubmeshIndex) + String("\u0000\u0001Model", 7)); MeshModelNode.AddPropertyString("Mesh"); MeshModelNode.Children.Emplace("Version").AddPropertyInteger32(232); @@ -389,7 +389,7 @@ namespace Assets::Exporters auto& MeshNode = ObjectsNode.Children.Emplace("Geometry"); MeshNode.AddPropertyInteger64(UniqueId); - MeshNode.AddPropertyString(string::Format("KoreLibMesh%02d", SubmeshIndex) + string("\u0000\u0001Geometry", 10)); + MeshNode.AddPropertyString(String::Format("KoreLibMesh%02d", SubmeshIndex) + String("\u0000\u0001Geometry", 10)); MeshNode.AddPropertyString("Mesh"); MeshNode.Children.EmplaceBack("Properties70"); @@ -442,7 +442,7 @@ namespace Assets::Exporters LayerUVs.AddPropertyInteger32(i); LayerUVs.Children.Emplace("Version").AddPropertyInteger32(101); - LayerUVs.Children.Emplace("Name").AddPropertyString(string::Format("map%d", i + 1)); + LayerUVs.Children.Emplace("Name").AddPropertyString(String::Format("map%d", i + 1)); LayerUVs.Children.Emplace("MappingInformationType").AddPropertyString("ByVertice"); LayerUVs.Children.Emplace("ReferenceInformationType").AddPropertyString("Direct"); diff --git a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.h b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.h index aab9744e..4c2e105c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.h +++ b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBX.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~KaydaraFBX() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.cpp b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.cpp index ab351dab..488ac114 100644 --- a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.cpp @@ -127,9 +127,9 @@ namespace Assets::Exporters void KaydaraFBXDocument::InitializeGenerics() { - string s1(HeaderFileIdNode.second); - string s2(HeaderCreationTimeNode.second); - string s3(HeaderExtensionCreatorProperty.second); + String s1(HeaderFileIdNode.second); + String s2(HeaderCreationTimeNode.second); + String s3(HeaderExtensionCreatorProperty.second); this->Nodes.Emplace(HeaderFileIdNode.first).Properties.EmplaceBack('R', &s1); this->Nodes.Emplace(HeaderCreationTimeNode.first).Properties.EmplaceBack('S', &s2); this->Nodes.Emplace(HeaderExtensionCreatorProperty.first).Properties.EmplaceBack('S', &s3); @@ -232,7 +232,7 @@ namespace Assets::Exporters case 'R': case 'S': - _StringValue = *(string*)Data; + _StringValue = *(String*)Data; break; } } @@ -402,7 +402,7 @@ namespace Assets::Exporters return this->_IntegralValue; } - KaydaraFBXNode::KaydaraFBXNode(const string& Name) + KaydaraFBXNode::KaydaraFBXNode(const String& Name) : Name(Name) { } @@ -484,32 +484,32 @@ namespace Assets::Exporters this->Properties.EmplaceBack('D', &Value); } - void KaydaraFBXNode::AddPropertyString(const string& Value) + void KaydaraFBXNode::AddPropertyString(const String& Value) { this->Properties.EmplaceBack('S', &Value); } void KaydaraFBXNode::AddPropertyString(const char* Value) { - string s(Value); + String s(Value); this->Properties.EmplaceBack('S', &s); } void KaydaraFBXNode::AddPropertyString(const char* Value, const uint32_t Length) { - string s(Value, Length); + String s(Value, Length); this->Properties.EmplaceBack('S', &s); } void KaydaraFBXNode::AddPropertyRaw(const char* Value) { - string s(Value); + String s(Value); this->Properties.EmplaceBack('R', &s); } void KaydaraFBXNode::AddPropertyRaw(const char* Value, const uint32_t Length) { - string s(Value, Length); + String s(Value, Length); this->Properties.EmplaceBack('R', &s); } diff --git a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.h b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.h index 53b03335..5bd26829 100644 --- a/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.h +++ b/r5dev/thirdparty/cppnet/cppkore/KaydaraFBXContainer.h @@ -53,7 +53,7 @@ namespace Assets::Exporters List _IntegralArrayValues; // Internal value for string and raw types - string _StringValue; + String _StringValue; }; // Represents a node of an FBXDocument. @@ -61,7 +61,7 @@ namespace Assets::Exporters { public: KaydaraFBXNode() = default; - KaydaraFBXNode(const string& Name); + KaydaraFBXNode(const String& Name); explicit KaydaraFBXNode(const char* Name); // Prepares a new node. @@ -76,7 +76,7 @@ namespace Assets::Exporters void AddPropertyInteger64(uint64_t Value); void AddPropertyFloat32(float Value); void AddPropertyFloat64(double Value); - void AddPropertyString(const string& Value); + void AddPropertyString(const String& Value); void AddPropertyString(const char* Value); void AddPropertyString(const char* Value, const uint32_t Length); void AddPropertyRaw(const char* Value); @@ -93,7 +93,7 @@ namespace Assets::Exporters // A list of child nodes. List Children; // The name of this node. - string Name; + String Name; }; // Represents the root of an FBX container. diff --git a/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.cpp b/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.cpp index 4da7536d..469485f7 100644 --- a/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.cpp @@ -8,7 +8,7 @@ namespace Forms { } - LabelEditEventArgs::LabelEditEventArgs(int32_t Item, const string& Label) + LabelEditEventArgs::LabelEditEventArgs(int32_t Item, const String& Label) : Item(Item), Label(Label), CancelEdit(false) { } diff --git a/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.h b/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.h index 03d7017b..c466d3bd 100644 --- a/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.h +++ b/r5dev/thirdparty/cppnet/cppkore/LabelEditEventArgs.h @@ -10,11 +10,11 @@ namespace Forms { public: LabelEditEventArgs(int32_t Item); - LabelEditEventArgs(int32_t Item, const string& Label); + LabelEditEventArgs(int32_t Item, const String& Label); ~LabelEditEventArgs() = default; // The new text for the item. - string Label; + String Label; // The index of the item being edited. int32_t Item; // Whether or not to cancel the changes. diff --git a/r5dev/thirdparty/cppnet/cppkore/ListView.cpp b/r5dev/thirdparty/cppnet/cppkore/ListView.cpp index 19247a78..b8902f79 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ListView.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ListView.cpp @@ -859,7 +859,7 @@ namespace Forms return (int32_t)SendMessageA(this->_Handle, LVM_GETITEMSTATE, (WPARAM)Index, LVIS_FOCUSED | LVIS_SELECTED | LVIS_CUT | LVIS_DROPHILITED | LVIS_OVERLAYMASK | LVIS_STATEIMAGEMASK); } - std::pair ListView::GetSubItem(int32_t Index, int32_t SubItem) + std::pair ListView::GetSubItem(int32_t Index, int32_t SubItem) { if (!VirtualMode()) { @@ -867,13 +867,13 @@ namespace Forms auto& Text = Item.SubItem(SubItem); auto& Style = Item.SubItemStyle(SubItem); - return std::pair(Text, Style); + return std::pair(Text, Style); } auto EventArgs = std::make_unique(Index, SubItem); OnRetrieveVirtualItem(EventArgs); - return std::pair(EventArgs->Text, EventArgs->Style); + return std::pair(EventArgs->Text, EventArgs->Style); } void ListView::SetColumnInfo(int32_t Mask, ColumnHeader& Header) diff --git a/r5dev/thirdparty/cppnet/cppkore/ListView.h b/r5dev/thirdparty/cppnet/cppkore/ListView.h index 2108bf9c..25739eaa 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ListView.h +++ b/r5dev/thirdparty/cppnet/cppkore/ListView.h @@ -301,7 +301,7 @@ namespace Forms int32_t GetItemState(int32_t Index); // Internal routine to get a sub item - std::pair GetSubItem(int32_t Index, int32_t SubItem); + std::pair GetSubItem(int32_t Index, int32_t SubItem); // Internal routine to set column indices void SetDisplayIndices(const std::unique_ptr& Indices, int32_t Count); diff --git a/r5dev/thirdparty/cppnet/cppkore/ListViewItem.cpp b/r5dev/thirdparty/cppnet/cppkore/ListViewItem.cpp index f47c55e9..0d632a9e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ListViewItem.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ListViewItem.cpp @@ -8,14 +8,14 @@ namespace Forms { } - ListViewItem::ListViewItem(std::initializer_list SubItems) - : _SubItems(std::make_unique(SubItems.size())), _SubItemStyles(std::make_unique(SubItems.size())), Index(-1), _SubItemCount((uint32_t)SubItems.size()) + ListViewItem::ListViewItem(std::initializer_list SubItems) + : _SubItems(std::make_unique(SubItems.size())), _SubItemStyles(std::make_unique(SubItems.size())), Index(-1), _SubItemCount((uint32_t)SubItems.size()) { std::copy(SubItems.begin(), SubItems.end(), _SubItems.get()); } - ListViewItem::ListViewItem(std::initializer_list SubItems, std::initializer_list SubItemStyles) - : _SubItems(std::make_unique(SubItems.size())), _SubItemStyles(std::make_unique(SubItemStyles.size())), Index(-1), _SubItemCount((uint32_t)SubItems.size()) + ListViewItem::ListViewItem(std::initializer_list SubItems, std::initializer_list SubItemStyles) + : _SubItems(std::make_unique(SubItems.size())), _SubItemStyles(std::make_unique(SubItemStyles.size())), Index(-1), _SubItemCount((uint32_t)SubItems.size()) { std::copy(SubItems.begin(), SubItems.end(), _SubItems.get()); std::copy(SubItemStyles.begin(), SubItemStyles.end(), _SubItemStyles.get()); @@ -25,7 +25,7 @@ namespace Forms { this->_SubItemCount = Rhs._SubItemCount; - this->_SubItems = std::make_unique(_SubItemCount); + this->_SubItems = std::make_unique(_SubItemCount); this->_SubItemStyles = std::make_unique(_SubItemCount); std::copy(Rhs._SubItems.get(), Rhs._SubItems.get() + _SubItemCount, this->_SubItems.get()); @@ -36,7 +36,7 @@ namespace Forms { this->_SubItemCount = Rhs._SubItemCount; - this->_SubItems = std::make_unique(_SubItemCount); + this->_SubItems = std::make_unique(_SubItemCount); this->_SubItemStyles = std::make_unique(_SubItemCount); std::copy(Rhs._SubItems.get(), Rhs._SubItems.get() + _SubItemCount, this->_SubItems.get()); @@ -45,7 +45,7 @@ namespace Forms return *this; } - const string& ListViewItem::Text() const + const String& ListViewItem::Text() const { return _SubItems[0]; } @@ -55,7 +55,7 @@ namespace Forms return _SubItemStyles[0]; } - const string& ListViewItem::SubItem(uint32_t Index) const + const String& ListViewItem::SubItem(uint32_t Index) const { return _SubItems[Index]; } diff --git a/r5dev/thirdparty/cppnet/cppkore/ListViewItem.h b/r5dev/thirdparty/cppnet/cppkore/ListViewItem.h index d938ac25..d881b9db 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ListViewItem.h +++ b/r5dev/thirdparty/cppnet/cppkore/ListViewItem.h @@ -27,8 +27,8 @@ namespace Forms { public: ListViewItem(); - ListViewItem(std::initializer_list SubItems); - ListViewItem(std::initializer_list SubItems, std::initializer_list SubItemStyles); + ListViewItem(std::initializer_list SubItems); + ListViewItem(std::initializer_list SubItems, std::initializer_list SubItemStyles); ListViewItem(const ListViewItem& Rhs); ~ListViewItem() = default; @@ -36,12 +36,12 @@ namespace Forms ListViewItem& operator=(const ListViewItem& Rhs); // Gets the text associated with this list item. - const string& Text() const; + const String& Text() const; // Gets the style associated with this list Item. const ListViewItemStyle& Style() const; // Gets the sub item text. - const string& SubItem(uint32_t Index) const; + const String& SubItem(uint32_t Index) const; // Gets the sub item style. const ListViewItemStyle& SubItemStyle(uint32_t Index) const; @@ -53,7 +53,7 @@ namespace Forms private: // Internal cached properties - std::unique_ptr _SubItems; + std::unique_ptr _SubItems; std::unique_ptr _SubItemStyles; uint32_t _SubItemCount; }; diff --git a/r5dev/thirdparty/cppnet/cppkore/Mangle.h b/r5dev/thirdparty/cppnet/cppkore/Mangle.h index 9458b277..6a0856e1 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Mangle.h +++ b/r5dev/thirdparty/cppnet/cppkore/Mangle.h @@ -127,7 +127,7 @@ typedef void(__stdcall* FnGenBuffers)(GLsizei n, const GLuint* buffers); typedef void(__stdcall* FnBindBuffer)(GLenum target, GLuint buffer); typedef void(__stdcall* FnBindBufferBase)(GLenum target, GLuint index, GLuint buffer); typedef void(__stdcall* FnBufferData)(GLenum target, GLsizeiptr size, const void* data, GLenum usage); -typedef void(__stdcall* FnShaderSource)(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); +typedef void(__stdcall* FnShaderSource)(GLuint shader, GLsizei count, const GLchar* const* String, const GLint* length); typedef void(__stdcall* FnUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void(__stdcall* FnVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer); typedef void(__stdcall* FnBindVertexArray)(GLuint array); diff --git a/r5dev/thirdparty/cppnet/cppkore/Material.cpp b/r5dev/thirdparty/cppnet/cppkore/Material.cpp index cff2da07..b4031e3b 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Material.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Material.cpp @@ -9,7 +9,7 @@ namespace Assets { } - Material::Material(const string& Name, const uint64_t Hash) + Material::Material(const String& Name, const uint64_t Hash) : Name(Name), Hash(Hash), SourceHash((uint64_t)-1), SourceString("") { } diff --git a/r5dev/thirdparty/cppnet/cppkore/Material.h b/r5dev/thirdparty/cppnet/cppkore/Material.h index af6cb100..600de95d 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Material.h +++ b/r5dev/thirdparty/cppnet/cppkore/Material.h @@ -44,20 +44,20 @@ namespace Assets // Initialize a new default material. Material(); // Initialize a new material. - Material(const string& Name, const uint64_t Hash); + Material(const String& Name, const uint64_t Hash); // Destroy all material info. ~Material() = default; // The unique name for this material. - string Name; + String Name; // Name of the source identifier for this material. - string SourceString; + String SourceString; // Hash of the source identifier for this material. uint64_t SourceHash; // The material texture slots - Dictionary> Slots; + Dictionary> Slots; // The unique hash identifier for this material. uint64_t Hash; diff --git a/r5dev/thirdparty/cppnet/cppkore/MessageBox.cpp b/r5dev/thirdparty/cppnet/cppkore/MessageBox.cpp index 8276da59..0804bf3b 100644 --- a/r5dev/thirdparty/cppnet/cppkore/MessageBox.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/MessageBox.cpp @@ -127,7 +127,7 @@ namespace Forms return 0; } - DialogResult MessageBox::ShowCore(const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options, bool ShowHelp, Control* Owner) + DialogResult MessageBox::ShowCore(const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options, bool ShowHelp, Control* Owner) { uint32_t Style = (ShowHelp) ? HELP_BUTTON : 0; Style |= (int)Buttons | (int)Icon | (int)DefaultButton | (int)Options; @@ -164,37 +164,37 @@ namespace Forms return Win32ToDialogResult(Result); } - DialogResult MessageBox::Show(const string& Text) + DialogResult MessageBox::Show(const String& Text) { return ShowCore(Text, "", MessageBoxButtons::OK, MessageBoxIcon::None, MessageBoxDefaultButton::Button1, (MessageBoxOptions)0, false, nullptr); } - DialogResult MessageBox::Show(const string& Text, const string& Caption) + DialogResult MessageBox::Show(const String& Text, const String& Caption) { return ShowCore(Text, Caption, MessageBoxButtons::OK, MessageBoxIcon::None, MessageBoxDefaultButton::Button1, (MessageBoxOptions)0, false, nullptr); } - DialogResult MessageBox::Show(const string& Text, const string& Caption, MessageBoxButtons Buttons) + DialogResult MessageBox::Show(const String& Text, const String& Caption, MessageBoxButtons Buttons) { return ShowCore(Text, Caption, Buttons, MessageBoxIcon::None, MessageBoxDefaultButton::Button1, (MessageBoxOptions)0, false, nullptr); } - DialogResult MessageBox::Show(const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon) + DialogResult MessageBox::Show(const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon) { return ShowCore(Text, Caption, Buttons, Icon, MessageBoxDefaultButton::Button1, (MessageBoxOptions)0, false, nullptr); } - DialogResult MessageBox::Show(Control* Owner, const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon) + DialogResult MessageBox::Show(Control* Owner, const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon) { return ShowCore(Text, Caption, Buttons, Icon, MessageBoxDefaultButton::Button1, (MessageBoxOptions)0, false, Owner); } - DialogResult MessageBox::Show(Control* Owner, const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton) + DialogResult MessageBox::Show(Control* Owner, const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton) { return ShowCore(Text, Caption, Buttons, Icon, DefaultButton, (MessageBoxOptions)0, false, Owner); } - DialogResult MessageBox::Show(Control* Owner, const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options) + DialogResult MessageBox::Show(Control* Owner, const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options) { return ShowCore(Text, Caption, Buttons, Icon, DefaultButton, Options, false, Owner); } diff --git a/r5dev/thirdparty/cppnet/cppkore/MessageBox.h b/r5dev/thirdparty/cppnet/cppkore/MessageBox.h index 0f218ac2..ce19af05 100644 --- a/r5dev/thirdparty/cppnet/cppkore/MessageBox.h +++ b/r5dev/thirdparty/cppnet/cppkore/MessageBox.h @@ -21,19 +21,19 @@ namespace Forms { public: // Displays a message box with specified text. - static DialogResult Show(const string& Text); + static DialogResult Show(const String& Text); // Displays a message box with specified text and caption. - static DialogResult Show(const string& Text, const string& Caption); + static DialogResult Show(const String& Text, const String& Caption); // Displays a message box with specified text, caption, and style. - static DialogResult Show(const string& Text, const string& Caption, MessageBoxButtons Buttons); + static DialogResult Show(const String& Text, const String& Caption, MessageBoxButtons Buttons); // Displays a message box with specified text, caption, and style. - static DialogResult Show(const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon); + static DialogResult Show(const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon); // Displays a message box with specified text, caption, and style. - static DialogResult Show(Control* Owner, const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon); + static DialogResult Show(Control* Owner, const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon); // Displays a message box with specified text, caption, and style. - static DialogResult Show(Control* Owner, const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton); + static DialogResult Show(Control* Owner, const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton); // Displays a message box with specified text, caption, and style. - static DialogResult Show(Control* Owner, const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options); + static DialogResult Show(Control* Owner, const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options); // Sets user defined message box colors for Foreground, Background, and Dialog Bottom Strip. static void SetMessageBoxColors(Drawing::Color Foreground = Drawing::Color::Black, Drawing::Color Background = Drawing::Color::White, Drawing::Color Bottom = Drawing::Color(240, 240, 240)); @@ -42,7 +42,7 @@ namespace Forms // Converts a native windows result to a dialog result static DialogResult Win32ToDialogResult(uint32_t Value); // Handles message box logic - static DialogResult ShowCore(const string& Text, const string& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options, bool ShowHelp, Control* Owner); + static DialogResult ShowCore(const String& Text, const String& Caption, MessageBoxButtons Buttons, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton, MessageBoxOptions Options, bool ShowHelp, Control* Owner); // Internal help button constant constexpr static uint32_t HELP_BUTTON = 0x00004000; diff --git a/r5dev/thirdparty/cppnet/cppkore/Model.h b/r5dev/thirdparty/cppnet/cppkore/Model.h index 65b0d0be..d60a11e2 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Model.h +++ b/r5dev/thirdparty/cppnet/cppkore/Model.h @@ -31,7 +31,7 @@ namespace Assets ~Model() = default; // The name of the model - string Name; + String Name; // Ensure that our model is not copied or assigned to for performance reasons. Model(const Model&) = delete; @@ -46,7 +46,7 @@ namespace Assets // Adds a material to the collection if it doesn't already exist, returning it's index. template - uint32_t AddMaterial(const string& MaterialName, const T& SourceMap = T()) + uint32_t AddMaterial(const String& MaterialName, const T& SourceMap = T()) { auto MaterialHashCode = Hashing::XXHash::HashString(MaterialName); diff --git a/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.cpp b/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.cpp index a847bc28..5632426d 100644 --- a/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.cpp @@ -6,9 +6,9 @@ namespace Forms { - const string BuildOpenFileFilter(const string& Filter) + const String BuildOpenFileFilter(const String& Filter) { - string InitialFilter = (string::IsNullOrWhiteSpace(Filter)) ? string(" |*.*") : Filter; + String InitialFilter = (String::IsNullOrWhiteSpace(Filter)) ? String(" |*.*") : Filter; auto Buffer = std::make_unique((size_t)InitialFilter.Length() + 2); // Final filter has two null chars auto BufferMask = (char*)Buffer.get(); @@ -22,10 +22,10 @@ namespace Forms BufferMask[InitialFilter.Length() + 1] = (char)0; - return string((char*)Buffer.get(), (size_t)InitialFilter.Length() + 1); + return String((char*)Buffer.get(), (size_t)InitialFilter.Length() + 1); } - string OpenFileDialog::ShowFolderDialog(const string& Title, const string& BasePath, Control* Owner) + String OpenFileDialog::ShowFolderDialog(const String& Title, const String& BasePath, Control* Owner) { HWND OwnerHandle = (Owner != nullptr) ? Owner->GetHandle() : NULL; @@ -41,13 +41,13 @@ namespace Forms bi.lParam = 0; LPITEMIDLIST pidl = SHBrowseForFolderA(&bi); if (pidl != NULL && SHGetPathFromIDListA(pidl, path)) - return string(path); + return String(path); // We need nothing as a default because we don't get a return value return ""; } - string OpenFileDialog::ShowFileDialog(const string& Title, const string& BasePath, const string& Filter, Control* Owner) + String OpenFileDialog::ShowFileDialog(const String& Title, const String& BasePath, const String& Filter, Control* Owner) { HWND OwnerHandle = (Owner != nullptr) ? Owner->GetHandle() : NULL; char Buffer[MAX_PATH]{}; @@ -67,13 +67,13 @@ namespace Forms // Open the dialog with the config and then return result if (GetOpenFileNameA(&oFileDialog)) - return string(Buffer); + return String(Buffer); // We need nothing as a default because we don't get a return value return ""; } - List OpenFileDialog::ShowMultiFileDialog(const string& Title, const string& BasePath, const string& Filter, Control* Owner) + List OpenFileDialog::ShowMultiFileDialog(const String& Title, const String& BasePath, const String& Filter, Control* Owner) { HWND OwnerHandle = (Owner != nullptr) ? Owner->GetHandle() : NULL; char Buffer[0x2000]{}; @@ -93,14 +93,14 @@ namespace Forms oFileDialog.lpstrTitle = Title.ToCString(); oFileDialog.Flags = OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_EXPLORER; - List ResultList; + List ResultList; // Open the dialog and parse each result if (GetOpenFileNameA(&oFileDialog)) { const char* Path = oFileDialog.lpstrFile; - auto BasePath = string(Path); + auto BasePath = String(Path); while (*Path) { @@ -110,7 +110,7 @@ namespace Forms bFileLessPath = true; } - auto FileName = string(Path); + auto FileName = String(Path); ResultList.EmplaceBack(IO::Path::Combine(BasePath, FileName)); Path += ((size_t)FileName.Length() + 1); } diff --git a/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.h b/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.h index 3ce0debd..aaafc83f 100644 --- a/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.h +++ b/r5dev/thirdparty/cppnet/cppkore/OpenFileDialog.h @@ -12,11 +12,11 @@ namespace Forms class OpenFileDialog { public: - static string ShowFolderDialog(const string& Title, const string& BasePath = "", Control* Owner = nullptr); + static String ShowFolderDialog(const String& Title, const String& BasePath = "", Control* Owner = nullptr); // Opens the dialog and allows the user to select one file - static string ShowFileDialog(const string& Title, const string& BasePath = "", const string& Filter = " |*.*", Control* Owner = nullptr); + static String ShowFileDialog(const String& Title, const String& BasePath = "", const String& Filter = " |*.*", Control* Owner = nullptr); // Opens the dialog and allows the user to select multiple files - static List ShowMultiFileDialog(const string& Title, const string& BasePath = "", const string& Filter = " |*.*", Control* Owner = nullptr); + static List ShowMultiFileDialog(const String& Title, const String& BasePath = "", const String& Filter = " |*.*", Control* Owner = nullptr); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/Path.cpp b/r5dev/thirdparty/cppnet/cppkore/Path.cpp index b61e9bd7..00ecf6a7 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Path.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Path.cpp @@ -3,15 +3,15 @@ namespace IO { - string Path::ChangeExtension(const string& FilePath, const string& Extension) + String Path::ChangeExtension(const String& FilePath, const String& Extension) { - string Base; + String Base; for (int32_t i = FilePath.Length(); --i >= 0;) { auto& Ch = FilePath[i]; if (Ch == '.') { - Base = FilePath.Substring(0, i); + Base = FilePath.SubString(0, i); break; } @@ -36,7 +36,7 @@ namespace IO return Base; } - string Path::GetDirectoryName(const string& Path) + String Path::GetDirectoryName(const String& Path) { // Cache the full length and root length int32_t cLength = (int32_t)Path.Length(); @@ -44,16 +44,16 @@ namespace IO if (cLength > rLength) { - // Iterate while not modifying the string for performance + // Iterate while not modifying the String for performance while (cLength > rLength && Path[--cLength] != DirectorySeparatorChar && Path[cLength] != AltDirectorySeparatorChar); - return Path.Substring(0, cLength); + return Path.SubString(0, cLength); } return ""; } - string Path::GetExtension(const string& FilePath) + String Path::GetExtension(const String& FilePath) { // Cache full length int32_t cLength = (int32_t)FilePath.Length(); @@ -64,7 +64,7 @@ namespace IO if (Ch == '.') { if (i != cLength - 1) - return FilePath.Substring(i, cLength - i); + return FilePath.SubString(i, cLength - i); else return ""; } @@ -77,7 +77,7 @@ namespace IO return ""; } - string Path::GetFileName(const string& FilePath) + String Path::GetFileName(const String& FilePath) { int32_t cLength = (int32_t)FilePath.Length(); for (int32_t i = cLength; --i >= 0;) @@ -85,29 +85,29 @@ namespace IO auto& Ch = FilePath[i]; if (Ch == DirectorySeparatorChar || Ch == AltDirectorySeparatorChar || Ch == VolumeSeparatorChar) - return FilePath.Substring(i + 1, cLength - i - 1); + return FilePath.SubString(i + 1, cLength - i - 1); } return FilePath; } - string Path::GetFileNameWithoutExtension(const string& FilePath) + String Path::GetFileNameWithoutExtension(const String& FilePath) { auto fPath = Path::GetFileName(FilePath); auto fExt = fPath.LastIndexOf('.'); - if (fExt != string::InvalidPosition) - return fPath.Substring(0, fExt); + if (fExt != String::InvalidPosition) + return fPath.SubString(0, fExt); else return fPath; } - string Path::GetPathRoot(const string& Path) + String Path::GetPathRoot(const String& Path) { - return Path.Substring(0, Path::GetRootLength(Path)); + return Path.SubString(0, Path::GetRootLength(Path)); } - string Path::GetTempPath() + String Path::GetTempPath() { char Buffer[MAX_PATH + 1]{}; GetTempPathA(MAX_PATH, Buffer); @@ -115,7 +115,7 @@ namespace IO return Buffer; } - string Path::GetTempFileName() + String Path::GetTempFileName() { auto BasePath = Path::GetTempPath(); @@ -125,7 +125,7 @@ namespace IO return Buffer; } - bool Path::HasExtension(const string& FilePath) + bool Path::HasExtension(const String& FilePath) { auto cLength = FilePath.Length(); @@ -148,7 +148,7 @@ namespace IO return false; } - bool Path::IsPathRooted(const string& Path) + bool Path::IsPathRooted(const String& Path) { auto cLength = Path.Length(); if ((cLength >= 1 && (Path[0] == DirectorySeparatorChar || Path[0] == AltDirectorySeparatorChar)) || (cLength >= 2 && Path[1] == VolumeSeparatorChar)) @@ -157,7 +157,7 @@ namespace IO return false; } - string Path::Combine(const string& Path1, const string& Path2) + String Path::Combine(const String& Path1, const String& Path2) { if (Path2.Length() == 0) return Path1; @@ -174,7 +174,7 @@ namespace IO return Path1 + Path2; } - uint32_t Path::GetRootLength(const string& Path) + uint32_t Path::GetRootLength(const String& Path) { int32_t i = 0, cLength = Path.Length(); diff --git a/r5dev/thirdparty/cppnet/cppkore/Path.h b/r5dev/thirdparty/cppnet/cppkore/Path.h index 78355fe4..6349fd5a 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Path.h +++ b/r5dev/thirdparty/cppnet/cppkore/Path.h @@ -23,27 +23,27 @@ namespace IO constexpr static char VolumeSeparatorChar = ':'; // Changes the extension of a file path - static string ChangeExtension(const string& FilePath, const string& Extension); + static String ChangeExtension(const String& FilePath, const String& Extension); // Returns the directory path of a file path - static string GetDirectoryName(const string& Path); + static String GetDirectoryName(const String& Path); // Returns the extension of the given path - static string GetExtension(const string& FilePath); + static String GetExtension(const String& FilePath); // Returns the name and extension parts of the given path - static string GetFileName(const string& FilePath); + static String GetFileName(const String& FilePath); // Returns the name without the extension of the given path - static string GetFileNameWithoutExtension(const string& FilePath); + static String GetFileNameWithoutExtension(const String& FilePath); // Returns the root portion of the given path - static string GetPathRoot(const string& Path); + static String GetPathRoot(const String& Path); // Returns a temporary folder path - static string GetTempPath(); + static String GetTempPath(); // Returns a temporary file name - static string GetTempFileName(); + static String GetTempFileName(); // Checks if the file name has an extension - static bool HasExtension(const string& FilePath); + static bool HasExtension(const String& FilePath); // Checks if the given path contains a root - static bool IsPathRooted(const string& Path); + static bool IsPathRooted(const String& Path); // Combine two paths - static string Combine(const string& Path1, const string& Path2); + static String Combine(const String& Path1, const String& Path2); // Returns a list of all the bad path characters constexpr static std::array GetInvalidPathChars() @@ -81,6 +81,6 @@ namespace IO // Internal helper routines // - static uint32_t GetRootLength(const string& Path); + static uint32_t GetRootLength(const String& Path); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/Pattern.h b/r5dev/thirdparty/cppnet/cppkore/Pattern.h index 26e29314..509a0e17 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Pattern.h +++ b/r5dev/thirdparty/cppnet/cppkore/Pattern.h @@ -10,7 +10,7 @@ namespace Data class Pattern { public: - constexpr Pattern(const string& Signature) + constexpr Pattern(const String& Signature) : _PatternLength(0) { // Process the signature into a data / mask combo for later scanning diff --git a/r5dev/thirdparty/cppnet/cppkore/Process.cpp b/r5dev/thirdparty/cppnet/cppkore/Process.cpp index 453b0a36..0b8b0130 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Process.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Process.cpp @@ -133,7 +133,7 @@ namespace Diagnostics ::WaitForInputIdle(this->_Handle, INFINITE); } - bool Process::InjectModule(const string& ModulePath) + bool Process::InjectModule(const String& ModulePath) { if (!this->AquireProcessHandle()) return false; @@ -163,7 +163,7 @@ namespace Diagnostics return true; } - const string& Process::GetProcessName() const + const String& Process::GetProcessName() const { return this->_ProcessInfo.ProcessName; } @@ -246,7 +246,7 @@ namespace Diagnostics return this->GetProcessMainWindowHandle(); } - const string Process::GetMainWindowTitle() + const String Process::GetMainWindowTitle() { auto mHandle = this->GetProcessMainWindowHandle(); if (!mHandle) @@ -255,7 +255,7 @@ namespace Diagnostics char Buffer[MAX_PATH + 1]{}; auto mResult = GetWindowTextA(mHandle, Buffer, MAX_PATH); - return string(Buffer, mResult); + return String(Buffer, mResult); } const uint32_t Process::GetExitCode() @@ -295,11 +295,11 @@ namespace Diagnostics char Buffer[1024]{}; GetModuleBaseNameA(this->_Handle, ModHandles[i], Buffer, 1024); - ModuleInfo.ModuleName = string(Buffer); + ModuleInfo.ModuleName = String(Buffer); std::memset(Buffer, 0, 1024); GetModuleFileNameExA(this->_Handle, ModHandles[i], Buffer, 1024); - ModuleInfo.FileName = string(Buffer); + ModuleInfo.FileName = String(Buffer); Result.EmplaceBack(std::move(ModuleInfo)); } @@ -368,7 +368,7 @@ namespace Diagnostics return Process(ProcessInfo[0]); } - List Process::GetProcessesByName(const string& Name) + List Process::GetProcessesByName(const String& Name) { auto ProcessInfos = Process::GetProcessInfos({}); auto Result = List(); @@ -404,12 +404,12 @@ namespace Diagnostics return Process(Process::GetProcessInfos({ OurId })[0]); } - Process Process::Start(const string& FileName) + Process Process::Start(const String& FileName) { return Process::Start(ProcessStartInfo(FileName)); } - Process Process::Start(const string& FileName, const string& Arguments) + Process Process::Start(const String& FileName, const String& Arguments) { return Process::Start(ProcessStartInfo(FileName, Arguments)); } @@ -460,13 +460,13 @@ namespace Diagnostics STARTUPINFOA StartInfo{}; PROCESS_INFORMATION ProcessInfo{}; - string CommandLine; + String CommandLine; if (Start.FileName.StartsWith("\"") && Start.FileName.EndsWith("\"")) CommandLine += Start.FileName; else CommandLine = "\"" + Start.FileName + "\""; - if (!string::IsNullOrWhiteSpace(Start.Arguments)) + if (!String::IsNullOrWhiteSpace(Start.Arguments)) { CommandLine += " " + Start.Arguments; } @@ -517,7 +517,7 @@ namespace Diagnostics return !(*this == Rhs); } - void Process::SetPrivilage(const string& PrivilegeName, bool Enabled) + void Process::SetPrivilage(const String& PrivilegeName, bool Enabled) { HANDLE hToken = nullptr; if (!OpenProcessToken(::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) @@ -614,12 +614,12 @@ namespace Diagnostics } else { - Pi.ProcessName = string::Format("Process_%d", NProcessId); + Pi.ProcessName = String::Format("Process_%d", NProcessId); } } else { - Pi.ProcessName = Process::GetProcessShortName(wstring(NProcessInfo->ImageName.Buffer, NProcessInfo->ImageName.Length / sizeof(WCHAR)).ToString()); + Pi.ProcessName = Process::GetProcessShortName(WString(NProcessInfo->ImageName.Buffer, NProcessInfo->ImageName.Length / sizeof(WCHAR)).ToString()); } if (!ProcessIdMatch.Empty() && ProcessIdMatch.Contains(NProcessId)) @@ -636,7 +636,7 @@ namespace Diagnostics return Result; } - string Process::GetProcessShortName(const string& Name) + String Process::GetProcessShortName(const String& Name) { int32_t Slash = -1, Period = -1; @@ -652,7 +652,7 @@ namespace Diagnostics Period = Name.Length() - 1; else { - auto Ext = Name.Substring(Period); + auto Ext = Name.SubString(Period); if (Ext.ToLower() == ".exe") Period--; else @@ -664,7 +664,7 @@ namespace Diagnostics else Slash++; - return Name.Substring(Slash, Period - Slash + 1); + return Name.SubString(Slash, Period - Slash + 1); } LPTHREAD_START_ROUTINE Process::ResolveInjectionAddress(BOOL Is32BitProcess) diff --git a/r5dev/thirdparty/cppnet/cppkore/Process.h b/r5dev/thirdparty/cppnet/cppkore/Process.h index a32afea8..b4dd0be1 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Process.h +++ b/r5dev/thirdparty/cppnet/cppkore/Process.h @@ -38,14 +38,14 @@ namespace Diagnostics // Waits for the process to enter an idle state void WaitForInputIdle(); // Injects a module into the given process - bool InjectModule(const string& ModulePath); + bool InjectModule(const String& ModulePath); // // Getters // // Returns the name of the process - const string& GetProcessName() const; + const String& GetProcessName() const; // Returns the process base priority const uint32_t GetBasePriority() const; // Returns the process id @@ -87,7 +87,7 @@ namespace Diagnostics // Returns the main window handle const HWND GetMainWindowHandle(); // Returns the main window title - const string GetMainWindowTitle(); + const String GetMainWindowTitle(); // Returns the process exit code, if any const uint32_t GetExitCode(); // Returns a list of process modules @@ -98,16 +98,16 @@ namespace Diagnostics // Attempts to get a process by the process id static Process GetProcessById(uint32_t Pid); // Attempts to get processes with a specific name - static List GetProcessesByName(const string& Name); + static List GetProcessesByName(const String& Name); // Gets all processes running on the current system static List GetProcesses(); // Gets the current process static Process GetCurrentProcess(); // Creates a new process with the given information - static Process Start(const string& FileName); + static Process Start(const String& FileName); // Creates a new process with the given information - static Process Start(const string& FileName, const string& Arguments); + static Process Start(const String& FileName, const String& Arguments); // Creates a new process with the given information static Process Start(const ProcessStartInfo& Start); @@ -138,12 +138,12 @@ namespace Diagnostics LPTHREAD_START_ROUTINE ResolveInjectionAddress(BOOL Is32BitProcess); // Internal routine to set a process token privilege - static void SetPrivilage(const string& PrivilegeName, bool Enabled); + static void SetPrivilage(const String& PrivilegeName, bool Enabled); // Internal routine to get a list of processes on the current machines info static List GetProcessInfos(const List& ProcessIdMatch); // Internal routine to transform the process name - static string GetProcessShortName(const string& Name); + static String GetProcessShortName(const String& Name); // Internal constant that matches STATUS_INFO_LENGTH_MISMATCH from ntstatus.h static constexpr uint32_t StatusInfoLengthMismatch = 0xC0000004; diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessInfo.h b/r5dev/thirdparty/cppnet/cppkore/ProcessInfo.h index 82f153e9..4c6aa2ff 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessInfo.h +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessInfo.h @@ -9,7 +9,7 @@ namespace Diagnostics struct ProcessInfo { uint32_t BasePriority; - string ProcessName; + String ProcessName; uint32_t ProcessId; uint32_t HandleCount; uint64_t PoolPagedBytes; diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessModule.h b/r5dev/thirdparty/cppnet/cppkore/ProcessModule.h index 57dbdac9..b59932dc 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessModule.h +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessModule.h @@ -19,8 +19,8 @@ namespace Diagnostics uint64_t EntryPointAddress; // Returns the name of the Module. - string ModuleName; + String ModuleName; // Returns the full file path for the location of the module. - string FileName; + String FileName; }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessReader.cpp b/r5dev/thirdparty/cppnet/cppkore/ProcessReader.cpp index bf622cbe..226c90b9 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessReader.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessReader.cpp @@ -67,7 +67,7 @@ namespace IO return Read((uint8_t*)Buffer, Index, Count, Address); } - string ProcessReader::ReadCString(uint64_t Address) + String ProcessReader::ReadCString(uint64_t Address) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -78,15 +78,15 @@ namespace IO if (nCharPos != nullptr) { - return std::move(string(iBuffer, (char*)nCharPos - &iBuffer[0])); + return std::move(String(iBuffer, (char*)nCharPos - &iBuffer[0])); } else if (Result != sizeof(iBuffer)) { - return std::move(string(iBuffer)); + return std::move(String(iBuffer)); } Address += 0x100; - string Buffer(iBuffer, sizeof(iBuffer)); + String Buffer(iBuffer, sizeof(iBuffer)); auto tChar = this->Read(Address++); while ((uint8_t)tChar > 0) @@ -98,12 +98,12 @@ namespace IO return std::move(Buffer); } - string ProcessReader::ReadSizeString(uint64_t Size, uint64_t Address) + String ProcessReader::ReadSizeString(uint64_t Size, uint64_t Address) { if (!this->BaseStream) IOError::StreamBaseStream(); - auto Buffer = string((uint32_t)Size, '\0'); + auto Buffer = String((uint32_t)Size, '\0'); this->BaseStream->Read((uint8_t*)&Buffer[0], 0, Size, Address); return std::move(Buffer); @@ -127,7 +127,7 @@ namespace IO return Count; } - int64_t ProcessReader::SignatureScan(const string& Signature, bool ScanAllMemory) + int64_t ProcessReader::SignatureScan(const String& Signature, bool ScanAllMemory) { auto BaseAddress = this->GetBaseAddress(); auto ScanSize = (ScanAllMemory) ? this->GetMemorySize() : this->GetSizeOfCode(); @@ -135,7 +135,7 @@ namespace IO return this->SignatureScan(Signature, BaseAddress, ScanSize); } - int64_t ProcessReader::SignatureScan(const string& Signature, uint64_t Address, uint64_t Count) + int64_t ProcessReader::SignatureScan(const String& Signature, uint64_t Address, uint64_t Count) { if (!this->BaseStream) IOError::StreamBaseStream(); @@ -159,7 +159,7 @@ namespace IO return SearchResult; } - List ProcessReader::SignatureScanAll(const string & Signature, bool ScanAllMemory) + List ProcessReader::SignatureScanAll(const String & Signature, bool ScanAllMemory) { auto BaseAddress = this->GetBaseAddress(); auto ScanSize = (ScanAllMemory) ? this->GetMemorySize() : this->GetSizeOfCode(); @@ -167,7 +167,7 @@ namespace IO return this->SignatureScanAll(Signature, BaseAddress, ScanSize); } - List ProcessReader::SignatureScanAll(const string & Signature, uint64_t Address, uint64_t Count) + List ProcessReader::SignatureScanAll(const String & Signature, uint64_t Address, uint64_t Count) { if (!this->BaseStream) IOError::StreamBaseStream(); diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessReader.h b/r5dev/thirdparty/cppnet/cppkore/ProcessReader.h index f3ffee3b..7fed508a 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessReader.h +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessReader.h @@ -40,22 +40,22 @@ namespace IO uint64_t Read(void* Buffer, uint64_t Index, uint64_t Count, uint64_t Address); // Reads a null-terminated string from the stream - string ReadCString(uint64_t Address); + String ReadCString(uint64_t Address); // Reads a size-string from the stream - string ReadSizeString(uint64_t Size, uint64_t Address); + String ReadSizeString(uint64_t Size, uint64_t Address); // Reads an integer encoded into 7 bits, top bit = read more uint32_t ReadVarInt(uint64_t Address); // Scan the process for a given signature - int64_t SignatureScan(const string& Signature, bool ScanAllMemory = false); + int64_t SignatureScan(const String& Signature, bool ScanAllMemory = false); // Scan the process for a given signature - int64_t SignatureScan(const string& Signature, uint64_t Address, uint64_t Count); + int64_t SignatureScan(const String& Signature, uint64_t Address, uint64_t Count); // Scan the process for a given signature (All occurences) - List SignatureScanAll(const string& Signature, bool ScanAllMemory = false); + List SignatureScanAll(const String& Signature, bool ScanAllMemory = false); // Scan the process for a given signature (All occurences) - List SignatureScanAll(const string& Signature, uint64_t Address, uint64_t Count); + List SignatureScanAll(const String& Signature, uint64_t Address, uint64_t Count); // Whether or not the process is running bool IsRunning() const; diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessStartInfo.h b/r5dev/thirdparty/cppnet/cppkore/ProcessStartInfo.h index f2357d24..e68b5f31 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessStartInfo.h +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessStartInfo.h @@ -16,13 +16,13 @@ namespace Diagnostics struct ProcessStartInfo { // Sets the application, document, or URL that is to be launched. - string FileName; + String FileName; // Specifies the set of command line arguments to use when starting the application. - string Arguments; + String Arguments; // Sets the initial directory for the process that is started. - string WorkingDirectory; + String WorkingDirectory; // Specifies the verb to use when opening the filename. - string Verb; + String Verb; // Whether or not to allow window creation. bool CreateNoWindow; @@ -32,12 +32,12 @@ namespace Diagnostics // Sets the style of window that should be used for the newly created process. ProcessWindowStyle WindowStyle; - ProcessStartInfo(const string& FileName) + ProcessStartInfo(const String& FileName) : FileName(FileName), UseShellExecute(true), CreateNoWindow(false), WindowStyle(ProcessWindowStyle::Normal) { } - ProcessStartInfo(const string& FileName, const string& Arguments) + ProcessStartInfo(const String& FileName, const String& Arguments) : FileName(FileName), Arguments(Arguments), UseShellExecute(true), CreateNoWindow(false), WindowStyle(ProcessWindowStyle::Normal) { } diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessStream.cpp b/r5dev/thirdparty/cppnet/cppkore/ProcessStream.cpp index 87194e24..49adec1b 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessStream.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessStream.cpp @@ -14,7 +14,7 @@ namespace IO this->SetupStream(OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID), false); } - ProcessStream::ProcessStream(const string& ProcessName) + ProcessStream::ProcessStream(const String& ProcessName) { DWORD aProcesses[1024], cbNeeded, cProcesses; EnumProcesses(aProcesses, sizeof(aProcesses), &cbNeeded); diff --git a/r5dev/thirdparty/cppnet/cppkore/ProcessStream.h b/r5dev/thirdparty/cppnet/cppkore/ProcessStream.h index ba28cc78..a02bffd9 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ProcessStream.h +++ b/r5dev/thirdparty/cppnet/cppkore/ProcessStream.h @@ -13,7 +13,7 @@ namespace IO public: ProcessStream(); ProcessStream(uint32_t PID); - ProcessStream(const string& ProcessName); + ProcessStream(const String& ProcessName); ProcessStream(HANDLE ProcessHandle); ProcessStream(HANDLE ProcessHandle, bool LeaveOpen); virtual ~ProcessStream(); diff --git a/r5dev/thirdparty/cppnet/cppkore/RegistryKey.cpp b/r5dev/thirdparty/cppnet/cppkore/RegistryKey.cpp index a99ae87c..e762f7ad 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RegistryKey.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/RegistryKey.cpp @@ -36,12 +36,12 @@ namespace Win32 RegFlushKey(this->_Handle); } - RegistryKey RegistryKey::CreateSubKey(const string& SubKey) + RegistryKey RegistryKey::CreateSubKey(const String& SubKey) { return this->CreateSubKeyInternal(SubKey); } - void RegistryKey::DeleteSubKey(const string& SubKey, bool ThrowOnMissingSubKey) + void RegistryKey::DeleteSubKey(const String& SubKey, bool ThrowOnMissingSubKey) { auto kPath = FixupName(SubKey); // Remove multiple slashes to a single slash @@ -67,7 +67,7 @@ namespace Win32 } } - void RegistryKey::DeleteSubKeyTree(const string& SubKey, bool ThrowOnMissingSubKey) + void RegistryKey::DeleteSubKeyTree(const String& SubKey, bool ThrowOnMissingSubKey) { if (SubKey.Length() == 0 && IsSystemKey()) throw Win32Error::RegSubKeyMalformed(); @@ -96,7 +96,7 @@ namespace Win32 RegDeleteKeyExA(this->_Handle, (const char*)kPath, (int)this->_View, NULL); } - void RegistryKey::DeleteValue(const string& Name, bool ThrowOnMissingSubKey) + void RegistryKey::DeleteValue(const String& Name, bool ThrowOnMissingSubKey) { auto hResult = RegDeleteValueA(this->_Handle, (const char*)Name); @@ -105,7 +105,7 @@ namespace Win32 throw Win32Error::RegSubKeyMissing(); } - RegistryKey RegistryKey::OpenSubKey(const string& Name, bool Writable) + RegistryKey RegistryKey::OpenSubKey(const String& Name, bool Writable) { HKEY hHandle = nullptr; auto hAccess = (Writable) ? (KEY_READ | KEY_WRITE) : KEY_READ; @@ -123,10 +123,10 @@ namespace Win32 throw Win32Error::SystemError(GetLastError()); } - List RegistryKey::GetValueNames() + List RegistryKey::GetValueNames() { auto nValues = this->InternalValueCount(); - auto Result = List(); + auto Result = List(); for (uint32_t i = 0; i < nValues; i++) { @@ -141,7 +141,7 @@ namespace Win32 return Result; } - RegistryValueType RegistryKey::GetValueKind(const string& Name) + RegistryValueType RegistryKey::GetValueKind(const String& Name) { DWORD Type = 0, DataSize = 0; auto qResult = RegQueryValueExA(this->_Handle, (const char*)Name, NULL, &Type, NULL, &DataSize); @@ -183,7 +183,7 @@ namespace Win32 return this->InternalValueCount(); } - List RegistryKey::GetSubKeyNames() + List RegistryKey::GetSubKeyNames() { return this->InternalGetSubKeyNames(); } @@ -218,7 +218,7 @@ namespace Win32 return (this->_State & RegistryKey::STATE_WRITEACCESS) != 0; } - RegistryKey RegistryKey::CreateSubKeyInternal(const string& SubKey) + RegistryKey RegistryKey::CreateSubKeyInternal(const String& SubKey) { auto kPath = FixupName(SubKey); // Remove multiple slashes to a single slash @@ -250,7 +250,7 @@ namespace Win32 throw Win32Error::SystemError(GetLastError()); } - void RegistryKey::DeleteSubKeyTreeInternal(const string& SubKey) + void RegistryKey::DeleteSubKeyTreeInternal(const String& SubKey) { try { @@ -273,7 +273,7 @@ namespace Win32 RegDeleteKeyExA(this->_Handle, (const char*)SubKey, (int)this->_View, NULL); } - RegistryKey RegistryKey::InternalOpenSubKey(const string& Name, bool Writable) + RegistryKey RegistryKey::InternalOpenSubKey(const String& Name, bool Writable) { HKEY hHandle = nullptr; auto hAccess = (Writable) ? (KEY_READ | KEY_WRITE) : KEY_READ; @@ -290,7 +290,7 @@ namespace Win32 throw Win32Error::SystemError(GetLastError()); } - std::unique_ptr RegistryKey::InternalGetValue(const string& Name, uint64_t& ValueSize) + std::unique_ptr RegistryKey::InternalGetValue(const String& Name, uint64_t& ValueSize) { DWORD Type = 0, DataSize = 0; auto qResult = RegQueryValueExA(this->_Handle, (const char*)Name, NULL, &Type, NULL, &DataSize); @@ -306,7 +306,7 @@ namespace Win32 return ResultBuffer; } - void RegistryKey::InternalSetValue(const string& Name, uint32_t ValueType, uint8_t* Buffer, uint64_t BufferSize) + void RegistryKey::InternalSetValue(const String& Name, uint32_t ValueType, uint8_t* Buffer, uint64_t BufferSize) { auto hResult = RegSetValueExA(this->_Handle, (const char*)Name, NULL, ValueType, Buffer, (DWORD)BufferSize); if (hResult != ERROR_SUCCESS) @@ -329,9 +329,9 @@ namespace Win32 return (uint32_t)Values; } - List RegistryKey::InternalGetSubKeyNames() + List RegistryKey::InternalGetSubKeyNames() { - auto Result = List(); + auto Result = List(); auto sCount = this->InternalSubKeyCount(); char Buffer[RegistryKey::MaxKeyLength + 1]{}; @@ -349,18 +349,18 @@ namespace Win32 return Result; } - string RegistryKey::FixupName(string Name) + String RegistryKey::FixupName(String Name) { RegistryKey::FixupPath(Name); auto eChar = Name.Length() - 1; if (eChar >= 0 && Name[eChar] == '\\') - return Name.Substring(0, eChar); + return Name.SubString(0, eChar); return Name; } - void RegistryKey::FixupPath(string& Path) + void RegistryKey::FixupPath(String& Path) { // Replace double slash with single slashes Path = Path.Replace("\\\\", "\\"); diff --git a/r5dev/thirdparty/cppnet/cppkore/RegistryKey.h b/r5dev/thirdparty/cppnet/cppkore/RegistryKey.h index 1ab47fba..0943eebe 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RegistryKey.h +++ b/r5dev/thirdparty/cppnet/cppkore/RegistryKey.h @@ -26,31 +26,31 @@ namespace Win32 // Flush all pending changes to the disk void Flush(); // Creates a new subkey - RegistryKey CreateSubKey(const string& SubKey); + RegistryKey CreateSubKey(const String& SubKey); // Deletes a subkey - void DeleteSubKey(const string& SubKey, bool ThrowOnMissingSubKey = false); + void DeleteSubKey(const String& SubKey, bool ThrowOnMissingSubKey = false); // Deletes a subkey and all nested values - void DeleteSubKeyTree(const string& SubKey, bool ThrowOnMissingSubKey = false); + void DeleteSubKeyTree(const String& SubKey, bool ThrowOnMissingSubKey = false); // Deletes a value - void DeleteValue(const string& Name, bool ThrowOnMissingSubKey = false); + void DeleteValue(const String& Name, bool ThrowOnMissingSubKey = false); // Opens a subkey of this instance - RegistryKey OpenSubKey(const string& Name, bool Writable = true); + RegistryKey OpenSubKey(const String& Name, bool Writable = true); // Returns a value template - auto GetValue(const string& Name); + auto GetValue(const String& Name); // Returns a list of value names - List GetValueNames(); + List GetValueNames(); // Returns the type of value this key is - RegistryValueType GetValueKind(const string& Name); + RegistryValueType GetValueKind(const String& Name); // Sets a value template - void SetValue(const string& Name, const Tval& Value); + void SetValue(const String& Name, const Tval& Value); // Returns the count of subkeys uint32_t GetSubKeyCount(); // Returns the count of values uint32_t GetValueCount(); // Returns the subkey names - List GetSubKeyNames(); + List GetSubKeyNames(); // Opens one of the base registry hives on the system static RegistryKey OpenBaseKey(RegistryHive Hive, RegistryView View); @@ -62,7 +62,7 @@ namespace Win32 HKEY _Handle; uint32_t _State; RegistryView _View; - string _KeyName; + String _KeyName; // Helper routines bool IsDirty(); @@ -70,26 +70,26 @@ namespace Win32 bool IsWritable(); // Internal routine to create a subkeu - RegistryKey CreateSubKeyInternal(const string& SubKey); + RegistryKey CreateSubKeyInternal(const String& SubKey); // Internal routine to delete a subkey tree - void DeleteSubKeyTreeInternal(const string& SubKey); + void DeleteSubKeyTreeInternal(const String& SubKey); // Internal routine to open a subkey - RegistryKey InternalOpenSubKey(const string& SubKey, bool Writable); + RegistryKey InternalOpenSubKey(const String& SubKey, bool Writable); // Internal routine to get a value - std::unique_ptr InternalGetValue(const string& Name, uint64_t& ValueSize); + std::unique_ptr InternalGetValue(const String& Name, uint64_t& ValueSize); // Internal routine to set a value - void InternalSetValue(const string& Name, uint32_t ValueType, uint8_t* Buffer, uint64_t BufferSize); + void InternalSetValue(const String& Name, uint32_t ValueType, uint8_t* Buffer, uint64_t BufferSize); // Internal routine to get subkey count uint32_t InternalSubKeyCount(); // Internal routine to get value count uint32_t InternalValueCount(); // Internal routine to get subkey names - List InternalGetSubKeyNames(); + List InternalGetSubKeyNames(); // Cleans up a key name - static string FixupName(string Name); + static String FixupName(String Name); // Cleans up a key path - static void FixupPath(string& Path); + static void FixupPath(String& Path); // Internal key states constexpr static uint32_t STATE_DIRTY = 0x1; @@ -114,7 +114,7 @@ namespace Win32 }; template - inline auto RegistryKey::GetValue(const string& Name) + inline auto RegistryKey::GetValue(const String& Name) { uint64_t BufferSize = 0; auto Buffer = this->InternalGetValue(Name, BufferSize); @@ -133,18 +133,18 @@ namespace Win32 } else if constexpr (T == RegistryValueType::String) { - return string((const char*)Buffer.get()); + return String((const char*)Buffer.get()); } else if constexpr (T == RegistryValueType::MultiString) { - auto Result = List(); + auto Result = List(); uint64_t Position = 0; - // We must parse each string as we go, and ensure we haven't reached the buffer size + // We must parse each String as we go, and ensure we haven't reached the buffer size while (Position < BufferSize) { // Read the str with strlen() because it doesn't store the size of each one - auto cStr = string((const char*)(Buffer.get() + Position)); + auto cStr = String((const char*)(Buffer.get() + Position)); // Shift based on the size + null char... Position += cStr.Length() + sizeof(char); @@ -169,7 +169,7 @@ namespace Win32 } template - inline void RegistryKey::SetValue(const string& Name, const Tval& Value) + inline void RegistryKey::SetValue(const String& Name, const Tval& Value) { if constexpr (T == RegistryValueType::Dword) { diff --git a/r5dev/thirdparty/cppnet/cppkore/RenderFont.cpp b/r5dev/thirdparty/cppnet/cppkore/RenderFont.cpp index a3addf0e..6f28abe1 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RenderFont.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/RenderFont.cpp @@ -55,7 +55,7 @@ namespace Assets Initialized = true; } - void RenderFont::LoadFont(const string& FontPath) + void RenderFont::LoadFont(const String& FontPath) { this->Dispose(); @@ -95,7 +95,7 @@ namespace Assets RenderStringInternal(Text, (uint32_t)strlen(Text), X, Y, Scale); } - void RenderFont::RenderString(const string & Text, float X, float Y, float Scale) + void RenderFont::RenderString(const String & Text, float X, float Y, float Scale) { RenderStringInternal((const char*)Text, Text.Length(), X, Y, Scale); } diff --git a/r5dev/thirdparty/cppnet/cppkore/RenderFont.h b/r5dev/thirdparty/cppnet/cppkore/RenderFont.h index 7b6d1778..e8778857 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RenderFont.h +++ b/r5dev/thirdparty/cppnet/cppkore/RenderFont.h @@ -17,12 +17,12 @@ namespace Assets // Loads a font from the provided LZ4 compressed buffer void LoadFont(const uint8_t* Buffer, uint64_t BufferLength); // Loads a font from the provided file path. - void LoadFont(const string& FontPath); + void LoadFont(const String& FontPath); // Renders a string to the current opengl context. void RenderString(const char* Text, float X, float Y, float Scale = 1.f); // Renders a string to the current opengl context. - void RenderString(const string& Text, float X, float Y, float Scale = 1.f); + void RenderString(const String& Text, float X, float Y, float Scale = 1.f); private: diff --git a/r5dev/thirdparty/cppnet/cppkore/RenderShader.cpp b/r5dev/thirdparty/cppnet/cppkore/RenderShader.cpp index 8d0343f8..8a8619ff 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RenderShader.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/RenderShader.cpp @@ -44,7 +44,7 @@ namespace Assets glDeleteShader(FragShaderID); } - void RenderShader::LoadShader(const string& VertPath, const string& FragPath) + void RenderShader::LoadShader(const String& VertPath, const String& FragPath) { auto VertShaderID = glCreateShader(GL_VERTEX_SHADER); auto FragShaderID = glCreateShader(GL_FRAGMENT_SHADER); diff --git a/r5dev/thirdparty/cppnet/cppkore/RenderShader.h b/r5dev/thirdparty/cppnet/cppkore/RenderShader.h index 41de2cef..08faffa4 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RenderShader.h +++ b/r5dev/thirdparty/cppnet/cppkore/RenderShader.h @@ -15,7 +15,7 @@ namespace Assets // Compiles the release shader, internal use only. void LoadShader(const char* VertSource, const char* FragSource); // Compiles the debug shader. - void LoadShader(const string& VertPath, const string& FragPath); + void LoadShader(const String& VertPath, const String& FragPath); // Sets this shader as current. void Use(); diff --git a/r5dev/thirdparty/cppnet/cppkore/RetrieveVirtualItemEventArgs.h b/r5dev/thirdparty/cppnet/cppkore/RetrieveVirtualItemEventArgs.h index 8f6fbdc8..a710350f 100644 --- a/r5dev/thirdparty/cppnet/cppkore/RetrieveVirtualItemEventArgs.h +++ b/r5dev/thirdparty/cppnet/cppkore/RetrieveVirtualItemEventArgs.h @@ -18,7 +18,7 @@ namespace Forms // The sub item index. const int32_t SubItemIndex; // The text of the item. - string Text; + String Text; // The style of the item. ListViewItemStyle Style; }; diff --git a/r5dev/thirdparty/cppnet/cppkore/SEAsset.cpp b/r5dev/thirdparty/cppnet/cppkore/SEAsset.cpp index 91091e86..6edb3115 100644 --- a/r5dev/thirdparty/cppnet/cppkore/SEAsset.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/SEAsset.cpp @@ -72,7 +72,7 @@ namespace Assets::Exporters SEANIM_PRESENCE_CUSTOM = 1 << 7, }; - bool SEAsset::ExportAnimation(const Animation& Animation, const string& Path) + bool SEAsset::ExportAnimation(const Animation& Animation, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); @@ -85,10 +85,10 @@ namespace Assets::Exporters uint32_t Slots[3] = { 0, 0, 0 }; // This is a traditional map of bones for the format - List Bones; + List Bones; { - Dictionary SEBones; + Dictionary SEBones; for (auto& Kvp : Animation.Curves) { @@ -371,7 +371,7 @@ namespace Assets::Exporters return true; } - bool SEAsset::ExportModel(const Model& Model, const string& Path) + bool SEAsset::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); diff --git a/r5dev/thirdparty/cppnet/cppkore/SEAsset.h b/r5dev/thirdparty/cppnet/cppkore/SEAsset.h index 70321116..0e7e12f0 100644 --- a/r5dev/thirdparty/cppnet/cppkore/SEAsset.h +++ b/r5dev/thirdparty/cppnet/cppkore/SEAsset.h @@ -12,9 +12,9 @@ namespace Assets::Exporters ~SEAsset() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.cpp b/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.cpp index 0a2b742c..7cb94e84 100644 --- a/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.cpp @@ -5,9 +5,9 @@ namespace Forms { - const string BuildSaveFileFilter(const string& Filter) + const String BuildSaveFileFilter(const String& Filter) { - string InitialFilter = (string::IsNullOrWhiteSpace(Filter)) ? string(" |*.*") : Filter; + String InitialFilter = (String::IsNullOrWhiteSpace(Filter)) ? String(" |*.*") : Filter; auto Buffer = std::make_unique((size_t)InitialFilter.Length() + 2); // Final filter has two null chars auto BufferMask = (char*)Buffer.get(); @@ -21,10 +21,10 @@ namespace Forms BufferMask[InitialFilter.Length() + 1] = (char)0; - return string((char*)Buffer.get(), (size_t)InitialFilter.Length() + 1); + return String((char*)Buffer.get(), (size_t)InitialFilter.Length() + 1); } - string SaveFileDialog::ShowFileDialog(const string& Title, const string& BasePath, const string& Filter, Control* Owner) + String SaveFileDialog::ShowFileDialog(const String& Title, const String& BasePath, const String& Filter, Control* Owner) { HWND OwnerHandle = (Owner != nullptr) ? Owner->GetHandle() : NULL; char Buffer[MAX_PATH]{}; @@ -43,7 +43,7 @@ namespace Forms // Open the dialog with the config and then return result if (GetSaveFileNameA(&oFileDialog)) - return string(Buffer); + return String(Buffer); // We need nothing as a default because we don't get a return value return ""; diff --git a/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.h b/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.h index f61d7629..7f3dedca 100644 --- a/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.h +++ b/r5dev/thirdparty/cppnet/cppkore/SaveFileDialog.h @@ -13,6 +13,6 @@ namespace Forms { public: // Opens the dialog and allows the user to save one file - static string ShowFileDialog(const string& Title, const string& BasePath = "", const string& Filter = " |*.*", Control* Owner = nullptr); + static String ShowFileDialog(const String& Title, const String& BasePath = "", const String& Filter = " |*.*", Control* Owner = nullptr); }; } diff --git a/r5dev/thirdparty/cppnet/cppkore/SecureString.h b/r5dev/thirdparty/cppnet/cppkore/SecureString.h index efdfa1d8..aef63db6 100644 --- a/r5dev/thirdparty/cppnet/cppkore/SecureString.h +++ b/r5dev/thirdparty/cppnet/cppkore/SecureString.h @@ -37,9 +37,9 @@ namespace Data } // Returns a decoded version of the encoded string - string GetDecoded() const + String GetDecoded() const { - auto Result = string(_Buffer, (uint32_t)Size); + auto Result = String(_Buffer, (uint32_t)Size); auto Key = Size * 2; for (auto& Ch : Result) @@ -48,9 +48,9 @@ namespace Data return Result; } - constexpr operator string(void) const + constexpr operator String(void) const { - auto Result = string(_Buffer, (uint32_t)Size); + auto Result = String(_Buffer, (uint32_t)Size); auto Key = Size * 2; for (auto& Ch : Result) @@ -66,7 +66,7 @@ namespace Data template // Creates a new compile-time encrypted string -static constexpr auto sstring(const char(&String)[Size]) +static constexpr auto sString(const char(&String)[Size]) { return Data::SecureString(String); } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/Settings.cpp b/r5dev/thirdparty/cppnet/cppkore/Settings.cpp index 4b723050..6e26aef4 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Settings.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Settings.cpp @@ -11,7 +11,7 @@ namespace System { } - SettingsObject::SettingsObject(string Key, SettingType Type, uint8_t* Value) + SettingsObject::SettingsObject(String Key, SettingType Type, uint8_t* Value) : Key(Key), Type(Type), Values() { switch (Type) @@ -42,7 +42,7 @@ namespace System delete[] Values.String; } - void Settings::Load(const string& Path) + void Settings::Load(const String& Path) { auto Reader = IO::BinaryReader(IO::File::OpenRead(Path)); @@ -101,7 +101,7 @@ namespace System } } - void Settings::Save(const string& Path) + void Settings::Save(const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); @@ -130,7 +130,7 @@ namespace System break; case SettingType::ProtectedString: { - auto Value = string(Setting.Values.String); + auto Value = String(Setting.Values.String); auto ValueLen = Value.Length(); for (uint32_t i = 0; i < ValueLen; i++) diff --git a/r5dev/thirdparty/cppnet/cppkore/Settings.h b/r5dev/thirdparty/cppnet/cppkore/Settings.h index daba7398..5272e39e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Settings.h +++ b/r5dev/thirdparty/cppnet/cppkore/Settings.h @@ -25,10 +25,10 @@ namespace System { public: SettingsObject(); - SettingsObject(string Key, SettingType Type, uint8_t* Value); + SettingsObject(String Key, SettingType Type, uint8_t* Value); ~SettingsObject(); - string Key; + String Key; SettingType Type; union ValueUn @@ -118,7 +118,7 @@ namespace System if (Setting.Values.String != NULL) delete[] Setting.Values.String; - if constexpr (std::is_same::value) + if constexpr (std::is_same::value) { Setting.Values.String = new char[Value.Length() + 1]{}; std::memcpy(Setting.Values.String, (const char*)Value, Value.Length()); @@ -246,16 +246,16 @@ namespace System else if constexpr (T == SettingType::String || T == SettingType::ProtectedString) { if (Value) - return (string)Value->Values.String; + return (String)Value->Values.String; - return (string)""; + return (String)""; } } // Load the config file from the specified path. - void Load(const string& Path); + void Load(const String& Path); // Save the config file to the specified path. - void Save(const string& Path); + void Save(const String& Path); private: // Internal cached settings diff --git a/r5dev/thirdparty/cppnet/cppkore/StreamWriter.cpp b/r5dev/thirdparty/cppnet/cppkore/StreamWriter.cpp index d60d08a7..3348649e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/StreamWriter.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/StreamWriter.cpp @@ -68,12 +68,12 @@ namespace IO this->BaseStream->Write((uint8_t*)&Buffer[0], Index, Count); } - void StreamWriter::Write(const string& Value) + void StreamWriter::Write(const String& Value) { this->Write((const char*)Value, 0, Value.Length()); } - void StreamWriter::WriteLine(const string& Value) + void StreamWriter::WriteLine(const String& Value) { TextWriter::WriteLine((const char*)Value, 0, Value.Length()); } diff --git a/r5dev/thirdparty/cppnet/cppkore/StreamWriter.h b/r5dev/thirdparty/cppnet/cppkore/StreamWriter.h index a585e676..f53d1c68 100644 --- a/r5dev/thirdparty/cppnet/cppkore/StreamWriter.h +++ b/r5dev/thirdparty/cppnet/cppkore/StreamWriter.h @@ -25,9 +25,9 @@ namespace IO virtual void Write(const char* Buffer, uint32_t Index, uint32_t Count); // Writes a string to the file - void Write(const string& Value); + void Write(const String& Value); // Writes a string to the file and ends the line - void WriteLine(const string& Value); + void WriteLine(const String& Value); // Writes a null-terminated string to the file void Write(const char* Value); diff --git a/r5dev/thirdparty/cppnet/cppkore/StringBase.h b/r5dev/thirdparty/cppnet/cppkore/StringBase.h index f9b516db..1c67e900 100644 --- a/r5dev/thirdparty/cppnet/cppkore/StringBase.h +++ b/r5dev/thirdparty/cppnet/cppkore/StringBase.h @@ -127,9 +127,9 @@ public: constexpr bool Contains(std::basic_string_view Rhs) const; // Returns a substring of this string - constexpr StringBase Substring(uint32_t StartIndex) const; + constexpr StringBase SubString(uint32_t StartIndex) const; // Returns a substring of this string - constexpr StringBase Substring(uint32_t StartIndex, uint32_t Length) const; + constexpr StringBase SubString(uint32_t StartIndex, uint32_t Length) const; // Appends a character to this string constexpr void Append(Tchar Rhs); @@ -467,14 +467,14 @@ inline constexpr List> StringBase::Split(const Tchar De // Optimized for large strings and lots of occurences while ((LocatedPosition = this->IndexOf(Delimiter, CurrentIndex)) != StringBase::InvalidPosition) { - Result.Emplace(this->Substring(CurrentIndex, LocatedPosition - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex)); // Advance past the size of old and the position CurrentIndex = LocatedPosition + 1; } if (CurrentIndex != this->_StoreSize) - Result.Emplace(this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex)); return Result; } @@ -495,14 +495,14 @@ inline constexpr List> StringBase::Split(const Tchar* S // Optimized for large strings and lots of occurences while ((LocatedPosition = this->IndexOf(Separator, CurrentIndex)) != StringBase::InvalidPosition) { - Result.Emplace(this->Substring(CurrentIndex, LocatedPosition - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex)); // Advance past the size of old and the position CurrentIndex = LocatedPosition + LhsSize; } if (CurrentIndex != this->_StoreSize) - Result.Emplace(this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex)); return Result; } @@ -519,14 +519,14 @@ inline constexpr List> StringBase::Split(const StringBa // Optimized for large strings and lots of occurences while ((LocatedPosition = this->IndexOf(Separator, CurrentIndex)) != StringBase::InvalidPosition) { - Result.Emplace(this->Substring(CurrentIndex, LocatedPosition - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex)); // Advance past the size of old and the position CurrentIndex = LocatedPosition + LhsSize; } if (CurrentIndex != this->_StoreSize) - Result.Emplace(this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex)); return Result; } @@ -543,14 +543,14 @@ inline constexpr List> StringBase::Split(const std::bas // Optimized for large strings and lots of occurences while ((LocatedPosition = this->IndexOf(Separator, CurrentIndex)) != StringBase::InvalidPosition) { - Result.Emplace(this->Substring(CurrentIndex, LocatedPosition - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex)); // Advance past the size of old and the position CurrentIndex = LocatedPosition + LhsSize; } if (CurrentIndex != this->_StoreSize) - Result.Emplace(this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex)); + Result.Emplace(this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex)); return Result; } @@ -1073,7 +1073,7 @@ inline constexpr StringBase StringBase::Replace(const Tchar* Old, // Optimized for large strings and lots of occurences while ((LocatedPosition = this->IndexOf(Old, CurrentIndex)) != StringBase::InvalidPosition) { - Result += this->Substring(CurrentIndex, LocatedPosition - CurrentIndex); + Result += this->SubString(CurrentIndex, LocatedPosition - CurrentIndex); Result += New; // Advance past the size of old and the position @@ -1081,7 +1081,7 @@ inline constexpr StringBase StringBase::Replace(const Tchar* Old, } if (CurrentIndex != this->_StoreSize) - Result += this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex); + Result += this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex); return std::move(Result); } @@ -1097,7 +1097,7 @@ inline constexpr StringBase StringBase::Replace(const StringBaseIndexOf(Old, CurrentIndex)) != StringBase::InvalidPosition) { - Result += this->Substring(CurrentIndex, LocatedPosition - CurrentIndex); + Result += this->SubString(CurrentIndex, LocatedPosition - CurrentIndex); Result += New; // Advance past the size of old and the position @@ -1105,7 +1105,7 @@ inline constexpr StringBase StringBase::Replace(const StringBase_StoreSize) - Result += this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex); + Result += this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex); return std::move(Result); } @@ -1121,7 +1121,7 @@ inline constexpr StringBase StringBase::Replace(std::basic_string_ // Optimized for large strings and lots of occurences while ((LocatedPosition = this->IndexOf(Old, CurrentIndex)) != StringBase::InvalidPosition) { - Result += this->Substring(CurrentIndex, LocatedPosition - CurrentIndex); + Result += this->SubString(CurrentIndex, LocatedPosition - CurrentIndex); Result += New; // Advance past the size of old and the position @@ -1129,7 +1129,7 @@ inline constexpr StringBase StringBase::Replace(std::basic_string_ } if (CurrentIndex != this->_StoreSize) - Result += this->Substring(CurrentIndex, this->_StoreSize - CurrentIndex); + Result += this->SubString(CurrentIndex, this->_StoreSize - CurrentIndex); return std::move(Result); } @@ -1235,13 +1235,13 @@ inline constexpr bool StringBase::Contains(std::basic_string_view } template -inline constexpr StringBase StringBase::Substring(uint32_t StartIndex) const +inline constexpr StringBase StringBase::SubString(uint32_t StartIndex) const { - return this->Substring(StartIndex, this->_StoreSize - StartIndex); + return this->SubString(StartIndex, this->_StoreSize - StartIndex); } template -inline constexpr StringBase StringBase::Substring(uint32_t StartIndex, uint32_t Length) const +inline constexpr StringBase StringBase::SubString(uint32_t StartIndex, uint32_t Length) const { if (Length > 0 && StartIndex < this->_StoreSize && (StartIndex + Length) <= this->_StoreSize) { @@ -1635,7 +1635,5 @@ constexpr inline void StringBase::EnsureCapacity(uint32_t Capacity) // Predefiend string types // -using string = StringBase; using String = StringBase; -using wstring = StringBase; using WString = StringBase; \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/TextBox.cpp b/r5dev/thirdparty/cppnet/cppkore/TextBox.cpp index edcc4be8..b7bf0a77 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextBox.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/TextBox.cpp @@ -73,7 +73,7 @@ namespace Forms } } - void TextBox::SetText(const string& Value) + void TextBox::SetText(const String& Value) { TextBoxBase::SetText(Value); _SelectionSet = false; diff --git a/r5dev/thirdparty/cppnet/cppkore/TextBox.h b/r5dev/thirdparty/cppnet/cppkore/TextBox.h index 4ee3b1a2..74bce44b 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextBox.h +++ b/r5dev/thirdparty/cppnet/cppkore/TextBox.h @@ -48,7 +48,7 @@ namespace Forms void SetScrollBars(ScrollBars Value); // Sets the current text in the text box. - virtual void SetText(const string& Value); + virtual void SetText(const String& Value); // Gets how text is aligned in a TextBox control. HorizontalAlignment TextAlign(); diff --git a/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.cpp b/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.cpp index 82101837..a71edcd2 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.cpp @@ -151,9 +151,9 @@ namespace Forms } } - List TextBoxBase::Lines() + List TextBoxBase::Lines() { - List Result; + List Result; auto Buffer = this->Text(); uint32_t LineStart = 0; @@ -168,7 +168,7 @@ namespace Forms break; } - Result.EmplaceBack(Buffer.Substring(LineStart, LineEnd - LineStart)); + Result.EmplaceBack(Buffer.SubString(LineStart, LineEnd - LineStart)); // Treat "\r", "\r\n", and "\n" as new lines if (LineEnd < Buffer.Length() && Buffer[LineEnd] == '\r') @@ -185,9 +185,9 @@ namespace Forms return Result; } - void TextBoxBase::SetLines(const List& Value) + void TextBoxBase::SetLines(const List& Value) { - string Result = ""; + String Result = ""; for (auto& Line : Value) { @@ -212,12 +212,12 @@ namespace Forms } } - string TextBoxBase::Text() + String TextBoxBase::Text() { return Control::Text(); } - void TextBoxBase::SetText(const string& Value) + void TextBoxBase::SetText(const String& Value) { if (Value != Control::Text()) { @@ -250,7 +250,7 @@ namespace Forms } } - void TextBoxBase::AppendText(const string& Text) + void TextBoxBase::AppendText(const String& Text) { int32_t SelStart, SelLength; GetSelectionStartAndLength(SelStart, SelLength); @@ -369,7 +369,7 @@ namespace Forms return Cp; } - void TextBoxBase::SetWindowText(const string& Value) + void TextBoxBase::SetWindowText(const String& Value) { // Override to prevent double OnTextChanged events if (this->WindowText() != Value) @@ -391,7 +391,7 @@ namespace Forms SendMessageA(this->_Handle, EM_LIMITTEXT, (WPARAM)this->_MaxLength, NULL); } - void TextBoxBase::SetSelectedTextInternal(const string& Text, bool ClearUndo) + void TextBoxBase::SetSelectedTextInternal(const String& Text, bool ClearUndo) { SendMessageA(this->_Handle, EM_LIMITTEXT, 0, 0); @@ -552,15 +552,15 @@ namespace Forms } } - string TextBoxBase::SelectedText() + String TextBoxBase::SelectedText() { int32_t SelStart, SelLength; GetSelectionStartAndLength(SelStart, SelLength); - return Text().Substring(SelStart, SelLength); + return Text().SubString(SelStart, SelLength); } - void TextBoxBase::SetSelectedText(const string& Value) + void TextBoxBase::SetSelectedText(const String& Value) { SetSelectedTextInternal(Value, true); } diff --git a/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.h b/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.h index e50a14fd..e571f86c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.h +++ b/r5dev/thirdparty/cppnet/cppkore/TextBoxBase.h @@ -45,9 +45,9 @@ namespace Forms void SetHideSelection(bool Value); // Gets the lines of text in an text box control. - List Lines(); + List Lines(); // Sets the lines of text in an text box control. - void SetLines(const List& Value); + void SetLines(const List& Value); // Gets the maximum number of characters the user can type into the text box control. virtual uint32_t MaxLength(); @@ -75,9 +75,9 @@ namespace Forms void SetReadOnly(bool Value); // Gets the currently selected text in the control. - virtual string SelectedText(); + virtual String SelectedText(); // Sets the currently selected text in the control. - virtual void SetSelectedText(const string& Value); + virtual void SetSelectedText(const String& Value); // Gets the number of characters selected in the text box. virtual int32_t SelectionLength(); @@ -90,9 +90,9 @@ namespace Forms void SetSelectionStart(int32_t Value); // Gets the current text in the text box. - virtual string Text(); + virtual String Text(); // Sets the current text in the text box. - virtual void SetText(const string& Value); + virtual void SetText(const String& Value); // Gets the length of the text in the control. virtual uint32_t TextLength(); @@ -103,7 +103,7 @@ namespace Forms void SetWordWrap(bool Value); // Append text to the current text of the text box. - void AppendText(const string& Text); + void AppendText(const String& Text); // Clears all the text from the text box control. void Clear(); @@ -157,14 +157,14 @@ namespace Forms virtual CreateParams GetCreateParams(); // Sets the current text of the Window - virtual void SetWindowText(const string& Value); + virtual void SetWindowText(const String& Value); // Whether or not this control can raise the text changed event. virtual bool CanRaiseTextChangedEvent(); // Updates the controls max length property. virtual void UpdateMaxLength(); // Internal routine to set the selected text. - virtual void SetSelectedTextInternal(const string& Text, bool ClearUndo); + virtual void SetSelectedTextInternal(const String& Text, bool ClearUndo); // Internal routine to perform actual selection. virtual void SelectInternal(int32_t Start, int32_t Length, int32_t TextLen); diff --git a/r5dev/thirdparty/cppnet/cppkore/TextReader.cpp b/r5dev/thirdparty/cppnet/cppkore/TextReader.cpp index 1f41d178..2c279762 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextReader.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/TextReader.cpp @@ -20,11 +20,11 @@ namespace IO return n; } - string TextReader::ReadToEnd() + String TextReader::ReadToEnd() { char Buffer[4097]{}; uint32_t Length = 0; - auto Result = string(); + auto Result = String(); while ((Length = Read(Buffer, 0, 4096)) != 0) Result.Append(Buffer, Length); @@ -32,9 +32,9 @@ namespace IO return std::move(Result); } - string TextReader::ReadLine() + String TextReader::ReadLine() { - auto Result = string(); + auto Result = String(); while (true) { diff --git a/r5dev/thirdparty/cppnet/cppkore/TextReader.h b/r5dev/thirdparty/cppnet/cppkore/TextReader.h index c21c836d..e7407f3e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextReader.h +++ b/r5dev/thirdparty/cppnet/cppkore/TextReader.h @@ -21,10 +21,10 @@ namespace IO virtual int32_t Read(char* Buffer, uint32_t Index, uint32_t Count); // Reads all characters from the current position to the end of the // TextReader, and returns them as one string. - virtual string ReadToEnd(); + virtual String ReadToEnd(); // Reads a line. A line is defined as a sequence of characters followed by // a carriage return ('\r'), a line feed ('\n'), or a carriage return // immediately followed by a line feed. - virtual string ReadLine(); + virtual String ReadLine(); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/TextRenderer.cpp b/r5dev/thirdparty/cppnet/cppkore/TextRenderer.cpp index 66b29454..b6d38a1a 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextRenderer.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/TextRenderer.cpp @@ -3,7 +3,7 @@ namespace Drawing { - void TextRenderer::DrawText(HDC hDC, const string& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags) + void TextRenderer::DrawText(HDC hDC, const String& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags) { SelectObject(hDC, Font.GetFontHandle()); SetBkMode(hDC, TRANSPARENT); // Default text rendering doesn't have a background. @@ -23,7 +23,7 @@ namespace Drawing DrawTextExA(hDC, (LPSTR)Text.ToCString(), Text.Length(), &RcDraw, (UINT)Flags, &Params); } - void TextRenderer::DrawText(std::unique_ptr& Graphics, const string& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags) + void TextRenderer::DrawText(std::unique_ptr& Graphics, const String& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags) { auto hDC = Graphics->GetHDC(); DrawText(hDC, Text, Font, Bounds, ForeColor, Flags); diff --git a/r5dev/thirdparty/cppnet/cppkore/TextRenderer.h b/r5dev/thirdparty/cppnet/cppkore/TextRenderer.h index d2ea08bd..c512ffd0 100644 --- a/r5dev/thirdparty/cppnet/cppkore/TextRenderer.h +++ b/r5dev/thirdparty/cppnet/cppkore/TextRenderer.h @@ -19,8 +19,8 @@ namespace Drawing public: // Draws the specified text at the specified bounds using the provided color and format flags. - static void DrawText(HDC hDC, const string& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags = TextFormatFlags::Default); + static void DrawText(HDC hDC, const String& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags = TextFormatFlags::Default); // Draws the specified text at the specified bounds using the provided color and format flags. - static void DrawText(std::unique_ptr& Graphics, const string& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags = TextFormatFlags::Default); + static void DrawText(std::unique_ptr& Graphics, const String& Text, Font& Font, Rectangle Bounds, Color ForeColor, TextFormatFlags Flags = TextFormatFlags::Default); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/Texture.cpp b/r5dev/thirdparty/cppnet/cppkore/Texture.cpp index 5c5f7405..7db951fb 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Texture.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Texture.cpp @@ -194,7 +194,7 @@ namespace Assets } } - void Texture::Save(const string& File) + void Texture::Save(const String& File) { if (File.EndsWith(".dds")) this->Save(File, SaveFileType::Dds); @@ -218,7 +218,7 @@ namespace Assets throw std::exception("Unknown image file extension"); } - void Texture::Save(const string& File, SaveFileType Type) + void Texture::Save(const String& File, SaveFileType Type) { this->EnsureFormatForType(Type); HRESULT SaveResult = 0; @@ -310,7 +310,7 @@ namespace Assets std::memcpy(Buffer, TemporaryBuffer.GetBufferPointer(), min(TemporaryBuffer.GetBufferSize(), BufferLength)); } - Texture Texture::FromFile(const string& File) + Texture Texture::FromFile(const String& File) { Texture Result; DirectX::TexMetadata MetaData; @@ -339,7 +339,7 @@ namespace Assets return std::move(Result); } - Texture Texture::FromFile(const string& File, TextureType Type) + Texture Texture::FromFile(const String& File, TextureType Type) { Texture Result; DirectX::TexMetadata MetaData; diff --git a/r5dev/thirdparty/cppnet/cppkore/Texture.h b/r5dev/thirdparty/cppnet/cppkore/Texture.h index c08df07f..7c700927 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Texture.h +++ b/r5dev/thirdparty/cppnet/cppkore/Texture.h @@ -107,18 +107,18 @@ namespace Assets ; void Transcode(TranscodeType Type); // Saves the texture to the specified file path - void Save(const string& File); + void Save(const String& File); // Saves the texture to the specified path with the specified file type - void Save(const string& File, SaveFileType Type); + void Save(const String& File, SaveFileType Type); // Saves the texture to the specified stream void Save(IO::Stream& Stream, SaveFileType Type = SaveFileType::Dds); // Saves the texture to the specified buffer void Save(uint8_t* Buffer, uint64_t BufferLength, SaveFileType Type = SaveFileType::Dds); // Loads a texture from the specified file path - static Texture FromFile(const string& File); + static Texture FromFile(const String& File); // Loads a texture from the specified file path with the specified type - static Texture FromFile(const string& File, TextureType Type); + static Texture FromFile(const String& File, TextureType Type); // Loads a texture from the specified stream static Texture FromStream(IO::Stream& Stream, TextureType Type = TextureType::DDS); // Loads a texture from the specified buffer diff --git a/r5dev/thirdparty/cppnet/cppkore/ToolTip.cpp b/r5dev/thirdparty/cppnet/cppkore/ToolTip.cpp index fbcaf15a..4fd8857f 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ToolTip.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ToolTip.cpp @@ -165,7 +165,7 @@ namespace Forms if (GetState(ControlStates::StateCreated)) { - string Title = !string::IsNullOrEmpty(_ToolTipTitle) ? _ToolTipTitle : string(" "); + String Title = !String::IsNullOrEmpty(_ToolTipTitle) ? _ToolTipTitle : String(" "); SendMessageA(this->_Handle, TTM_SETTITLEA, (WPARAM)Value, (LPARAM)(char*)Title); SendMessageA(this->_Handle, TTM_UPDATE, NULL, NULL); @@ -173,12 +173,12 @@ namespace Forms } } - string ToolTip::ToolTipTitle() + String ToolTip::ToolTipTitle() { return this->_ToolTipTitle; } - void ToolTip::SetToolTipTitle(const string& Value) + void ToolTip::SetToolTipTitle(const String& Value) { if (_ToolTipTitle != Value) { @@ -220,7 +220,7 @@ namespace Forms } } - void ToolTip::SetToolTip(Control* Ctrl, const string& Caption) + void ToolTip::SetToolTip(Control* Ctrl, const String& Caption) { if (Ctrl->GetState(ControlStates::StateCreated)) { @@ -292,9 +292,9 @@ namespace Forms SendMessageA(this->_Handle, TTM_SETTIPBKCOLOR, Drawing::ColorToWin32(this->BackColor()), NULL); SendMessageA(this->_Handle, TTM_SETTIPTEXTCOLOR, Drawing::ColorToWin32(this->ForeColor()), NULL); - if ((int)_ToolTipIcon > 0 || !string::IsNullOrEmpty(_ToolTipTitle)) + if ((int)_ToolTipIcon > 0 || !String::IsNullOrEmpty(_ToolTipTitle)) { - string Title = !string::IsNullOrEmpty(_ToolTipTitle) ? _ToolTipTitle : string(" "); + String Title = !String::IsNullOrEmpty(_ToolTipTitle) ? _ToolTipTitle : String(" "); SendMessageA(this->_Handle, TTM_SETTITLEA, (WPARAM)_ToolTipIcon, (LPARAM)(char*)Title); } } diff --git a/r5dev/thirdparty/cppnet/cppkore/ToolTip.h b/r5dev/thirdparty/cppnet/cppkore/ToolTip.h index d0b6e344..2698d411 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ToolTip.h +++ b/r5dev/thirdparty/cppnet/cppkore/ToolTip.h @@ -72,9 +72,9 @@ namespace Forms void SetToolTipIcon(ToolTipIcon Value); // Gets or sets the title of the tooltip. - string ToolTipTitle(); + String ToolTipTitle(); // Gets or sets the title of the tooltip. - void SetToolTipTitle(const string& Value); + void SetToolTipTitle(const String& Value); // When set to true, animations are used when tooltip is shown or hidden. bool UseAnimation(); @@ -87,7 +87,7 @@ namespace Forms void SetUseFading(bool Value); // Associates tooltip text with the specified control. - void SetToolTip(Control* Ctrl, const string& Caption); + void SetToolTip(Control* Ctrl, const String& Caption); // Removes all tooltips from the currently setup controls. void RemoveAll(); @@ -120,10 +120,10 @@ namespace Forms std::bitset<10> _Flags; uint32_t _DelayTimes[4]; ToolTipIcon _ToolTipIcon; - string _ToolTipTitle; + String _ToolTipTitle; // Internal cache dictionary - Dictionary _ControlCache; + Dictionary _ControlCache; // We must define each window message handler here... void WmShow(); diff --git a/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.cpp b/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.cpp index f88b4b61..d79367cf 100644 --- a/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.cpp @@ -68,7 +68,7 @@ namespace Assets::Exporters }; #pragma pack(pop) - bool UnrealEngine::ExportAnimation(const Animation& Animation, const string& Path) + bool UnrealEngine::ExportAnimation(const Animation& Animation, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); @@ -135,7 +135,7 @@ namespace Assets::Exporters return true; } - bool UnrealEngine::ExportModel(const Model& Model, const string& Path) + bool UnrealEngine::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); diff --git a/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.h b/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.h index d8278d37..2e9b28c4 100644 --- a/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.h +++ b/r5dev/thirdparty/cppnet/cppkore/UnrealEngine.h @@ -12,9 +12,9 @@ namespace Assets::Exporters ~UnrealEngine() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/Uri.cpp b/r5dev/thirdparty/cppnet/cppkore/Uri.cpp index 15f57a6c..23c0d545 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Uri.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/Uri.cpp @@ -4,24 +4,24 @@ namespace Net { Uri::Uri(const char* Url) - : Uri(string(Url)) + : Uri(String(Url)) { } - Uri::Uri(const string& Url) + Uri::Uri(const String& Url) : InternetPort(InternetPortType::Default), Host(""), Path("") { this->ParseUri(Url); } - string Uri::GetUrl() + String Uri::GetUrl() { auto Base = (InternetPort == InternetPortType::Http) ? "http://" : "https://"; return Base + Host + Path; } - void Uri::ParseUri(const string& Url) + void Uri::ParseUri(const String& Url) { auto LowerCaseUrl = Url.ToLower(); uint32_t ParsePoint = 0; @@ -43,14 +43,14 @@ namespace Net auto PathStart = Url.IndexOf("/", ParsePoint); - if (PathStart != string::InvalidPosition) + if (PathStart != String::InvalidPosition) { - this->Host = Url.Substring(ParsePoint, PathStart - ParsePoint); - this->Path = Url.Substring(PathStart + 1); + this->Host = Url.SubString(ParsePoint, PathStart - ParsePoint); + this->Path = Url.SubString(PathStart + 1); } else { - this->Host = Url.Substring(ParsePoint); + this->Host = Url.SubString(ParsePoint); } } } diff --git a/r5dev/thirdparty/cppnet/cppkore/Uri.h b/r5dev/thirdparty/cppnet/cppkore/Uri.h index 6ac9ac36..fd40d695 100644 --- a/r5dev/thirdparty/cppnet/cppkore/Uri.h +++ b/r5dev/thirdparty/cppnet/cppkore/Uri.h @@ -12,21 +12,21 @@ namespace Net { public: explicit Uri(const char* Url); - Uri(const string& Url); + Uri(const String& Url); // Returns the internet port of the Uri InternetPortType InternetPort; // Returns the host name of the Uri - string Host; + String Host; // Returns the full path and query of the Uri - string Path; + String Path; // Returns the fully built url of the Uri components - string GetUrl(); + String GetUrl(); private: // Internal routine to parse a Uri - void ParseUri(const string& Url); + void ParseUri(const String& Url); }; } \ No newline at end of file diff --git a/r5dev/thirdparty/cppnet/cppkore/ValveSMD.cpp b/r5dev/thirdparty/cppnet/cppkore/ValveSMD.cpp index e270bab7..ac5a7b4a 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ValveSMD.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ValveSMD.cpp @@ -23,12 +23,12 @@ namespace Assets::Exporters Writer.Write("\n"); } - bool ValveSMD::ExportAnimation(const Animation& Animation, const string& Path) + bool ValveSMD::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool ValveSMD::ExportModel(const Model& Model, const string& Path) + bool ValveSMD::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::StreamWriter(IO::File::Create(Path)); diff --git a/r5dev/thirdparty/cppnet/cppkore/ValveSMD.h b/r5dev/thirdparty/cppnet/cppkore/ValveSMD.h index 2c533228..5c2b9ac0 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ValveSMD.h +++ b/r5dev/thirdparty/cppnet/cppkore/ValveSMD.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~ValveSMD() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.cpp b/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.cpp index cc6daa5e..ee3407a2 100644 --- a/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.cpp @@ -7,12 +7,12 @@ namespace Assets::Exporters { - bool WavefrontOBJ::ExportAnimation(const Animation& Animation, const string& Path) + bool WavefrontOBJ::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool WavefrontOBJ::ExportModel(const Model& Model, const string& Path) + bool WavefrontOBJ::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::StreamWriter(IO::File::Create(Path)); auto MaterialPath = IO::Path::ChangeExtension(Path, ".mtl"); diff --git a/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.h b/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.h index d6be9f17..d5de525e 100644 --- a/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.h +++ b/r5dev/thirdparty/cppnet/cppkore/WavefrontOBJ.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~WavefrontOBJ() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.cpp b/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.cpp index f8e517a6..45f4cf2c 100644 --- a/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.cpp @@ -7,12 +7,12 @@ namespace Assets::Exporters { - bool XNALaraAscii::ExportAnimation(const Animation& Animation, const string& Path) + bool XNALaraAscii::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool XNALaraAscii::ExportModel(const Model& Model, const string& Path) + bool XNALaraAscii::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::StreamWriter(IO::File::Create(Path)); diff --git a/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.h b/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.h index fbeeaba1..06cae6b2 100644 --- a/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.h +++ b/r5dev/thirdparty/cppnet/cppkore/XNALaraAscii.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~XNALaraAscii() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.cpp b/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.cpp index aa37fb76..8bb32de5 100644 --- a/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.cpp @@ -7,12 +7,12 @@ namespace Assets::Exporters { - bool XNALaraBinary::ExportAnimation(const Animation& Animation, const string& Path) + bool XNALaraBinary::ExportAnimation(const Animation& Animation, const String& Path) { return false; } - bool XNALaraBinary::ExportModel(const Model& Model, const string& Path) + bool XNALaraBinary::ExportModel(const Model& Model, const String& Path) { auto Writer = IO::BinaryWriter(IO::File::Create(Path)); @@ -31,13 +31,13 @@ namespace Assets::Exporters for (auto& Submesh : Model.Meshes) { - Writer.WriteNetString(string::Format("KoreMesh%02d", SubmeshIndex)); + Writer.WriteNetString(String::Format("KoreMesh%02d", SubmeshIndex)); Writer.Write(Submesh.Vertices.UVLayerCount()); Writer.Write(Submesh.Vertices.UVLayerCount()); for (uint8_t i = 0; i < Submesh.Vertices.UVLayerCount(); i++) { - Writer.WriteNetString(Submesh.MaterialIndices[i] > -1 ? Model.Materials[Submesh.MaterialIndices[i]].Name : string("default_material")); + Writer.WriteNetString(Submesh.MaterialIndices[i] > -1 ? Model.Materials[Submesh.MaterialIndices[i]].Name : String("default_material")); Writer.Write(i); } diff --git a/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.h b/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.h index 87c9f809..bd0112e0 100644 --- a/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.h +++ b/r5dev/thirdparty/cppnet/cppkore/XNALaraBinary.h @@ -13,9 +13,9 @@ namespace Assets::Exporters ~XNALaraBinary() = default; // Exports the given animation to the provided path. - virtual bool ExportAnimation(const Animation& Animation, const string& Path); + virtual bool ExportAnimation(const Animation& Animation, const String& Path); // Exports the given model to the provided path. - virtual bool ExportModel(const Model& Model, const string& Path); + virtual bool ExportModel(const Model& Model, const String& Path); // Gets the file extension for this exporters model format. virtual imstring ModelExtension(); diff --git a/r5dev/thirdparty/cppnet/cppkore/XXHash.cpp b/r5dev/thirdparty/cppnet/cppkore/XXHash.cpp index b49c57aa..7a53f0cc 100644 --- a/r5dev/thirdparty/cppnet/cppkore/XXHash.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/XXHash.cpp @@ -11,7 +11,7 @@ namespace Hashing { - uint64_t XXHash::HashString(const string& Input, XXHashVersion Version, uint64_t Seed) + uint64_t XXHash::HashString(const String& Input, XXHashVersion Version, uint64_t Seed) { return ComputeHash((uint8_t*)(char*)Input, 0, Input.Length(), Version, Seed); } diff --git a/r5dev/thirdparty/cppnet/cppkore/XXHash.h b/r5dev/thirdparty/cppnet/cppkore/XXHash.h index 316e803d..2b0d22e6 100644 --- a/r5dev/thirdparty/cppnet/cppkore/XXHash.h +++ b/r5dev/thirdparty/cppnet/cppkore/XXHash.h @@ -27,7 +27,7 @@ namespace Hashing } // Computes the hash code of the input string using XXHash algo. - static uint64_t HashString(const string& Input, XXHashVersion Version = XXHashVersion::XX64, uint64_t Seed = 0); + static uint64_t HashString(const String& Input, XXHashVersion Version = XXHashVersion::XX64, uint64_t Seed = 0); // Computes the hash code using the XXHash algo. static uint64_t ComputeHash(uint8_t* Input, uint64_t InputOffset, uint64_t InputLength, XXHashVersion Version = XXHashVersion::XX64, uint64_t Seed = 0); diff --git a/r5dev/thirdparty/cppnet/cppkore/ZipArchive.cpp b/r5dev/thirdparty/cppnet/cppkore/ZipArchive.cpp index 5fba19b2..17d7654f 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ZipArchive.cpp +++ b/r5dev/thirdparty/cppnet/cppkore/ZipArchive.cpp @@ -81,7 +81,7 @@ namespace Compression auto Entry = ZipEntry(); Entry.Method = (ZipCompressionMethod)Method; - Entry.FileNameInZip = string((const char*)&Buffer[i + 46], (size_t)FileNameSize); + Entry.FileNameInZip = String((const char*)&Buffer[i + 46], (size_t)FileNameSize); Entry.FileOffset = GetFileOffset(HeaderOffset); Entry.FileSize = FileSize; Entry.CompressedSize = CompressedSize; @@ -91,7 +91,7 @@ namespace Compression Entry.EncodeUTF8 = EncodeUTF8; if (CommentSize > 0) - Entry.Comment = string((const char*)&Buffer[i + 46 + FileNameSize + ExtraSize], (size_t)CommentSize); + Entry.Comment = String((const char*)&Buffer[i + 46 + FileNameSize + ExtraSize], (size_t)CommentSize); if (ExtraSize > 0) this->ReadExtraInfo(i + 46 + FileNameSize, Entry); @@ -104,13 +104,13 @@ namespace Compression return Result; } - ZipEntry ZipArchive::AddFile(ZipCompressionMethod Method, const string& Path, const string& FileNameInZip, const string& Comment) + ZipEntry ZipArchive::AddFile(ZipCompressionMethod Method, const String& Path, const String& FileNameInZip, const String& Comment) { auto Fs = IO::File::OpenRead(Path); return std::move(AddStream(Method, FileNameInZip, Fs.get(), Comment)); } - ZipEntry ZipArchive::AddStream(ZipCompressionMethod Method, const string& FileNameInZip, IO::Stream* Stream, const string& Comment) + ZipEntry ZipArchive::AddStream(ZipCompressionMethod Method, const String& FileNameInZip, IO::Stream* Stream, const String& Comment) { auto Entry = ZipEntry(); @@ -134,7 +134,7 @@ namespace Compression return std::move(Entry); } - void ZipArchive::ExtractFile(ZipEntry& Entry, const string& FileName) + void ZipArchive::ExtractFile(ZipEntry& Entry, const String& FileName) { auto Path = IO::Path::GetDirectoryName(FileName); @@ -345,20 +345,20 @@ namespace Compression } } - string ZipArchive::NormalizeFileName(const string& FileName) + String ZipArchive::NormalizeFileName(const String& FileName) { auto Name = FileName.Replace("\\", "/"); auto Pos = Name.IndexOf(":"); - if (Pos != string::InvalidPosition) - Name = Name.Substring(Pos + 1); + if (Pos != String::InvalidPosition) + Name = Name.SubString(Pos + 1); if (Name.Length() > 2 && Name[0] == '/' && Name[Name.Length() - 1] == '/') - return Name.Substring(1, Name.Length() - 2); + return Name.SubString(1, Name.Length() - 2); else if (Name.Length() > 1 && Name[0] == '/') - return Name.Substring(1); + return Name.SubString(1); else if (Name.Length() > 1 && Name[Name.Length() - 1] == '/') - return Name.Substring(0, Name.Length() - 1); + return Name.SubString(0, Name.Length() - 1); return Name; } diff --git a/r5dev/thirdparty/cppnet/cppkore/ZipArchive.h b/r5dev/thirdparty/cppnet/cppkore/ZipArchive.h index 14d3b40a..ac837cef 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ZipArchive.h +++ b/r5dev/thirdparty/cppnet/cppkore/ZipArchive.h @@ -26,12 +26,12 @@ namespace Compression List ReadEntries(); // Add a file into the ZipArchive. - ZipEntry AddFile(ZipCompressionMethod Method, const string& Path, const string& FileNameInZip, const string& Comment = ""); + ZipEntry AddFile(ZipCompressionMethod Method, const String& Path, const String& FileNameInZip, const String& Comment = ""); // Add a stream into the ZipArchive. - ZipEntry AddStream(ZipCompressionMethod Method, const string& FileNameInZip, IO::Stream* Stream, const string& Comment = ""); + ZipEntry AddStream(ZipCompressionMethod Method, const String& FileNameInZip, IO::Stream* Stream, const String& Comment = ""); // Extract the entry to the provided file path. - void ExtractFile(ZipEntry& Entry, const string& FileName); + void ExtractFile(ZipEntry& Entry, const String& FileName); // Extract the entry to the provided stream. void ExtractFile(ZipEntry& Entry, IO::Stream* Stream); // Extract the entry to the provided stream. @@ -56,7 +56,7 @@ namespace Compression // Internal helper routine to read extra info. void ReadExtraInfo(uint64_t i, ZipEntry& Entry); // Internal helper routine to clean a file name - string NormalizeFileName(const string& FileName); + String NormalizeFileName(const String& FileName); // Internal routine to calculate crc and sizes void UpdateCrcAndSizes(ZipEntry& Entry); // Internal routine to write the file header diff --git a/r5dev/thirdparty/cppnet/cppkore/ZipEntry.h b/r5dev/thirdparty/cppnet/cppkore/ZipEntry.h index 1f5d3072..02cae4cf 100644 --- a/r5dev/thirdparty/cppnet/cppkore/ZipEntry.h +++ b/r5dev/thirdparty/cppnet/cppkore/ZipEntry.h @@ -20,7 +20,7 @@ namespace Compression // Compression method ZipCompressionMethod Method; // Full path and filename as stored in ZipArchive - string FileNameInZip; + String FileNameInZip; // Original file size uint64_t FileSize; // Compressed file size @@ -34,7 +34,7 @@ namespace Compression // The CRC32 checksum of the entire file uint32_t Crc32; // User comment for the file - string Comment; + String Comment; // True if UTF8 encoding for filename and comments bool EncodeUTF8; }; diff --git a/r5dev/vproj/sdklauncher.vcxproj b/r5dev/vproj/sdklauncher.vcxproj index 8b04bb79..7bf45d2f 100644 --- a/r5dev/vproj/sdklauncher.vcxproj +++ b/r5dev/vproj/sdklauncher.vcxproj @@ -79,7 +79,7 @@ Console true - libdetours_x64.lib;%(AdditionalDependencies) + libcppkore_x64.lib;libdetours_x64.lib;%(AdditionalDependencies) $(SolutionDir)lib\$(Configuration)\ @@ -113,7 +113,7 @@ true true true - libdetours_x64.lib;%(AdditionalDependencies) + libcppkore_x64.lib;libdetours_x64.lib;%(AdditionalDependencies) $(SolutionDir)lib\$(Configuration)\ true diff --git a/r5sdk.sln b/r5sdk.sln index 47a86b5a..4766742e 100644 --- a/r5sdk.sln +++ b/r5sdk.sln @@ -13,6 +13,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamesdk", "r5dev\vproj\game EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdklauncher", "r5dev\vproj\sdklauncher.vcxproj", "{18F8C75E-3844-4AA6-AB93-980A08253519}" ProjectSection(ProjectDependencies) = postProject + {88BC2D60-A093-4E61-B194-59AB8BE4E33E} = {88BC2D60-A093-4E61-B194-59AB8BE4E33E} {6DC4E2AF-1740-480B-A9E4-BA766BC6B58D} = {6DC4E2AF-1740-480B-A9E4-BA766BC6B58D} EndProjectSection EndProject