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/zenhttp/include | |
| 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/zenhttp/include')
| -rw-r--r-- | src/zenhttp/include/zenhttp/auth/oidc.h | 4 | ||||
| -rw-r--r-- | src/zenhttp/include/zenhttp/httpcommon.h | 2 | ||||
| -rw-r--r-- | src/zenhttp/include/zenhttp/httpserver.h | 4 | ||||
| -rw-r--r-- | src/zenhttp/include/zenhttp/httptest.h | 2 | ||||
| -rw-r--r-- | src/zenhttp/include/zenhttp/packageformat.h | 32 |
5 files changed, 22 insertions, 22 deletions
diff --git a/src/zenhttp/include/zenhttp/auth/oidc.h b/src/zenhttp/include/zenhttp/auth/oidc.h index 6f9c3198e..7ca6b01c0 100644 --- a/src/zenhttp/include/zenhttp/auth/oidc.h +++ b/src/zenhttp/include/zenhttp/auth/oidc.h @@ -5,7 +5,7 @@ #include <zenbase/refcount.h> #include <zencore/string.h> -#include <vector> +#include <EASTL/vector.h> namespace zen { @@ -49,7 +49,7 @@ public: RefreshTokenResult RefreshToken(std::string_view RefreshToken); private: - using StringArray = std::vector<std::string>; + using StringArray = eastl::vector<std::string>; struct OpenIdConfiguration { diff --git a/src/zenhttp/include/zenhttp/httpcommon.h b/src/zenhttp/include/zenhttp/httpcommon.h index bc18549c9..ec7fbba88 100644 --- a/src/zenhttp/include/zenhttp/httpcommon.h +++ b/src/zenhttp/include/zenhttp/httpcommon.h @@ -23,7 +23,7 @@ struct HttpRange uint32_t End = ~uint32_t(0); }; -using HttpRanges = std::vector<HttpRange>; +using HttpRanges = eastl::vector<HttpRange>; std::string_view MapContentTypeToString(HttpContentType ContentType); extern HttpContentType (*ParseContentType)(const std::string_view& ContentTypeString); diff --git a/src/zenhttp/include/zenhttp/httpserver.h b/src/zenhttp/include/zenhttp/httpserver.h index 217455dba..6cff5c69c 100644 --- a/src/zenhttp/include/zenhttp/httpserver.h +++ b/src/zenhttp/include/zenhttp/httpserver.h @@ -41,7 +41,7 @@ public: struct QueryParams { - std::vector<std::pair<std::string_view, std::string_view>> KvPairs; + eastl::vector<std::pair<std::string_view, std::string_view>> KvPairs; std::string_view GetValue(std::string_view ParamName) const { @@ -137,7 +137,7 @@ protected: class IHttpPackageHandler : public RefCounted { public: - virtual void FilterOffer(std::vector<IoHash>& OfferCids) = 0; + virtual void FilterOffer(eastl::vector<IoHash>& OfferCids) = 0; virtual void OnRequestBegin() = 0; virtual IoBuffer CreateTarget(const IoHash& Cid, uint64_t StorageSize) = 0; virtual void OnRequestComplete() = 0; diff --git a/src/zenhttp/include/zenhttp/httptest.h b/src/zenhttp/include/zenhttp/httptest.h index afe71fbce..8dfa43851 100644 --- a/src/zenhttp/include/zenhttp/httptest.h +++ b/src/zenhttp/include/zenhttp/httptest.h @@ -32,7 +32,7 @@ public: PackageHandler(HttpTestingService& Svc, uint32_t RequestId); ~PackageHandler(); - virtual void FilterOffer(std::vector<IoHash>& OfferCids) override; + virtual void FilterOffer(eastl::vector<IoHash>& OfferCids) override; virtual void OnRequestBegin() override; virtual IoBuffer CreateTarget(const IoHash& Cid, uint64_t StorageSize) override; virtual void OnRequestComplete() override; diff --git a/src/zenhttp/include/zenhttp/packageformat.h b/src/zenhttp/include/zenhttp/packageformat.h index c90b840da..f5bd53c5b 100644 --- a/src/zenhttp/include/zenhttp/packageformat.h +++ b/src/zenhttp/include/zenhttp/packageformat.h @@ -95,19 +95,19 @@ enum class RpcAcceptOptions : uint16_t gsl_DEFINE_ENUM_BITMASK_OPERATORS(RpcAcceptOptions); -std::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data, FormatFlags Flags, void* TargetProcessHandle = nullptr); -CompositeBuffer FormatPackageMessageBuffer(const CbPackage& Data, FormatFlags Flags, void* TargetProcessHandle = nullptr); -CbPackage ParsePackageMessage( - IoBuffer Payload, - std::function<IoBuffer(const IoHash& Cid, uint64_t Size)> CreateBuffer = [](const IoHash&, uint64_t Size) -> IoBuffer { - return IoBuffer{Size}; - }); +eastl::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data, FormatFlags Flags, void* TargetProcessHandle = nullptr); +CompositeBuffer FormatPackageMessageBuffer(const CbPackage& Data, FormatFlags Flags, void* TargetProcessHandle = nullptr); +CbPackage ParsePackageMessage( + IoBuffer Payload, + std::function<IoBuffer(const IoHash& Cid, uint64_t Size)> CreateBuffer = [](const IoHash&, uint64_t Size) -> IoBuffer { + return IoBuffer{Size}; + }); bool IsPackageMessage(IoBuffer Payload); bool ParsePackageMessageWithLegacyFallback(const IoBuffer& Response, CbPackage& OutPackage); -std::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data, void* TargetProcessHandle = nullptr); -CompositeBuffer FormatPackageMessageBuffer(const CbPackage& Data, void* TargetProcessHandle = nullptr); +eastl::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data, void* TargetProcessHandle = nullptr); +CompositeBuffer FormatPackageMessageBuffer(const CbPackage& Data, void* TargetProcessHandle = nullptr); /** Streaming reader for compact binary packages @@ -135,10 +135,10 @@ public: */ uint64_t ProcessPackageHeaderData(const void* Data, uint64_t DataBytes); - void Finalize(); - const std::vector<CbAttachment>& GetAttachments() { return m_Attachments; } - CbObject GetRootObject() { return m_RootObject; } - std::span<IoBuffer> GetPayloadBuffers() { return m_PayloadBuffers; } + void Finalize(); + const eastl::vector<CbAttachment>& GetAttachments() { return m_Attachments; } + CbObject GetRootObject() { return m_RootObject; } + std::span<IoBuffer> GetPayloadBuffers() { return m_PayloadBuffers; } private: enum class State @@ -150,9 +150,9 @@ private: } m_CurrentState = State::kInitialState; std::function<IoBuffer(const IoHash& Cid, uint64_t Size)> m_CreateBuffer; - std::vector<IoBuffer> m_PayloadBuffers; - std::vector<CbAttachmentEntry> m_AttachmentEntries; - std::vector<CbAttachment> m_Attachments; + eastl::vector<IoBuffer> m_PayloadBuffers; + eastl::vector<CbAttachmentEntry> m_AttachmentEntries; + eastl::vector<CbAttachment> m_Attachments; CbObject m_RootObject; CbPackageHeader m_PackageHeader; |