mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-23 09:35:45 +00:00
16 lines
503 B
C++
16 lines
503 B
C++
#include "SearchPathMultiInputStream.h"
|
|
|
|
SearchPathMultiInputStream::SearchPathMultiInputStream(ISearchPath& searchPath)
|
|
: m_search_path(searchPath)
|
|
{
|
|
}
|
|
|
|
std::unique_ptr<std::istream> SearchPathMultiInputStream::OpenIncludedFile(const std::string& filename, const std::string& sourceFile)
|
|
{
|
|
auto foundFileToInclude = m_search_path.Open(filename);
|
|
if (!foundFileToInclude.IsOpen() || !foundFileToInclude.m_stream)
|
|
return nullptr;
|
|
|
|
return std::move(foundFileToInclude.m_stream);
|
|
}
|