Files
projectm/src/libprojectM/PresetFactory.cpp
Kai Blaschke a1d300f48c Include cleanup, plus a few small code improvements.
Also removed empty FrameAudioData implementation file.
2024-02-02 15:08:05 +01:00

27 lines
497 B
C++

#include "PresetFactory.hpp"
#ifdef DEBUG
#include <iostream>
#endif
namespace libprojectM {
std::string PresetFactory::Protocol(const std::string& url, std::string& path)
{
auto pos = url.find("://");
if (pos == std::string::npos)
{
path = url;
return {};
}
path = url.substr(pos + 3, url.length());
#ifdef DEBUG
std::cout << "[PresetFactory] Filename is URL: " << url << std::endl;
#endif
return url.substr(0, pos);
}
} // namespace libprojectM