| 1596 | PluginFetchCtx& operator=(PluginFetchCtx&&) = delete; |
| 1597 | |
| 1598 | [[nodiscard]] std::vector<uint8_t> invoke() const { |
| 1599 | if (fetch_fn_ == nullptr) { |
| 1600 | return {}; |
| 1601 | } |
| 1602 | const uint8_t* data = nullptr; |
| 1603 | uint64_t size = 0; // matches PJ_lazy_fetch_fn_t out_size (uint64_t*) |
| 1604 | if (!fetch_fn_(ctx_, &data, &size) || data == nullptr) { |
| 1605 | return {}; |
| 1606 | } |
| 1607 | return std::vector<uint8_t>(data, data + size); |
| 1608 | } |
| 1609 | |
| 1610 | private: |
| 1611 | PJ_lazy_fetch_fn_t fetch_fn_; |
no outgoing calls
no test coverage detected