From c733c9d9084fd9dff9fc15a751ec93d465178820 Mon Sep 17 00:00:00 2001 From: mogemimi Date: Wed, 16 Dec 2020 06:09:39 +0900 Subject: [PATCH] Replace shared_ptr with unique_ptr in examples --- examples/FeatureShowcase/Platform.Cocoa/AppDelegate.mm | 2 +- examples/FeatureShowcase/Platform.Win32/main.cpp | 2 +- examples/FeatureShowcase/Platform.X11/main.cpp | 2 +- .../Source/AnimationGraphTest/AnimationGraphTest.cpp | 4 ++-- .../Source/AnimationGraphTest/AnimationGraphTest.hpp | 2 +- .../FeatureShowcase/Source/AudioClipTest/AudioClipTest.cpp | 4 ++-- .../FeatureShowcase/Source/AudioClipTest/AudioClipTest.hpp | 2 +- .../Source/BasicEffectTest/BasicEffectTest.cpp | 4 ++-- .../Source/BasicEffectTest/BasicEffectTest.hpp | 2 +- examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.cpp | 4 ++-- examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.hpp | 2 +- .../Source/BillboardBatchTest/BillboardBatchTest.cpp | 4 ++-- .../Source/BillboardBatchTest/BillboardBatchTest.hpp | 2 +- .../Source/DistanceFieldFontTest/DistanceFieldFontTest.cpp | 4 ++-- .../Source/DistanceFieldFontTest/DistanceFieldFontTest.hpp | 2 +- .../FeatureShowcase/Source/EditorGUITest/EditorGUITest.cpp | 4 ++-- .../FeatureShowcase/Source/EditorGUITest/EditorGUITest.hpp | 2 +- examples/FeatureShowcase/Source/FeatureShowcaseGame.cpp | 2 +- examples/FeatureShowcase/Source/FeatureShowcaseGame.hpp | 2 +- .../FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.cpp | 4 ++-- .../FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.hpp | 2 +- .../FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.cpp | 4 ++-- .../FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.hpp | 2 +- .../Source/GUISplitterTest/GUISplitterTest.cpp | 4 ++-- .../Source/GUISplitterTest/GUISplitterTest.hpp | 2 +- examples/FeatureShowcase/Source/GamepadTest/GamepadTest.cpp | 4 ++-- examples/FeatureShowcase/Source/GamepadTest/GamepadTest.hpp | 2 +- .../Source/HTTPClientTest/HTTPClientTest.cpp | 6 +++--- .../Source/HTTPClientTest/HTTPClientTest.hpp | 2 +- .../HardwareInstancingTest/HardwareInstancingTest.cpp | 4 ++-- .../HardwareInstancingTest/HardwareInstancingTest.hpp | 2 +- .../Source/ImageEffectsTest/ImageEffectsTest.cpp | 4 ++-- .../Source/ImageEffectsTest/ImageEffectsTest.hpp | 2 +- .../FeatureShowcase/Source/LineBatchTest/LineBatchTest.cpp | 4 ++-- .../FeatureShowcase/Source/LineBatchTest/LineBatchTest.hpp | 2 +- .../Source/Particle2DTest/Particle2DTest.cpp | 4 ++-- .../Source/Particle2DTest/Particle2DTest.hpp | 2 +- .../Source/Particle3DTest/Particle3DTest.cpp | 4 ++-- .../Source/Particle3DTest/Particle3DTest.hpp | 2 +- .../ParticleClipLoaderTest/ParticleClipLoaderTest.cpp | 4 ++-- .../ParticleClipLoaderTest/ParticleClipLoaderTest.hpp | 2 +- .../Source/PolylineDrawingTest/PolylineDrawingTest.cpp | 4 ++-- .../Source/PolylineDrawingTest/PolylineDrawingTest.hpp | 2 +- .../Source/PrimitiveBatchTest/PrimitiveBatchTest.cpp | 4 ++-- .../Source/PrimitiveBatchTest/PrimitiveBatchTest.hpp | 2 +- .../FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.cpp | 4 ++-- .../FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.hpp | 2 +- .../Source/Skeletal2DTest/Skeletal2DTest.cpp | 4 ++-- .../Source/Skeletal2DTest/Skeletal2DTest.hpp | 2 +- .../Source/Skinning2DTest/Skinning2DTest.cpp | 4 ++-- .../Source/Skinning2DTest/Skinning2DTest.hpp | 2 +- .../Source/SpriteBatchTest/SpriteBatchTest.cpp | 4 ++-- .../Source/SpriteBatchTest/SpriteBatchTest.hpp | 2 +- .../Source/SpriteFontTest/SpriteFontTest.cpp | 4 ++-- .../Source/SpriteFontTest/SpriteFontTest.hpp | 2 +- .../Source/SpriteLineTest/SpriteLineTest.cpp | 4 ++-- .../Source/SpriteLineTest/SpriteLineTest.hpp | 2 +- .../Source/Texture2DLoaderTest/Texture2DLoaderTest.cpp | 4 ++-- .../Source/Texture2DLoaderTest/Texture2DLoaderTest.hpp | 2 +- .../Source/VoxelModelTest/VoxelModelTest.cpp | 4 ++-- .../Source/VoxelModelTest/VoxelModelTest.hpp | 2 +- examples/Pong/Platform.Cocoa/AppDelegate.mm | 2 +- examples/Pong/Platform.Win32/main.cpp | 2 +- examples/Pong/Platform.X11/main.cpp | 2 +- examples/Pong/Source/PongGame.cpp | 4 ++-- examples/Pong/Source/PongGame.hpp | 2 +- examples/QuickStart/Platform.Cocoa/AppDelegate.mm | 2 +- examples/QuickStart/Platform.Win32/main.cpp | 2 +- examples/QuickStart/Platform.X11/main.cpp | 2 +- examples/QuickStart/Source/QuickStartGame.cpp | 4 ++-- examples/QuickStart/Source/QuickStartGame.hpp | 2 +- 71 files changed, 102 insertions(+), 102 deletions(-) diff --git a/examples/FeatureShowcase/Platform.Cocoa/AppDelegate.mm b/examples/FeatureShowcase/Platform.Cocoa/AppDelegate.mm index 7b433bfe5..c36982adf 100644 --- a/examples/FeatureShowcase/Platform.Cocoa/AppDelegate.mm +++ b/examples/FeatureShowcase/Platform.Cocoa/AppDelegate.mm @@ -42,7 +42,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNotification bootstrap.SetWindow(self.window); bootstrap.SetOpenGLEnabled(false); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); }); diff --git a/examples/FeatureShowcase/Platform.Win32/main.cpp b/examples/FeatureShowcase/Platform.Win32/main.cpp index 393f2693b..68076a792 100644 --- a/examples/FeatureShowcase/Platform.Win32/main.cpp +++ b/examples/FeatureShowcase/Platform.Win32/main.cpp @@ -44,7 +44,7 @@ int APIENTRY _tWinMain( bootstrap.SetBackBufferSize(800, 480); bootstrap.SetOpenGLEnabled(false); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); #if defined(POMDOG_CRTDEBUG) _CrtDbgBreak(); diff --git a/examples/FeatureShowcase/Platform.X11/main.cpp b/examples/FeatureShowcase/Platform.X11/main.cpp index 441b48f82..81bef4fd3 100644 --- a/examples/FeatureShowcase/Platform.X11/main.cpp +++ b/examples/FeatureShowcase/Platform.X11/main.cpp @@ -16,7 +16,7 @@ int main(int argc, char** argv) Pomdog::X11::Bootstrap bootstrap; bootstrap.SetBackBufferSize(800, 480); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); }); diff --git a/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.cpp b/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.cpp index 50a02f5c2..745c3bd75 100644 --- a/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.cpp +++ b/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.cpp @@ -20,12 +20,12 @@ AnimationGraphTest::AnimationGraphTest(const std::shared_ptr& gameHost { } -std::shared_ptr AnimationGraphTest::Initialize() +std::unique_ptr AnimationGraphTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.hpp b/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.hpp index 682ee53ea..2c4927628 100644 --- a/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.hpp +++ b/examples/FeatureShowcase/Source/AnimationGraphTest/AnimationGraphTest.hpp @@ -20,7 +20,7 @@ class AnimationGraphTest final : public Game { public: explicit AnimationGraphTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.cpp b/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.cpp index bad8b523a..c69da1e4e 100644 --- a/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.cpp +++ b/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.cpp @@ -9,12 +9,12 @@ AudioClipTest::AudioClipTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr AudioClipTest::Initialize() +std::unique_ptr AudioClipTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.hpp b/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.hpp index 31c7a002c..e86c02a3b 100644 --- a/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.hpp +++ b/examples/FeatureShowcase/Source/AudioClipTest/AudioClipTest.hpp @@ -15,7 +15,7 @@ class AudioClipTest final : public Game { public: explicit AudioClipTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.cpp b/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.cpp index 2dd505dba..b588c2580 100644 --- a/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.cpp +++ b/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.cpp @@ -11,12 +11,12 @@ BasicEffectTest::BasicEffectTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr BasicEffectTest::Initialize() +std::unique_ptr BasicEffectTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.hpp b/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.hpp index 111eb2c81..90daff95c 100644 --- a/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.hpp +++ b/examples/FeatureShowcase/Source/BasicEffectTest/BasicEffectTest.hpp @@ -10,7 +10,7 @@ class BasicEffectTest final : public Game { public: explicit BasicEffectTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.cpp b/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.cpp index 330b2c99c..f3789e2d6 100644 --- a/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.cpp +++ b/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.cpp @@ -12,12 +12,12 @@ Beam2DTest::Beam2DTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr Beam2DTest::Initialize() +std::unique_ptr Beam2DTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.hpp b/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.hpp index ef3b45057..90e40e213 100644 --- a/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.hpp +++ b/examples/FeatureShowcase/Source/Beam2DTest/Beam2DTest.hpp @@ -13,7 +13,7 @@ class Beam2DTest final : public Game { public: explicit Beam2DTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.cpp b/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.cpp index f2a64bdb6..c87fe3dfb 100644 --- a/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.cpp +++ b/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.cpp @@ -11,12 +11,12 @@ BillboardBatchTest::BillboardBatchTest(const std::shared_ptr& gameHost { } -std::shared_ptr BillboardBatchTest::Initialize() +std::unique_ptr BillboardBatchTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.hpp b/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.hpp index ce2df5f33..8424d51eb 100644 --- a/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.hpp +++ b/examples/FeatureShowcase/Source/BillboardBatchTest/BillboardBatchTest.hpp @@ -12,7 +12,7 @@ class BillboardBatchTest final : public Game { public: explicit BillboardBatchTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.cpp b/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.cpp index 711faf560..f6446b673 100644 --- a/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.cpp +++ b/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.cpp @@ -10,12 +10,12 @@ DistanceFieldFontTest::DistanceFieldFontTest(const std::shared_ptr& ga { } -std::shared_ptr DistanceFieldFontTest::Initialize() +std::unique_ptr DistanceFieldFontTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.hpp b/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.hpp index cf0a46a7d..4a8f9c0e0 100644 --- a/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.hpp +++ b/examples/FeatureShowcase/Source/DistanceFieldFontTest/DistanceFieldFontTest.hpp @@ -15,7 +15,7 @@ class DistanceFieldFontTest final : public Game { public: explicit DistanceFieldFontTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.cpp b/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.cpp index 0c519daf7..835b8d2e5 100644 --- a/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.cpp +++ b/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.cpp @@ -9,12 +9,12 @@ EditorGUITest::EditorGUITest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr EditorGUITest::Initialize() +std::unique_ptr EditorGUITest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.hpp b/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.hpp index f37633eb3..bc585afe6 100644 --- a/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.hpp +++ b/examples/FeatureShowcase/Source/EditorGUITest/EditorGUITest.hpp @@ -34,7 +34,7 @@ class EditorGUITest final : public Game { public: explicit EditorGUITest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/FeatureShowcaseGame.cpp b/examples/FeatureShowcase/Source/FeatureShowcaseGame.cpp index 8d8eab5c9..190e5dd80 100644 --- a/examples/FeatureShowcase/Source/FeatureShowcaseGame.cpp +++ b/examples/FeatureShowcase/Source/FeatureShowcaseGame.cpp @@ -42,7 +42,7 @@ FeatureShowcaseGame::FeatureShowcaseGame(const std::shared_ptr& gameHo { } -std::shared_ptr +std::unique_ptr FeatureShowcaseGame::Initialize() { window->SetTitle("Feature Showcase"); diff --git a/examples/FeatureShowcase/Source/FeatureShowcaseGame.hpp b/examples/FeatureShowcase/Source/FeatureShowcaseGame.hpp index 2df1e71a8..c476c2f65 100644 --- a/examples/FeatureShowcase/Source/FeatureShowcaseGame.hpp +++ b/examples/FeatureShowcase/Source/FeatureShowcaseGame.hpp @@ -29,7 +29,7 @@ class FeatureShowcaseGame final : public Game { public: explicit FeatureShowcaseGame(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.cpp b/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.cpp index e102c320c..2c2dea810 100644 --- a/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.cpp +++ b/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.cpp @@ -15,12 +15,12 @@ GIFDecodeTest::GIFDecodeTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr GIFDecodeTest::Initialize() +std::unique_ptr GIFDecodeTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.hpp b/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.hpp index 29297e6b7..3199736fe 100644 --- a/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.hpp +++ b/examples/FeatureShowcase/Source/GIFDecodeTest/GIFDecodeTest.hpp @@ -13,7 +13,7 @@ class GIFDecodeTest final : public Game { public: explicit GIFDecodeTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.cpp b/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.cpp index e668818b2..7be5205fa 100644 --- a/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.cpp +++ b/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.cpp @@ -13,12 +13,12 @@ GLTFModelTest::GLTFModelTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr GLTFModelTest::Initialize() +std::unique_ptr GLTFModelTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.hpp b/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.hpp index f6e3e83d6..8b42f8bae 100644 --- a/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.hpp +++ b/examples/FeatureShowcase/Source/GLTFModelTest/GLTFModelTest.hpp @@ -10,7 +10,7 @@ class GLTFModelTest final : public Game { public: explicit GLTFModelTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.cpp b/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.cpp index d0551f14a..95b4734eb 100644 --- a/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.cpp +++ b/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.cpp @@ -9,12 +9,12 @@ GUISplitterTest::GUISplitterTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr GUISplitterTest::Initialize() +std::unique_ptr GUISplitterTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.hpp b/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.hpp index 90852e2fb..0740ebd24 100644 --- a/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.hpp +++ b/examples/FeatureShowcase/Source/GUISplitterTest/GUISplitterTest.hpp @@ -14,7 +14,7 @@ class GUISplitterTest final : public Game { public: explicit GUISplitterTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.cpp b/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.cpp index 05fd5d1be..030f57b52 100644 --- a/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.cpp +++ b/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.cpp @@ -9,12 +9,12 @@ GamepadTest::GamepadTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr GamepadTest::Initialize() +std::unique_ptr GamepadTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.hpp b/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.hpp index a059d2b6c..d0fe9339d 100644 --- a/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.hpp +++ b/examples/FeatureShowcase/Source/GamepadTest/GamepadTest.hpp @@ -16,7 +16,7 @@ class GamepadTest final : public Game { public: explicit GamepadTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.cpp b/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.cpp index 62971d042..2071ed026 100644 --- a/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.cpp +++ b/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.cpp @@ -9,12 +9,12 @@ HTTPClientTest::HTTPClientTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr HTTPClientTest::Initialize() +std::unique_ptr HTTPClientTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); @@ -33,7 +33,7 @@ std::shared_ptr HTTPClientTest::Initialize() spriteFont->PrepareFonts("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345689.,!?-+/():;%&`'*#=[]\" "); auto http = gameHost->GetHTTPClient(); - auto callback = [this](const std::shared_ptr& resp, const std::shared_ptr& err) { + auto callback = [this](const std::shared_ptr& resp, const std::unique_ptr& err) { if (err != nullptr) { webText = err->ToString(); return; diff --git a/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.hpp b/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.hpp index a30710400..91d977473 100644 --- a/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.hpp +++ b/examples/FeatureShowcase/Source/HTTPClientTest/HTTPClientTest.hpp @@ -15,7 +15,7 @@ class HTTPClientTest final : public Game { public: explicit HTTPClientTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.cpp b/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.cpp index 040627a82..7893a4b6a 100644 --- a/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.cpp +++ b/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.cpp @@ -11,12 +11,12 @@ HardwareInstancingTest::HardwareInstancingTest(const std::shared_ptr& { } -std::shared_ptr HardwareInstancingTest::Initialize() +std::unique_ptr HardwareInstancingTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.hpp b/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.hpp index 912d5b0bb..b3d585bef 100644 --- a/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.hpp +++ b/examples/FeatureShowcase/Source/HardwareInstancingTest/HardwareInstancingTest.hpp @@ -10,7 +10,7 @@ class HardwareInstancingTest final : public Game { public: explicit HardwareInstancingTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.cpp b/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.cpp index 3611da8fb..39a2ab76d 100644 --- a/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.cpp +++ b/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.cpp @@ -17,12 +17,12 @@ ImageEffectsTest::ImageEffectsTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr ImageEffectsTest::Initialize() +std::unique_ptr ImageEffectsTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.hpp b/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.hpp index 6941ae15b..42b8f6992 100644 --- a/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.hpp +++ b/examples/FeatureShowcase/Source/ImageEffectsTest/ImageEffectsTest.hpp @@ -13,7 +13,7 @@ class ImageEffectsTest final : public Game { public: explicit ImageEffectsTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.cpp b/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.cpp index 7bf7941e6..7274f00dd 100644 --- a/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.cpp +++ b/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.cpp @@ -10,12 +10,12 @@ LineBatchTest::LineBatchTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr LineBatchTest::Initialize() +std::unique_ptr LineBatchTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.hpp b/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.hpp index f85505fed..39f18b283 100644 --- a/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.hpp +++ b/examples/FeatureShowcase/Source/LineBatchTest/LineBatchTest.hpp @@ -11,7 +11,7 @@ class LineBatchTest final : public Game { public: explicit LineBatchTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.cpp b/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.cpp index 5f7776860..1d2314c16 100644 --- a/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.cpp +++ b/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.cpp @@ -124,12 +124,12 @@ Particle2DTest::Particle2DTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr Particle2DTest::Initialize() +std::unique_ptr Particle2DTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.hpp b/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.hpp index 08fa88801..f75e82ceb 100644 --- a/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.hpp +++ b/examples/FeatureShowcase/Source/Particle2DTest/Particle2DTest.hpp @@ -14,7 +14,7 @@ class Particle2DTest final : public Game { public: explicit Particle2DTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.cpp b/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.cpp index f983abc99..e6832f4d4 100644 --- a/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.cpp +++ b/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.cpp @@ -36,12 +36,12 @@ Particle3DTest::Particle3DTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr Particle3DTest::Initialize() +std::unique_ptr Particle3DTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.hpp b/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.hpp index dd9b8862b..25d1b9ef6 100644 --- a/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.hpp +++ b/examples/FeatureShowcase/Source/Particle3DTest/Particle3DTest.hpp @@ -14,7 +14,7 @@ class Particle3DTest final : public Game { public: explicit Particle3DTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.cpp b/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.cpp index 9e5298442..78a07c427 100644 --- a/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.cpp +++ b/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.cpp @@ -11,12 +11,12 @@ ParticleClipLoaderTest::ParticleClipLoaderTest(const std::shared_ptr& { } -std::shared_ptr ParticleClipLoaderTest::Initialize() +std::unique_ptr ParticleClipLoaderTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.hpp b/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.hpp index 5e21d42bb..eada65eff 100644 --- a/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.hpp +++ b/examples/FeatureShowcase/Source/ParticleClipLoaderTest/ParticleClipLoaderTest.hpp @@ -14,7 +14,7 @@ class ParticleClipLoaderTest final : public Game { public: explicit ParticleClipLoaderTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.cpp b/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.cpp index 25fbfab66..977267c49 100644 --- a/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.cpp +++ b/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.cpp @@ -10,12 +10,12 @@ PolylineDrawingTest::PolylineDrawingTest(const std::shared_ptr& gameHo { } -std::shared_ptr PolylineDrawingTest::Initialize() +std::unique_ptr PolylineDrawingTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.hpp b/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.hpp index 5754908cb..6f867f63d 100644 --- a/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.hpp +++ b/examples/FeatureShowcase/Source/PolylineDrawingTest/PolylineDrawingTest.hpp @@ -11,7 +11,7 @@ class PolylineDrawingTest final : public Game { public: explicit PolylineDrawingTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.cpp b/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.cpp index 6cb189afb..4a56f3553 100644 --- a/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.cpp +++ b/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.cpp @@ -10,12 +10,12 @@ PrimitiveBatchTest::PrimitiveBatchTest(const std::shared_ptr& gameHost { } -std::shared_ptr PrimitiveBatchTest::Initialize() +std::unique_ptr PrimitiveBatchTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.hpp b/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.hpp index f4c0ac7cc..0d150c3d1 100644 --- a/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.hpp +++ b/examples/FeatureShowcase/Source/PrimitiveBatchTest/PrimitiveBatchTest.hpp @@ -11,7 +11,7 @@ class PrimitiveBatchTest final : public Game { public: explicit PrimitiveBatchTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.cpp b/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.cpp index 994917678..ab34ceaef 100644 --- a/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.cpp +++ b/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.cpp @@ -10,12 +10,12 @@ SVGDecodeTest::SVGDecodeTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr SVGDecodeTest::Initialize() +std::unique_ptr SVGDecodeTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.hpp b/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.hpp index f00bf2824..a9ea6de1d 100644 --- a/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.hpp +++ b/examples/FeatureShowcase/Source/SVGDecodeTest/SVGDecodeTest.hpp @@ -15,7 +15,7 @@ class SVGDecodeTest final : public Game { public: explicit SVGDecodeTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.cpp b/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.cpp index 24a1cdcc1..a733ff9ab 100644 --- a/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.cpp +++ b/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.cpp @@ -18,12 +18,12 @@ Skeletal2DTest::Skeletal2DTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr Skeletal2DTest::Initialize() +std::unique_ptr Skeletal2DTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.hpp b/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.hpp index b3c016593..fffb858de 100644 --- a/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.hpp +++ b/examples/FeatureShowcase/Source/Skeletal2DTest/Skeletal2DTest.hpp @@ -18,7 +18,7 @@ class Skeletal2DTest final : public Game { public: explicit Skeletal2DTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.cpp b/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.cpp index 3828bfcd8..1dd4759a9 100644 --- a/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.cpp +++ b/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.cpp @@ -19,12 +19,12 @@ Skinning2DTest::Skinning2DTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr Skinning2DTest::Initialize() +std::unique_ptr Skinning2DTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.hpp b/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.hpp index bdd586d56..f7658ae2a 100644 --- a/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.hpp +++ b/examples/FeatureShowcase/Source/Skinning2DTest/Skinning2DTest.hpp @@ -19,7 +19,7 @@ class Skinning2DTest final : public Game { public: explicit Skinning2DTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.cpp b/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.cpp index a990c9688..1aa10f80a 100644 --- a/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.cpp +++ b/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.cpp @@ -12,12 +12,12 @@ SpriteBatchTest::SpriteBatchTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr SpriteBatchTest::Initialize() +std::unique_ptr SpriteBatchTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.hpp b/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.hpp index a1e698380..4f9310712 100644 --- a/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.hpp +++ b/examples/FeatureShowcase/Source/SpriteBatchTest/SpriteBatchTest.hpp @@ -12,7 +12,7 @@ class SpriteBatchTest final : public Game { public: explicit SpriteBatchTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.cpp b/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.cpp index ce06f9ee5..2e417bb25 100644 --- a/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.cpp +++ b/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.cpp @@ -9,12 +9,12 @@ SpriteFontTest::SpriteFontTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr SpriteFontTest::Initialize() +std::unique_ptr SpriteFontTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.hpp b/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.hpp index f80414512..32fe52d01 100644 --- a/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.hpp +++ b/examples/FeatureShowcase/Source/SpriteFontTest/SpriteFontTest.hpp @@ -15,7 +15,7 @@ class SpriteFontTest final : public Game { public: explicit SpriteFontTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.cpp b/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.cpp index 6a601f0bb..78041baeb 100644 --- a/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.cpp +++ b/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.cpp @@ -11,12 +11,12 @@ SpriteLineTest::SpriteLineTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr SpriteLineTest::Initialize() +std::unique_ptr SpriteLineTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.hpp b/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.hpp index b9b64c295..097a36fe9 100644 --- a/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.hpp +++ b/examples/FeatureShowcase/Source/SpriteLineTest/SpriteLineTest.hpp @@ -12,7 +12,7 @@ class SpriteLineTest final : public Game { public: explicit SpriteLineTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.cpp b/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.cpp index 114e8f29b..f5d2b88ff 100644 --- a/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.cpp +++ b/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.cpp @@ -9,12 +9,12 @@ Texture2DLoaderTest::Texture2DLoaderTest(const std::shared_ptr& gameHo { } -std::shared_ptr Texture2DLoaderTest::Initialize() +std::unique_ptr Texture2DLoaderTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.hpp b/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.hpp index 7a25ad310..dc60034b1 100644 --- a/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.hpp +++ b/examples/FeatureShowcase/Source/Texture2DLoaderTest/Texture2DLoaderTest.hpp @@ -15,7 +15,7 @@ class Texture2DLoaderTest final : public Game { public: explicit Texture2DLoaderTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.cpp b/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.cpp index 85e79e634..63ca9dad8 100644 --- a/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.cpp +++ b/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.cpp @@ -9,12 +9,12 @@ VoxelModelTest::VoxelModelTest(const std::shared_ptr& gameHostIn) { } -std::shared_ptr VoxelModelTest::Initialize() +std::unique_ptr VoxelModelTest::Initialize() { auto assets = gameHost->GetAssetManager(); auto clock = gameHost->GetClock(); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.hpp b/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.hpp index 62a73b2f5..99fe3171d 100644 --- a/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.hpp +++ b/examples/FeatureShowcase/Source/VoxelModelTest/VoxelModelTest.hpp @@ -13,7 +13,7 @@ class VoxelModelTest final : public Game { public: explicit VoxelModelTest(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/Pong/Platform.Cocoa/AppDelegate.mm b/examples/Pong/Platform.Cocoa/AppDelegate.mm index 2e67f4ede..5dec462d7 100644 --- a/examples/Pong/Platform.Cocoa/AppDelegate.mm +++ b/examples/Pong/Platform.Cocoa/AppDelegate.mm @@ -42,7 +42,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNotification bootstrap.SetWindow(self.window); bootstrap.SetOpenGLEnabled(false); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); }); diff --git a/examples/Pong/Platform.Win32/main.cpp b/examples/Pong/Platform.Win32/main.cpp index 756698820..4706fab54 100644 --- a/examples/Pong/Platform.Win32/main.cpp +++ b/examples/Pong/Platform.Win32/main.cpp @@ -44,7 +44,7 @@ int APIENTRY _tWinMain( bootstrap.SetBackBufferSize(800, 480); bootstrap.SetOpenGLEnabled(false); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); #if defined(POMDOG_CRTDEBUG) _CrtDbgBreak(); diff --git a/examples/Pong/Platform.X11/main.cpp b/examples/Pong/Platform.X11/main.cpp index af1d55072..37d27462a 100644 --- a/examples/Pong/Platform.X11/main.cpp +++ b/examples/Pong/Platform.X11/main.cpp @@ -16,7 +16,7 @@ int main(int argc, char** argv) Pomdog::X11::Bootstrap bootstrap; bootstrap.SetBackBufferSize(800, 480); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); }); diff --git a/examples/Pong/Source/PongGame.cpp b/examples/Pong/Source/PongGame.cpp index f011e26a8..9136dc23e 100644 --- a/examples/Pong/Source/PongGame.cpp +++ b/examples/Pong/Source/PongGame.cpp @@ -25,7 +25,7 @@ PongGame::PongGame(const std::shared_ptr& gameHostIn) window->SetAllowUserResizing(true); } -std::shared_ptr PongGame::Initialize() +std::unique_ptr PongGame::Initialize() { // NOTE: Set window name window->SetTitle("Pomdog Pong"); @@ -33,7 +33,7 @@ std::shared_ptr PongGame::Initialize() // NOTE: Set main volume audioEngine->SetMainVolume(0.4f); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/Pong/Source/PongGame.hpp b/examples/Pong/Source/PongGame.hpp index a3b9afb0c..dbbbd09db 100644 --- a/examples/Pong/Source/PongGame.hpp +++ b/examples/Pong/Source/PongGame.hpp @@ -143,7 +143,7 @@ class PongGame final : public Game { public: explicit PongGame(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override; diff --git a/examples/QuickStart/Platform.Cocoa/AppDelegate.mm b/examples/QuickStart/Platform.Cocoa/AppDelegate.mm index 361e8673e..fdfbd2444 100644 --- a/examples/QuickStart/Platform.Cocoa/AppDelegate.mm +++ b/examples/QuickStart/Platform.Cocoa/AppDelegate.mm @@ -42,7 +42,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNotification bootstrap.SetWindow(self.window); bootstrap.SetOpenGLEnabled(false); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); }); diff --git a/examples/QuickStart/Platform.Win32/main.cpp b/examples/QuickStart/Platform.Win32/main.cpp index 755b65ac0..c7968c32a 100644 --- a/examples/QuickStart/Platform.Win32/main.cpp +++ b/examples/QuickStart/Platform.Win32/main.cpp @@ -44,7 +44,7 @@ int APIENTRY _tWinMain( bootstrap.SetBackBufferSize(800, 480); bootstrap.SetOpenGLEnabled(false); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); #if defined(POMDOG_CRTDEBUG) _CrtDbgBreak(); diff --git a/examples/QuickStart/Platform.X11/main.cpp b/examples/QuickStart/Platform.X11/main.cpp index 17d1a3235..6141a9e1f 100644 --- a/examples/QuickStart/Platform.X11/main.cpp +++ b/examples/QuickStart/Platform.X11/main.cpp @@ -16,7 +16,7 @@ int main(int argc, char** argv) Pomdog::X11::Bootstrap bootstrap; bootstrap.SetBackBufferSize(800, 480); - bootstrap.OnError([](std::shared_ptr&& err) { + bootstrap.OnError([](std::unique_ptr&& err) { Log::Critical("Pomdog", err->ToString()); }); diff --git a/examples/QuickStart/Source/QuickStartGame.cpp b/examples/QuickStart/Source/QuickStartGame.cpp index af6c6dfdd..eae392649 100644 --- a/examples/QuickStart/Source/QuickStartGame.cpp +++ b/examples/QuickStart/Source/QuickStartGame.cpp @@ -14,7 +14,7 @@ QuickStartGame::QuickStartGame(const std::shared_ptr& gameHostIn) { } -std::shared_ptr QuickStartGame::Initialize() +std::unique_ptr QuickStartGame::Initialize() { // NOTE: Display message in log console Log::Verbose("Hello, QuickStart."); @@ -22,7 +22,7 @@ std::shared_ptr QuickStartGame::Initialize() // NOTE: Set window name window->SetTitle("QuickStart"); - std::shared_ptr err; + std::unique_ptr err; // NOTE: Create graphics command list std::tie(commandList, err) = graphicsDevice->CreateGraphicsCommandList(); diff --git a/examples/QuickStart/Source/QuickStartGame.hpp b/examples/QuickStart/Source/QuickStartGame.hpp index 95b390357..e6691ca34 100644 --- a/examples/QuickStart/Source/QuickStartGame.hpp +++ b/examples/QuickStart/Source/QuickStartGame.hpp @@ -15,7 +15,7 @@ class QuickStartGame final : public Game { public: explicit QuickStartGame(const std::shared_ptr& gameHost); - [[nodiscard]] std::shared_ptr + [[nodiscard]] std::unique_ptr Initialize() override; void Update() override;