ALL: replaced std::shared_ptr with core::SharedPtr

master
Martin Gerhardy 2021-07-29 20:27:28 +02:00
parent 981a0bc5d6
commit eaf813ea0d
5 changed files with 6 additions and 7 deletions

View File

@ -486,7 +486,7 @@ int main(int argc, char *argv[]) {
const voxelworld::WorldMgrPtr& world = std::make_shared<voxelworld::WorldMgr>(pager);
const metric::MetricPtr& metric = std::make_shared<metric::Metric>();
const stock::StockDataProviderPtr& stockDataProvider = std::make_shared<stock::StockDataProvider>();
const video::TexturePoolPtr& texturePool = std::make_shared<video::TexturePool>(filesystem);
const video::TexturePoolPtr& texturePool = core::make_shared<video::TexturePool>(filesystem);
const audio::SoundManagerPtr& soundMgr = core::make_shared<audio::SoundManager>(filesystem);
const voxelworldrender::AssetVolumeCachePtr& assetVolumeCache = core::make_shared<voxelworldrender::AssetVolumeCache>(volumeCache);
Client app(metric, animationCache, stockDataProvider, network, world, pager, messageSender,

View File

@ -11,11 +11,10 @@
#include "Console.h"
#include "RenderShaders.h"
#include "NuklearNode.h"
#include <memory>
namespace video {
class TexturePool;
using TexturePoolPtr = std::shared_ptr<TexturePool>;
using TexturePoolPtr = core::SharedPtr<TexturePool>;
class TextureAtlasRenderer;
using TextureAtlasRendererPtr = core::SharedPtr<TextureAtlasRenderer>;

View File

@ -8,8 +8,8 @@
#include "io/Filesystem.h"
#include "Texture.h"
#include "core/String.h"
#include "core/SharedPtr.h"
#include "core/collection/StringMap.h"
#include <memory>
namespace video {
@ -30,6 +30,6 @@ public:
void clear();
};
typedef std::shared_ptr<TexturePool> TexturePoolPtr;
typedef core::SharedPtr<TexturePool> TexturePoolPtr;
}

View File

@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
const core::EventBusPtr& eventBus = std::make_shared<core::EventBus>();
const io::FilesystemPtr& filesystem = std::make_shared<io::Filesystem>();
const core::TimeProviderPtr& timeProvider = std::make_shared<core::TimeProvider>();
const video::TexturePoolPtr& texturePool = std::make_shared<video::TexturePool>(filesystem);
const video::TexturePoolPtr& texturePool = core::make_shared<video::TexturePool>(filesystem);
const metric::MetricPtr& metric = std::make_shared<metric::Metric>();
TestLUAUI app(metric, filesystem, eventBus, timeProvider, texturePool, meshRenderer, textureAtlasRenderer);
return app.startMainLoop(argc, argv);

View File

@ -105,7 +105,7 @@ int main(int argc, char *argv[]) {
const core::EventBusPtr& eventBus = std::make_shared<core::EventBus>();
const io::FilesystemPtr& filesystem = std::make_shared<io::Filesystem>();
const core::TimeProviderPtr& timeProvider = std::make_shared<core::TimeProvider>();
const video::TexturePoolPtr& texturePool = std::make_shared<video::TexturePool>(filesystem);
const video::TexturePoolPtr& texturePool = core::make_shared<video::TexturePool>(filesystem);
const metric::MetricPtr& metric = std::make_shared<metric::Metric>();
TestNuklear app(metric, filesystem, eventBus, timeProvider, texturePool, meshRenderer, textureAtlasRenderer);
return app.startMainLoop(argc, argv);