diff --git a/src/accelerator/ogl/image/image_mixer.cpp b/src/accelerator/ogl/image/image_mixer.cpp index 56212e239f..e5add850a0 100644 --- a/src/accelerator/ogl/image/image_mixer.cpp +++ b/src/accelerator/ogl/image/image_mixer.cpp @@ -38,9 +38,7 @@ #include -#include - -#include +#include #include namespace caspar { namespace accelerator { namespace ogl { @@ -274,7 +272,7 @@ struct image_mixer::impl item.transform = transform_stack_.back(); item.geometry = frame.geometry(); - auto textures_ptr = boost::any_cast>>(frame.opaque()); + auto textures_ptr = std::any_cast>>(frame.opaque()); if (textures_ptr) { item.textures = *textures_ptr; @@ -314,10 +312,10 @@ struct image_mixer::impl std::move(image_data), array{}, desc, - [weak_self, desc](std::vector> image_data) -> boost::any { + [weak_self, desc](std::vector> image_data) -> std::any { auto self = weak_self.lock(); if (!self) { - return boost::any{}; + return std::any{}; } std::vector textures; for (int n = 0; n < static_cast(desc.planes.size()); ++n) { diff --git a/src/common/array.h b/src/common/array.h index b7a6019b71..9dd676e46b 100644 --- a/src/common/array.h +++ b/src/common/array.h @@ -1,9 +1,9 @@ #pragma once -#include - +#include #include #include +#include #include #include @@ -28,7 +28,7 @@ class array final auto storage = std::shared_ptr(std::malloc(size), std::free); ptr_ = reinterpret_cast(storage.get()); std::memset(ptr_, 0, size_); - storage_ = std::make_shared(std::move(storage)); + storage_ = std::make_shared(std::move(storage)); } } @@ -37,14 +37,14 @@ class array final auto storage = std::make_shared>(std::move(other)); ptr_ = storage->data(); size_ = storage->size(); - storage_ = std::make_shared(std::move(storage)); + storage_ = std::make_shared(std::move(storage)); } template explicit array(T* ptr, std::size_t size, S&& storage) : ptr_(ptr) , size_(size) - , storage_(std::make_shared(std::forward(storage))) + , storage_(std::make_shared(std::forward(storage))) { } @@ -80,13 +80,13 @@ class array final template S* storage() const { - return boost::any_cast(storage_.get()); + return std::any_cast(storage_.get()); } private: - T* ptr_ = nullptr; - std::size_t size_ = 0; - std::shared_ptr storage_; + T* ptr_ = nullptr; + std::size_t size_ = 0; + std::shared_ptr storage_; }; template @@ -105,7 +105,7 @@ class array final auto storage = std::shared_ptr(std::malloc(size), std::free); ptr_ = reinterpret_cast(storage.get()); std::memset(ptr_, 0, size_); - storage_ = std::make_shared(storage); + storage_ = std::make_shared(storage); } } @@ -114,14 +114,14 @@ class array final auto storage = std::make_shared>(std::move(other)); ptr_ = storage->data(); size_ = storage->size(); - storage_ = std::make_shared(std::move(storage)); + storage_ = std::make_shared(std::move(storage)); } template explicit array(const T* ptr, std::size_t size, S&& storage) : ptr_(ptr) , size_(size) - , storage_(std::make_shared(std::forward(storage))) + , storage_(std::make_shared(std::forward(storage))) { } @@ -160,13 +160,13 @@ class array final template S* storage() const { - return boost::any_cast(storage_.get()); + return std::any_cast(storage_.get()); } private: - const T* ptr_ = nullptr; - std::size_t size_ = 0; - std::shared_ptr storage_; + const T* ptr_ = nullptr; + std::size_t size_ = 0; + std::shared_ptr storage_; }; } // namespace caspar diff --git a/src/core/frame/frame.cpp b/src/core/frame/frame.cpp index 4eb5193f18..b0450e88b5 100644 --- a/src/core/frame/frame.cpp +++ b/src/core/frame/frame.cpp @@ -93,7 +93,7 @@ struct const_frame::impl array audio_data_; core::pixel_format_desc desc_ = core::pixel_format_desc(pixel_format::invalid); frame_geometry geometry_ = frame_geometry::get_default(); - boost::any opaque_; + std::any opaque_; impl(std::vector> image_data, array audio_data, @@ -175,6 +175,6 @@ std::size_t const_frame::width() const { return impl_->widt std::size_t const_frame::height() const { return impl_->height(); } std::size_t const_frame::size() const { return impl_->size(); } const frame_geometry& const_frame::geometry() const { return impl_->geometry_; } -const boost::any& const_frame::opaque() const { return impl_->opaque_; } +const std::any& const_frame::opaque() const { return impl_->opaque_; } const_frame::operator bool() const { return impl_ != nullptr && impl_->desc_.format != core::pixel_format::invalid; } }} // namespace caspar::core diff --git a/src/core/frame/frame.h b/src/core/frame/frame.h index e5fc4ef60c..de2b16b027 100644 --- a/src/core/frame/frame.h +++ b/src/core/frame/frame.h @@ -2,8 +2,7 @@ #include -#include - +#include #include #include #include @@ -17,7 +16,7 @@ class mutable_frame final friend class const_frame; public: - using commit_t = std::function>)>; + using commit_t = std::function>)>; explicit mutable_frame(const void* tag, std::vector> image_data, @@ -80,7 +79,7 @@ class const_frame final std::size_t size() const; - const boost::any& opaque() const; + const std::any& opaque() const; const class frame_geometry& geometry() const;