diff options
| author | Stefan Boberg <[email protected]> | 2025-03-06 17:27:59 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-06 17:27:59 +0100 |
| commit | 66e5d1f4e288e0c32f854ebe3b63584b42b83554 (patch) | |
| tree | d67e9d358419b5baccd429d54988414e0d7cd7a6 /src/zencore/compactbinaryvalidation.cpp | |
| parent | reduced memory churn using fixed_xxx containers (#236) (diff) | |
| download | zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.tar.xz zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.zip | |
switched std::vector -> eastl::vector
Diffstat (limited to 'src/zencore/compactbinaryvalidation.cpp')
| -rw-r--r-- | src/zencore/compactbinaryvalidation.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/zencore/compactbinaryvalidation.cpp b/src/zencore/compactbinaryvalidation.cpp index 6f53bba69..53a6f2f50 100644 --- a/src/zencore/compactbinaryvalidation.cpp +++ b/src/zencore/compactbinaryvalidation.cpp @@ -8,6 +8,8 @@ #include <zencore/string.h> #include <zencore/testing.h> +#include <EASTL/sort.h> + #include <algorithm> namespace zen { @@ -209,7 +211,7 @@ ValidateCbObject(MemoryView& View, CbValidateMode Mode, CbValidateError& Error, if (Size > 0) { - std::vector<std::string_view> Names; + eastl::vector<std::string_view> Names; const bool bUniformObject = CbFieldTypeOps::GetType(ObjectType) == CbFieldType::UniformObject; const CbFieldType ExternalType = bUniformObject ? ValidateCbFieldType(ObjectView, Mode, Error) : CbFieldType::HasFieldType; @@ -234,7 +236,7 @@ ValidateCbObject(MemoryView& View, CbValidateMode Mode, CbValidateError& Error, if (EnumHasAnyFlags(Mode, CbValidateMode::Names) && Names.size() > 1) { - std::sort(begin(Names), end(Names), [](std::string_view L, std::string_view R) { return L.compare(R) < 0; }); + std::sort(Names.begin(), Names.end(), [](std::string_view L, std::string_view R) { return L.compare(R) < 0; }); for (const std::string_view *NamesIt = Names.data(), *NamesEnd = NamesIt + Names.size() - 1; NamesIt != NamesEnd; ++NamesIt) { @@ -596,8 +598,8 @@ ValidateObjectAttachment(MemoryView View, CbValidateMode Mode) CbValidateError ValidateCompactBinaryPackage(MemoryView View, CbValidateMode Mode) { - std::vector<IoHash> Attachments; - CbValidateError Error = CbValidateError::None; + eastl::vector<IoHash> Attachments; + CbValidateError Error = CbValidateError::None; if (EnumHasAnyFlags(Mode, CbValidateMode::All)) { uint32_t ObjectCount = 0; @@ -641,7 +643,7 @@ ValidateCompactBinaryPackage(MemoryView View, CbValidateMode Mode) if (Attachments.size() && EnumHasAnyFlags(Mode, CbValidateMode::Package)) { - std::sort(begin(Attachments), end(Attachments)); + eastl::sort(Attachments.begin(), Attachments.end()); for (const IoHash *It = Attachments.data(), *End = It + Attachments.size() - 1; It != End; ++It) { if (It[0] == It[1]) |