boost::shared_ptr -> std::shared_ptr, boost::weak_ptr -> std::weak_ptr

This commit is contained in:
casey 2016-05-14 01:16:50 -07:00
parent dd29f1e500
commit 47fffa7f73
25 changed files with 39 additions and 39 deletions

View File

@ -34,7 +34,7 @@
#include "shlwapi.h"
#include <string>
#include "CddaDataStreamFactory.h"
#include "CddaDataStream.h";
#include "CddaDataStream.h"
CddaDataStreamFactory::CddaDataStreamFactory() {

View File

@ -56,7 +56,7 @@ class WaveOut : public IOutput {
virtual bool Play(IBuffer *buffer, IBufferProvider *provider);
public:
typedef boost::shared_ptr<WaveOutBuffer> WaveOutBufferPtr;
typedef std::shared_ptr<WaveOutBuffer> WaveOutBufferPtr;
static DWORD WINAPI WaveCallbackThreadProc(LPVOID params);
void OnBufferWrittenToOutput(WaveOutBuffer *buffer);

View File

@ -42,7 +42,7 @@ namespace musik { namespace core { namespace audio {
class Buffer;
class Stream;
typedef boost::shared_ptr<Buffer> BufferPtr;
typedef std::shared_ptr<Buffer> BufferPtr;
//////////////////////////////////////////
///\brief

View File

@ -48,11 +48,11 @@ namespace musik { namespace core { namespace audio {
class Player;
class Transport;
typedef boost::shared_ptr<Player> PlayerPtr;
typedef std::shared_ptr<Player> PlayerPtr;
class Player : public IBufferProvider {
public:
typedef boost::shared_ptr<IOutput> OutputPtr;
typedef std::shared_ptr<IOutput> OutputPtr;
static PlayerPtr Create(std::string &url,OutputPtr *output=&OutputPtr());

View File

@ -47,7 +47,7 @@ namespace musik { namespace core { namespace audio {
class Stream;
class Player;
typedef boost::shared_ptr<Stream> StreamPtr;
typedef std::shared_ptr<Stream> StreamPtr;
class Stream {
public:
@ -77,10 +77,10 @@ namespace musik { namespace core { namespace audio {
private:
typedef std::list<BufferPtr> BufferList;
typedef boost::shared_ptr<IDecoderFactory> DecoderFactoryPtr;
typedef std::shared_ptr<IDecoderFactory> DecoderFactoryPtr;
typedef std::vector<DecoderFactoryPtr> DecoderFactoryList;
typedef boost::shared_ptr<IDecoder> DecoderPtr;
typedef boost::shared_ptr<IDSP> DspPtr;
typedef std::shared_ptr<IDecoder> DecoderPtr;
typedef std::shared_ptr<IDSP> DspPtr;
typedef std::vector<DspPtr> Dsps;
long preferedBufferSampleSize;

View File

@ -44,14 +44,14 @@ namespace musik { namespace core { namespace io {
class DataStreamFactory {
public:
typedef boost::shared_ptr<IDataStream> DataStreamPtr;
typedef std::shared_ptr<IDataStream> DataStreamPtr;
private:
static DataStreamFactory sInstance;
DataStreamFactory();
private:
typedef std::vector<boost::shared_ptr<IDataStreamFactory>> DataStreamFactoryVector;
typedef std::vector<std::shared_ptr<IDataStreamFactory>> DataStreamFactoryVector;
DataStreamFactoryVector dataStreamFactories;
public:

View File

@ -10,7 +10,7 @@
namespace musik { namespace core {
class ILibrary;
typedef boost::shared_ptr<ILibrary> LibraryPtr;
typedef std::shared_ptr<ILibrary> LibraryPtr;
class ILibrary {
public:

View File

@ -11,7 +11,7 @@
namespace musik { namespace core {
class IQuery;
typedef boost::shared_ptr<IQuery> QueryPtr;
typedef std::shared_ptr<IQuery> QueryPtr;
class IQuery {
public:

View File

@ -753,7 +753,7 @@ void Indexer::ProcessAddRemoveQueue() {
void Indexer::RunAnalyzers() {
typedef audio::IAnalyzer PluginType;
typedef PluginFactory::DestroyDeleter<PluginType> Deleter;
typedef boost::shared_ptr<PluginType> PluginPtr;
typedef std::shared_ptr<PluginType> PluginPtr;
typedef std::vector<PluginPtr> PluginVector;
/* short circuit if there aren't any analyzers */

View File

@ -111,13 +111,13 @@ namespace musik { namespace core {
std::string path;
};
typedef std::vector<boost::shared_ptr<metadata::IMetadataReader>> MetadataReaderList;
typedef std::vector<std::shared_ptr<metadata::IMetadataReader>> MetadataReaderList;
std::deque<AddRemoveContext> addRemoveQueue;
MetadataReaderList metadataReaders;
};
typedef boost::shared_ptr<Indexer> IndexerPtr;
typedef std::shared_ptr<Indexer> IndexerPtr;
} }

View File

@ -44,7 +44,7 @@
using namespace musik::core;
LibraryFactory& LibraryFactory::Instance() {
typedef boost::shared_ptr<LibraryFactory> InstanceType;
typedef std::shared_ptr<LibraryFactory> InstanceType;
static InstanceType sInstance(new LibraryFactory());
return *sInstance;
};

View File

@ -55,7 +55,7 @@ namespace musik { namespace core {
std::string value;
};
typedef boost::shared_ptr<MetadataValue> MetadataValuePtr;
typedef std::shared_ptr<MetadataValue> MetadataValuePtr;
typedef std::vector<MetadataValuePtr> MetadataValueVector;
} }

View File

@ -71,7 +71,7 @@ namespace musik { namespace core {
virtual TrackPtr Copy();
private:
typedef boost::weak_ptr<Track> SelfWeakPtr;
typedef std::weak_ptr<Track> SelfWeakPtr;
SelfWeakPtr selfPtr;
Track::MetadataMap metadata;
std::string uri;

View File

@ -45,7 +45,7 @@
namespace musik { namespace core {
class Track;
typedef boost::shared_ptr<Track> TrackPtr;
typedef std::shared_ptr<Track> TrackPtr;
typedef std::vector<TrackPtr> TrackVector;
//////////////////////////////////////////

View File

@ -80,7 +80,7 @@ void NonLibraryTrackHelper::ThreadLoop() {
/* load all IMetadataReader plugins */
typedef metadata::IMetadataReader PluginType;
typedef PluginFactory::DestroyDeleter<PluginType> Deleter;
typedef std::vector<boost::shared_ptr<metadata::IMetadataReader>> MetadataReaderList;
typedef std::vector<std::shared_ptr<metadata::IMetadataReader>> MetadataReaderList;
MetadataReaderList metadataReaders =
PluginFactory::Instance() .QueryInterface<PluginType, Deleter>("GetMetadataReader");

View File

@ -72,7 +72,7 @@ class NonLibraryTrackHelper{
boost::mutex mutex;
bool threadIsRunning;
typedef boost::weak_ptr<musik::core::Track> TrackWeakPtr;
typedef std::weak_ptr<musik::core::Track> TrackWeakPtr;
std::list<TrackWeakPtr> tracksToRead;
typedef boost::scoped_ptr<boost::thread> ThreadPtr;

View File

@ -95,12 +95,12 @@ namespace musik{ namespace core{
}
};
template <class T, class D> std::vector<boost::shared_ptr<T>> QueryInterface(const char* functionName) {
template <class T, class D> std::vector<std::shared_ptr<T>> QueryInterface(const char* functionName) {
boost::mutex::scoped_lock lock(this->mutex);
typedef T* STDCALL(PluginInterfaceCall);
std::vector<boost::shared_ptr<T>> plugins;
std::vector<std::shared_ptr<T>> plugins;
HandleList& allDlls = PluginFactory::sInstance.loadedDlls;
typedef HandleList::iterator Iterator;
@ -116,7 +116,7 @@ namespace musik{ namespace core{
T* result = funcPtr();
if (result) {
plugins.push_back(boost::shared_ptr<T>(result, D()));
plugins.push_back(std::shared_ptr<T>(result, D()));
}
}

View File

@ -102,10 +102,10 @@ class Preferences{
~IO(void);
typedef std::map<std::string,Setting> SettingMap;
typedef boost::shared_ptr<SettingMap> SettingMapPtr;
typedef std::shared_ptr<SettingMap> SettingMapPtr;
typedef std::map<std::string,SettingMapPtr> NamespaceMap;
typedef std::map<int,NamespaceMap> LibNamespaceMap;
typedef boost::shared_ptr<IO> Ptr;
typedef std::shared_ptr<IO> Ptr;
SettingMapPtr GetNamespace(const char* nameSpace,const char* library,int &libraryId);

View File

@ -8,7 +8,7 @@ using musik::core::db::Connection;
class CategoryListQuery : public QueryBase {
public:
typedef boost::shared_ptr<std::vector<std::string>> Result;
typedef std::shared_ptr<std::vector<std::string>> Result;
CategoryListQuery();
~CategoryListQuery();

View File

@ -38,6 +38,6 @@ class CategoryListView : public ListWindow, public sigslot::has_slots<> {
LibraryPtr library;
Adapter *adapter;
boost::shared_ptr<CategoryListQuery> activeQuery;
boost::shared_ptr<std::vector<std::string>> metadata;
std::shared_ptr<CategoryListQuery> activeQuery;
std::shared_ptr<std::vector<std::string>> metadata;
};

View File

@ -239,7 +239,7 @@ void CommandWindow::ListPlugins() const {
using musik::core::IPlugin;
using musik::core::PluginFactory;
typedef std::vector<boost::shared_ptr<IPlugin>> PluginList;
typedef std::vector<std::shared_ptr<IPlugin>> PluginList;
typedef PluginFactory::NullDeleter<IPlugin> Deleter;
PluginList plugins = PluginFactory::Instance()

View File

@ -31,7 +31,7 @@ class IScrollAdapter {
virtual int64 GetAttrs() = 0;
};
typedef boost::shared_ptr<IEntry> EntryPtr;
typedef std::shared_ptr<IEntry> EntryPtr;
virtual void SetDisplaySize(size_t width, size_t height) = 0;
virtual size_t GetEntryCount() = 0;

View File

@ -56,7 +56,7 @@ void LogWindow::Update() {
std::string s = boost::str(boost::format(
"[%1%] %2%") % entry->tag % entry->message);
this->adapter->AddEntry(boost::shared_ptr<IEntry>(new MultiLineEntry(s, attrs)));
this->adapter->AddEntry(std::shared_ptr<IEntry>(new MultiLineEntry(s, attrs)));
delete entry;
}

View File

@ -26,11 +26,11 @@ class MainLayout : public LayoutBase {
virtual void OnIdle();
private:
boost::shared_ptr<LogWindow> logs;
boost::shared_ptr<CommandWindow> commands;
boost::shared_ptr<OutputWindow> output;
boost::shared_ptr<TransportWindow> transport;
boost::shared_ptr<ResourcesWindow> resources;
std::shared_ptr<LogWindow> logs;
std::shared_ptr<CommandWindow> commands;
std::shared_ptr<OutputWindow> output;
std::shared_ptr<TransportWindow> transport;
std::shared_ptr<ResourcesWindow> resources;
std::vector<IWindow*> focusOrder;
int focusIndex;

View File

@ -34,7 +34,7 @@ EntryPtr SimpleScrollAdapter::GetEntry(size_t index) {
return this->entries.at(index);
}
void SimpleScrollAdapter::AddEntry(boost::shared_ptr<IEntry> entry) {
void SimpleScrollAdapter::AddEntry(std::shared_ptr<IEntry> entry) {
entry->SetWidth(this->GetWidth());
entries.push_back(entry);