mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 04:18:36 +00:00
Cleaned up some unnecessary boost cruft.
This commit is contained in:
parent
3888535c83
commit
57fc960f35
@ -35,7 +35,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <core/config.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <core/sdk/IBuffer.h>
|
||||
|
||||
namespace musik { namespace core { namespace audio {
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include <core/sdk/IDSP.h>
|
||||
#include <core/sdk/IDecoderFactory.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <list>
|
||||
|
||||
namespace musik { namespace core { namespace audio {
|
||||
|
@ -47,8 +47,6 @@
|
||||
#include <core/support/Playback.h>
|
||||
#include <core/support/LastFm.h>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
using namespace musik::core::library;
|
||||
using namespace musik::core;
|
||||
using namespace musik::core::prefs;
|
||||
@ -795,8 +793,7 @@ double PlaybackService::GetDuration() {
|
||||
}
|
||||
|
||||
if (track) {
|
||||
return boost::lexical_cast<double>(
|
||||
track->GetString(constants::Track::DURATION));
|
||||
std::stod(track->GetString(constants::Track::DURATION));
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include <core/sdk/IDecoder.h>
|
||||
#include <core/sdk/IDSP.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <list>
|
||||
|
||||
namespace musik { namespace core { namespace audio {
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "pch.hpp"
|
||||
|
||||
#include <core/db/Connection.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <sqlite/sqlite3.h>
|
||||
|
||||
static std::mutex globalMutex;
|
||||
@ -130,7 +129,7 @@ void Connection::Initialize(unsigned int cache) {
|
||||
// Divide by 4 to since the page_size is 4096
|
||||
// Total cache is the same as page_size*cache_size
|
||||
cache = cache / 4;
|
||||
std::string cacheSize("PRAGMA cache_size=" + boost::lexical_cast<std::string>(cache));
|
||||
std::string cacheSize("PRAGMA cache_size=" + std::to_string(cache));
|
||||
sqlite3_exec(this->connection,cacheSize.c_str(), nullptr, nullptr, nullptr); // size * 1.5kb = 6Mb cache
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
struct sqlite3;
|
||||
struct sqlite3_stmt;
|
||||
|
||||
@ -55,9 +53,10 @@ namespace musik { namespace core { namespace db {
|
||||
Error = 1
|
||||
} ReturnCode;
|
||||
|
||||
class Connection : boost::noncopyable {
|
||||
class Connection {
|
||||
public:
|
||||
Connection();
|
||||
Connection(const Connection&) = delete;
|
||||
~Connection();
|
||||
|
||||
int Open(const std::string &database, unsigned int options = 0, unsigned int cache = 0);
|
||||
|
@ -36,16 +36,16 @@
|
||||
|
||||
#include <core/config.h>
|
||||
#include <map>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace musik { namespace core { namespace db {
|
||||
|
||||
class Connection;
|
||||
|
||||
class ScopedTransaction : boost::noncopyable {
|
||||
class ScopedTransaction {
|
||||
public:
|
||||
ScopedTransaction(Connection &connection);
|
||||
ScopedTransaction(const ScopedTransaction&) = delete;
|
||||
|
||||
~ScopedTransaction();
|
||||
|
||||
void Cancel();
|
||||
|
@ -36,8 +36,6 @@
|
||||
|
||||
#include <core/config.h>
|
||||
#include <map>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
struct sqlite3_stmt;
|
||||
|
||||
@ -45,9 +43,10 @@ namespace musik { namespace core { namespace db {
|
||||
|
||||
class Connection;
|
||||
|
||||
class Statement : boost::noncopyable {
|
||||
class Statement {
|
||||
public:
|
||||
Statement(const char* sql,Connection &connection);
|
||||
Statement(const Statement&) = delete;
|
||||
virtual ~Statement();
|
||||
|
||||
void BindInt32(int position, int bindInt);
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include <vector>
|
||||
#include <sigslot/sigslot.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <core/library/IIndexer.h>
|
||||
#include <core/db/Connection.h>
|
||||
|
||||
|
@ -54,7 +54,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/thread/xtime.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <atomic>
|
||||
@ -444,7 +443,7 @@ void Indexer::SyncDirectory(
|
||||
boost::filesystem::directory_iterator end;
|
||||
boost::filesystem::directory_iterator file(path);
|
||||
|
||||
std::string pathIdStr = boost::lexical_cast<std::string>(pathId);
|
||||
std::string pathIdStr = std::to_string(pathId);
|
||||
std::vector<Thread> threads;
|
||||
|
||||
for( ; file != end && !this->Bail(); file++) {
|
||||
|
@ -60,14 +60,15 @@ namespace musik { namespace core {
|
||||
class Indexer :
|
||||
public musik::core::IIndexer,
|
||||
public musik::core::sdk::IIndexerWriter,
|
||||
public musik::core::sdk::IIndexerNotifier,
|
||||
private boost::noncopyable
|
||||
public musik::core::sdk::IIndexerNotifier
|
||||
{
|
||||
public:
|
||||
Indexer(
|
||||
const std::string& libraryPath,
|
||||
const std::string& dbFilename);
|
||||
|
||||
Indexer(const Indexer&) = delete;
|
||||
|
||||
virtual ~Indexer();
|
||||
|
||||
/* IIndexer */
|
||||
|
@ -82,7 +82,7 @@ LocalLibrary::LocalLibrary(std::string name,int id)
|
||||
, id(id)
|
||||
, exit(false)
|
||||
, messageQueue(nullptr) {
|
||||
this->identifier = boost::lexical_cast<std::string>(id);
|
||||
this->identifier = std::to_string(id);
|
||||
|
||||
this->db.Open(this->GetDatabaseFilename().c_str());
|
||||
LocalLibrary::CreateDatabase(this->db);
|
||||
|
@ -34,10 +34,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <core/config.h>
|
||||
#include <core/db/Connection.h>
|
||||
|
||||
@ -50,7 +46,6 @@
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <sigslot/sigslot.h>
|
||||
#include <string>
|
||||
|
||||
@ -59,8 +54,7 @@ namespace musik { namespace core { namespace library {
|
||||
class LocalLibrary :
|
||||
public ILibrary,
|
||||
public musik::core::runtime::IMessageTarget,
|
||||
public std::enable_shared_from_this<LocalLibrary>,
|
||||
boost::noncopyable
|
||||
public std::enable_shared_from_this<LocalLibrary>
|
||||
{
|
||||
public:
|
||||
using LocalQuery = musik::core::db::LocalQueryBase;
|
||||
@ -68,6 +62,7 @@ namespace musik { namespace core { namespace library {
|
||||
|
||||
static ILibraryPtr Create(std::string name, int id);
|
||||
|
||||
LocalLibrary(const LocalLibrary&) = delete;
|
||||
virtual ~LocalLibrary();
|
||||
|
||||
/* ILibrary */
|
||||
|
@ -34,11 +34,7 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <core/config.h>
|
||||
|
||||
#include <sigslot/sigslot.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
|
||||
#include <core/db/Connection.h>
|
||||
#include <core/db/Statement.h>
|
||||
#endif
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include "pch.hpp"
|
||||
#include "Duration.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <cmath>
|
||||
|
||||
namespace musik { namespace core { namespace duration {
|
||||
|
||||
@ -52,7 +52,7 @@ namespace musik { namespace core { namespace duration {
|
||||
|
||||
std::string Duration(const std::string& str) {
|
||||
if (str.size()) {
|
||||
int seconds = boost::lexical_cast<int>(str);
|
||||
int seconds = std::stoi(str);
|
||||
return Duration(seconds);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,6 @@
|
||||
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
@ -229,7 +228,7 @@ struct musik::cube::TransportDisplayCache {
|
||||
this->track->GetString(constants::Track::DURATION);
|
||||
|
||||
if (duration.size()) {
|
||||
secondsTotal = boost::lexical_cast<int>(duration);
|
||||
secondsTotal = std::stoi(duration);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,6 @@
|
||||
#include <string>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef WIN32
|
||||
|
Loading…
x
Reference in New Issue
Block a user