Improve url detection
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
namespace OpenVulkano
|
namespace OpenVulkano
|
||||||
{
|
{
|
||||||
|
#ifdef HAS_CURL
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
size_t CurlDownloader(void* contents, size_t size, size_t memBlockCount, void* userData)
|
size_t CurlDownloader(void* contents, size_t size, size_t memBlockCount, void* userData)
|
||||||
@@ -31,10 +32,11 @@ namespace OpenVulkano
|
|||||||
return totalSize;
|
return totalSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool WebResourceLoader::IsUrl(const std::string& str)
|
bool WebResourceLoader::IsUrl(const std::string& str)
|
||||||
{
|
{
|
||||||
return str.find("http://") == 0 || str.find("https://") == 0 || str.find("ftp://") == 0;
|
return Utils::StartsWith(str, "http://") || Utils::StartsWith(str, "https://") || Utils::StartsWith(str, "ftp://");
|
||||||
}
|
}
|
||||||
|
|
||||||
WebResourceLoader::WebResourceLoader()
|
WebResourceLoader::WebResourceLoader()
|
||||||
|
|||||||
Reference in New Issue
Block a user