Upgraded code to switch to C++17. Tested on Debian Buster
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
#include <random>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
#include "database/Database.hpp"
|
||||
#include "database/Db.hpp"
|
||||
#include "database/Session.hpp"
|
||||
#include "database/Track.hpp"
|
||||
#include "database/Artist.hpp"
|
||||
@@ -32,7 +32,7 @@ std::ostream& operator<<(std::ostream& os, const Database::Track::pointer& track
|
||||
|
||||
static
|
||||
bool
|
||||
getTrackFeatures(Database::Session &session, const Database::Track::pointer& track, const std::map<std::string, std::size_t>& featuresSettings, SOM::InputVector& res)
|
||||
getTrackFeatures(Database::Session&, const Database::Track::pointer& track, const std::map<std::string, std::size_t>& featuresSettings, SOM::InputVector& res)
|
||||
{
|
||||
std::map<std::string, std::vector<double>> features;
|
||||
for (const auto& featureSettings : featuresSettings)
|
||||
@@ -84,13 +84,13 @@ int main(int argc, char *argv[])
|
||||
for (const auto& featureSettings : featuresSettings)
|
||||
nbDims += featureSettings.second;
|
||||
|
||||
boost::filesystem::path configFilePath = "/etc/lms.conf";
|
||||
std::filesystem::path configFilePath {"/etc/lms.conf"};
|
||||
if (argc >= 2)
|
||||
configFilePath = std::string(argv[1], 0, 256);
|
||||
|
||||
ServiceProvider<Config>::create(configFilePath);
|
||||
|
||||
Database::Database db {getService<Config>()->getPath("working-dir") / "lms.db"};
|
||||
Database::Db db {getService<Config>()->getPath("working-dir") / "lms.db"};
|
||||
auto session {db.createSession()};
|
||||
|
||||
std::cout << "Getting all features..." << std::endl;
|
||||
|
||||
@@ -4,7 +4,7 @@ lms_similarity_SOURCES = \
|
||||
$(srcdir)/LmsSimilarity.cpp \
|
||||
$(top_srcdir)/src/database/Artist.cpp \
|
||||
$(top_srcdir)/src/database/Cluster.cpp \
|
||||
$(top_srcdir)/src/database/Database.cpp \
|
||||
$(top_srcdir)/src/database/Db.cpp \
|
||||
$(top_srcdir)/src/database/TrackFeatures.cpp \
|
||||
$(top_srcdir)/src/database/TrackList.cpp \
|
||||
$(top_srcdir)/src/database/Release.cpp \
|
||||
@@ -20,5 +20,5 @@ lms_similarity_SOURCES = \
|
||||
$(top_srcdir)/src/utils/Logger.cpp \
|
||||
$(top_srcdir)/src/utils/Utils.cpp
|
||||
|
||||
lms_similarity_CXXFLAGS=-std=c++14 -Wall -I$(top_srcdir)/src -D_REENTRANT
|
||||
lms_similarity_CXXFLAGS=-std=c++17 -I$(top_srcdir)/src -D_REENTRANT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user