Changed the way services are handled

This commit is contained in:
emeric
2020-08-22 15:20:18 +02:00
parent 9fbbca97a4
commit bd7561af8e
23 changed files with 107 additions and 127 deletions
@@ -32,7 +32,7 @@ namespace Recommendation {
static
std::filesystem::path getCacheDirectory()
{
return ServiceProvider<IConfig>::get()->getPath("working-dir") / "cache" / "features";
return Service<IConfig>::get()->getPath("working-dir") / "cache" / "features";
}
static std::filesystem::path getCacheNetworkFilePath()
@@ -237,7 +237,7 @@ FeaturesClassifierCache::read()
void
FeaturesClassifierCache::write() const
{
std::filesystem::create_directories(ServiceProvider<IConfig>::get()->getPath("working-dir") / "cache" / "features");
std::filesystem::create_directories(Service<IConfig>::get()->getPath("working-dir") / "cache" / "features");
if (!networkToCacheFile(_network, getCacheNetworkFilePath())
|| !objectPositionToCacheFile(_trackPositions, getCacheTrackPositionsFilePath()))