* Wraps the existing data source into an asynchronous DataSource and starts loading the data * immediately. */
| 49 | * immediately. |
| 50 | */ |
| 51 | static std::unique_ptr<DataSource> Async(std::unique_ptr<DataSource> source) { |
| 52 | #ifndef TGFX_USE_THREADS |
| 53 | return source; |
| 54 | #endif |
| 55 | if (source == nullptr) { |
| 56 | return nullptr; |
| 57 | } |
| 58 | return std::make_unique<AsyncDataSource<T>>(std::move(source)); |
| 59 | } |
| 60 | |
| 61 | virtual ~DataSource() = default; |
| 62 |
nothing calls this directly
no outgoing calls
no test coverage detected