]> git.sesse.net Git - casparcg/commitdiff
Remove most of boost::lexical_cast.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 6 May 2017 20:51:37 +0000 (22:51 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 6 May 2017 20:52:17 +0000 (22:52 +0200)
Replace it with std::to_string, std::stoi and similar functions
whenever we have an 1:1 mapping.

Reduces compilation time from 4:59 to 4:54 on my system.

57 files changed:
accelerator/ogl/image/image_kernel.cpp
common/os/linux/system_info.cpp
common/os/windows/win32_exception.cpp
common/ptree.h
common/software_version.h
common/tweener.cpp
core/consumer/output.cpp
core/consumer/port.cpp
core/consumer/syncto/syncto_consumer.cpp
core/diagnostics/call_context.cpp
core/diagnostics/osd_graph.cpp
core/diagnostics/subject_diagnostics.cpp
core/frame/audio_channel_layout.cpp
core/frame/frame.cpp
core/mixer/audio/audio_mixer.cpp
core/mixer/mixer.cpp
core/producer/framerate/framerate_producer.cpp
core/producer/layer.cpp
core/producer/scene/expression_parser.cpp
core/producer/scene/scene_producer.cpp
core/producer/scene/xml_scene_producer.cpp
core/producer/stage.cpp
core/producer/text/text_producer.cpp
core/video_channel.cpp
modules/bluefish/bluefish.cpp
modules/bluefish/consumer/bluefish_consumer.cpp
modules/decklink/consumer/decklink_consumer.cpp
modules/decklink/decklink.cpp
modules/decklink/producer/decklink_producer.cpp
modules/decklink/util/util.h
modules/ffmpeg/StdAfx.h
modules/ffmpeg/audio_channel_remapper.cpp
modules/ffmpeg/consumer/ffmpeg_consumer.cpp
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/producer/filter/audio_filter.cpp
modules/ffmpeg/producer/input/input.cpp
modules/ffmpeg/producer/muxer/frame_muxer.cpp
modules/ffmpeg/producer/util/flv.cpp
modules/ffmpeg/producer/util/util.cpp
modules/flash/producer/flash_producer.cpp
modules/html/html.cpp
modules/image/producer/image_scroll_producer.cpp
modules/oal/consumer/oal_consumer.cpp
modules/psd/layer.cpp
modules/psd/util/pdf_reader.cpp
modules/reroute/producer/channel_producer.cpp
modules/reroute/producer/layer_producer.cpp
modules/reroute/producer/reroute_producer.cpp
modules/screen/consumer/screen_consumer.cpp
protocol/amcp/AMCPCommandQueue.cpp
protocol/amcp/AMCPCommandsImpl.cpp
protocol/amcp/AMCPProtocolStrategy.cpp
protocol/amcp/amcp_command_repository.cpp
protocol/cii/CIICommandsImpl.cpp
protocol/util/AsyncEventServer.cpp
shell/main.cpp
shell/server.cpp

index 42c19fea1ee9c65a20a95bde1bafc57509e926aa..342037ba46679941bbc773283306465595e16fed 100644 (file)
@@ -39,7 +39,6 @@
 #include <core/frame/frame_transform.h>
 
 #include <boost/algorithm/cxx11/all_of.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/range/adaptor/transformed.hpp>
 
 #include <cmath>
@@ -254,7 +253,7 @@ struct image_kernel::impl
                shader_->set("plane[2]",                texture_id::plane2);
                shader_->set("plane[3]",                texture_id::plane3);
                for (int n = 0; n < params.textures.size(); ++n)
-                       shader_->set("plane_size[" + boost::lexical_cast<std::string>(n) + "]",
+                       shader_->set("plane_size[" + std::to_string(n) + "]",
                                                 static_cast<float>(params.textures[n]->width()),
                                                 static_cast<float>(params.textures[n]->height()));
 
index 4b05d86e91ef89109d9bbfaef5e80a2daa085121..aa192120586a693214ffe4bb830b7d270c97c881 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/split.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/range/algorithm/count.hpp>
 #include <boost/iostreams/filter/grep.hpp>
 #include <boost/iostreams/filter/line.hpp>
@@ -126,7 +125,7 @@ struct wc : boost::iostreams::aggregate_filter<wchar_t>
        void do_filter(const std::vector<wchar_t>& src, std::vector<wchar_t>& dest) override
        {
                auto line_count = boost::range::count(src, L'\n') + 4;
-               auto out = boost::lexical_cast<std::wstring>(line_count);
+               auto out = std::to_wstring(line_count);
                dest.insert(dest.begin(), out.begin(), out.end());
                dest.push_back('\n');
        }
index 267696f03eb1e39fe5043232317d87a2451c2e74..37a8e8a7013f888aa3bc2b000a9f408acb5a9d83 100644 (file)
@@ -2,8 +2,6 @@
 
 #include "win32_exception.h"
 
-#include <boost/lexical_cast.hpp>
-
 #include "../../thread_info.h"
 #include "windows.h"
 
@@ -83,7 +81,7 @@ msg_info_t generate_message(const EXCEPTION_RECORD& info)
                        auto bad_address = reinterpret_cast<const void*>(info.ExceptionInformation[1]);
                        auto location = info.ExceptionAddress;
 
-                       return "Access violation at " + boost::lexical_cast<std::string>(location) + " trying to " + (is_write ? "write " : "read ") + boost::lexical_cast<std::string>(bad_address);
+                       return "Access violation at " + std::to_string(location) + " trying to " + (is_write ? "write " : "read ") + std::to_string(bad_address);
                }
        case EXCEPTION_FLT_DIVIDE_BY_ZERO:
        case EXCEPTION_INT_DIVIDE_BY_ZERO:
index 41d796f3aaef8080ddb16344dbc4281ebdb16a2f..c873af25d4aed7208a3092fab2bbf844d0a38fcc 100644 (file)
@@ -28,7 +28,6 @@
 #include <boost/property_tree/ptree.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/range/adaptor/transformed.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/iterator/iterator_facade.hpp>
 
 #include <map>
@@ -177,7 +176,7 @@ struct basic_scoped_element_translator
                if (!ctx) // Lazy
                        ctx.reset(new scoped_context);
 
-               ctx->replace_msg("/" + u8(pair.first) + "[" + boost::lexical_cast<std::string>(++by_name[pair.first]) + "]");
+               ctx->replace_msg("/" + u8(pair.first) + "[" + std::to_string(++by_name[pair.first]) + "]");
                return pair;
        }
 };
index 9ffb9944ac1126294325e0e50dbc3cd6687c75be..d75b76c878e2bccc74d0fb1ff3f9686205a2d9a3 100644 (file)
@@ -47,9 +47,9 @@ public:
                {
                        try
                        {
-                               numbers_[i] = boost::lexical_cast<int>(tokens[i]);
+                               numbers_[i] = std::stoi(tokens[i]);
                        }
-                       catch (const boost::bad_lexical_cast&)
+                       catch (const std::invalid_argument&)
                        {
                                return;
                        }
index e92cec8dbd3cf293437372707bbc5193a55b31e5..03f347248b92f2afd0fea1150fcda1fa334a785b 100644 (file)
@@ -46,7 +46,6 @@
 #include "linq.h"
 
 #include <boost/regex.hpp>
-#include <boost/lexical_cast.hpp>
 
 #include <unordered_map>
 #include <string>
@@ -448,9 +447,9 @@ tweener_t get_tweener(std::wstring name)
        {
                name = what["NAME"].str();
                if(what["V0"].matched)
-                       params.push_back(boost::lexical_cast<double>(what["V0"].str()));
+                       params.push_back(std::stod(what["V0"].str()));
                if(what["V1"].matched)
-                       params.push_back(boost::lexical_cast<double>(what["V1"].str()));
+                       params.push_back(std::stod(what["V1"].str()));
        }
                
        auto it = get_tweens().find(name);
index d3c0580eb01bc624b18b396db5a8d9ec42a39206..5ac3aad7339d5a1a26065c8f006b51305b336f09 100644 (file)
@@ -45,7 +45,6 @@
 #include <common/timer.h>
 
 #include <boost/circular_buffer.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 
 #include <functional>
@@ -63,7 +62,7 @@ struct output::impl
        prec_timer                                                      sync_timer_;
        boost::circular_buffer<const_frame>     frames_;
        std::map<int, int64_t>                          send_to_consumers_delays_;
-       executor                                                        executor_                                       { L"output " + boost::lexical_cast<std::wstring>(channel_index_) };
+       executor                                                        executor_                                       { L"output " + std::to_wstring(channel_index_) };
 public:
        impl(spl::shared_ptr<diagnostics::graph> graph, const video_format_desc& format_desc, const audio_channel_layout& channel_layout, int channel_index)
                : graph_(std::move(graph))
@@ -256,7 +255,7 @@ public:
 
        std::wstring print() const
        {
-               return L"output[" + boost::lexical_cast<std::wstring>(channel_index_) + L"]";
+               return L"output[" + std::to_wstring(channel_index_) + L"]";
        }
 
        std::future<boost::property_tree::wptree> info()
index ecc19836d07c7fb92e3e9052b2155eed2efc4794..9d9d63f46d74e2f4a5c9bf9ee721084699b57bff 100644 (file)
@@ -4,7 +4,6 @@
 
 #include "frame_consumer.h"
 #include "../frame/frame.h"
-#include <boost/lexical_cast.hpp>
 
 #include <future>
 
@@ -13,7 +12,7 @@ namespace caspar { namespace core {
 struct port::impl
 {
        int                                                                     index_;
-       spl::shared_ptr<monitor::subject>       monitor_subject_ = spl::make_shared<monitor::subject>("/port/" + boost::lexical_cast<std::string>(index_));
+       spl::shared_ptr<monitor::subject>       monitor_subject_ = spl::make_shared<monitor::subject>("/port/" + std::to_string(index_));
        spl::shared_ptr<frame_consumer>         consumer_;
        int                                                                     channel_index_;
 public:
index 632bdb0845c6b78b3840ddfbaf351b98d6fbc716..b869b5135789b7559c1cf17fbed6e283d54aeaab 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <common/semaphore.h>
 
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 
 #include <future>
@@ -86,9 +85,9 @@ public:
        std::wstring print() const override
        {
                if (self_channel_index_ != -1)
-                       return L"sync[" + boost::lexical_cast<std::wstring>(self_channel_index_) + L"]to[" + boost::lexical_cast<std::wstring>(other_channel_->index()) + L"]";
+                       return L"sync[" + std::to_wstring(self_channel_index_) + L"]to[" + std::to_wstring(other_channel_->index()) + L"]";
                else
-                       return L"syncto[" + boost::lexical_cast<std::wstring>(other_channel_->index()) + L"]";
+                       return L"syncto[" + std::to_wstring(other_channel_->index()) + L"]";
        }
 
        std::wstring name() const override
@@ -163,7 +162,7 @@ spl::shared_ptr<core::frame_consumer> create_consumer(
        if (params.size() < 1 || !boost::iequals(params.at(0), L"SYNCTO"))
                return core::frame_consumer::empty();
 
-       auto channel_id = boost::lexical_cast<int>(params.at(1));
+       auto channel_id = std::stoi(params.at(1));
        auto channel    = channels.at(channel_id - 1);
 
        return spl::make_shared<syncto_consumer>(channel);
index a04a7c67ff17978f32c7ffc1a8f66f31809737c2..204f96c06d3c428f1d9b15d4360d7cd7b1f095fe 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "call_context.h"
 
-#include <boost/lexical_cast.hpp>
-
 namespace caspar { namespace core { namespace diagnostics {
 
 call_context& call_context::for_thread()
@@ -44,9 +42,9 @@ std::wstring call_context::to_string() const
        if (video_channel == -1)
                return L"[]";
        else if (layer == -1)
-               return L"[ch=" + boost::lexical_cast<std::wstring>(video_channel) + L"]";
+               return L"[ch=" + std::to_wstring(video_channel) + L"]";
        else
-               return L"[ch=" + boost::lexical_cast<std::wstring>(video_channel) + L"; layer=" + boost::lexical_cast<std::wstring>(layer) + L"]";
+               return L"[ch=" + std::to_wstring(video_channel) + L"; layer=" + std::to_wstring(layer) + L"]";
 }
 
 }}}
index fefc74403b3a2c20e8d469e8080e99a10656dbab..2cc5bd736575dbf7117550fab4b55c9581e675ca 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <boost/optional.hpp>
 #include <boost/circular_buffer.hpp>
-#include <boost/lexical_cast.hpp>
 
 #include <tbb/concurrent_unordered_map.h>
 #include <tbb/atomic.h>
@@ -473,10 +472,10 @@ private:
 
                if (context_.video_channel != -1)
                {
-                       auto ctx_str = boost::lexical_cast<std::string>(context_.video_channel);
+                       auto ctx_str = std::to_string(context_.video_channel);
 
                        if (context_.layer != -1)
-                               ctx_str += "-" + boost::lexical_cast<std::string>(context_.layer);
+                               ctx_str += "-" + std::to_string(context_.layer);
 
                        sf::Text context_text(ctx_str, get_default_font(), text_size);
                        context_text.setStyle(sf::Text::Italic);
index 84f846169b99f592f32c692d3d011cead18a0880..fe4caea88349eb71a70adb14eabaaec207288171 100644 (file)
@@ -28,8 +28,6 @@
 #include <common/diagnostics/graph.h>
 #include <common/timer.h>
 
-#include <boost/lexical_cast.hpp>
-
 #include <atomic>
 #include <mutex>
 #include <unordered_map>
@@ -51,7 +49,7 @@ static const double SECONDS_BETWEEN_FULL_STATE = 0.4;
 
 class subject_graph : public caspar::diagnostics::spi::graph_sink
 {
-       spl::shared_ptr<monitor::subject>               subject_                                                = spl::make_shared<monitor::subject>("/" + boost::lexical_cast<std::string>(create_id()));
+       spl::shared_ptr<monitor::subject>               subject_                                                = spl::make_shared<monitor::subject>("/" + std::to_string(create_id()));
        call_context                                                    context_                                                = call_context::for_thread();
        std::mutex                                                              mutex_;
        std::wstring                                                    text_;
index 996101702ab433a47de86b15b08a10ef34c97c39..d039567150dfa9cc234988d0c3bff7f2226d6f3c 100644 (file)
@@ -28,7 +28,6 @@
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/join.hpp>
 #include <boost/range/algorithm/equal.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 
 #include <map>
@@ -66,7 +65,7 @@ audio_channel_layout::audio_channel_layout(int num_channels, std::wstring type_,
 
        if (channel_order.size() > num_channels)
                CASPAR_THROW_EXCEPTION(invalid_argument() << msg_info(
-                       channel_order_ + L" contains more than " + boost::lexical_cast<std::wstring>(num_channels)));
+                       channel_order_ + L" contains more than " + std::to_wstring(num_channels)));
 }
 
 std::vector<int> audio_channel_layout::indexes_of(const std::wstring& channel_name) const
@@ -83,7 +82,7 @@ std::wstring audio_channel_layout::print() const
 {
        auto channels = boost::join(channel_order, L" ");
 
-       return L"[audio_channel_layout] num_channels=" + boost::lexical_cast<std::wstring>(num_channels) + L" type=" + type + L" channel_order=" + channels;
+       return L"[audio_channel_layout] num_channels=" + std::to_wstring(num_channels) + L" type=" + type + L" channel_order=" + channels;
 }
 
 const audio_channel_layout& audio_channel_layout::invalid()
index 214d7895243c6f3f58b01989bccfdd3158c3dc0c..52f14a7d6217e44de8f644bdac390189912ac781 100644 (file)
@@ -37,8 +37,6 @@
 #include <cstdint>
 #include <vector>
 
-#include <boost/lexical_cast.hpp>
-
 namespace caspar { namespace core {
 
 struct mutable_frame::impl : boost::noncopyable
index 29a89c7609c9283c639737e41c77424fdcddc4a3..5a7d55fd07da886004c21e2405a9d99ec753c41a 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <boost/range/adaptors.hpp>
 #include <boost/range/distance.hpp>
-#include <boost/lexical_cast.hpp>
 
 #include <map>
 #include <stack>
@@ -307,7 +306,7 @@ public:
                        const auto pFS = max[i] / static_cast<float>(std::numeric_limits<int32_t>::max());
                        const auto dBFS = 20.0f * std::log10(std::max(MIN_PFS, pFS));
 
-                       auto chan_str = boost::lexical_cast<std::string>(i + 1);
+                       auto chan_str = std::to_string(i + 1);
 
                        monitor_subject_ << monitor::message("/" + chan_str + "/pFS") % pFS;
                        monitor_subject_ << monitor::message("/" + chan_str + "/dBFS") % dBFS;
index c5b5e1fb31f71fad85dc306bd3c24080d909dcab..30b64b9d48b0fed139bd6bd6fc5e79cea8fabf6a 100644 (file)
@@ -43,7 +43,6 @@
 #include <core/video_format.h>
 
 #include <boost/property_tree/ptree.hpp>
-#include <boost/lexical_cast.hpp>
 
 #include <tbb/concurrent_queue.h>
 #include <tbb/spin_mutex.h>
@@ -65,7 +64,7 @@ struct mixer::impl : boost::noncopyable
 
        bool                                                            straighten_alpha_       = false;
                        
-       executor                                                        executor_                       { L"mixer " + boost::lexical_cast<std::wstring>(channel_index_) };
+       executor                                                        executor_                       { L"mixer " + std::to_wstring(channel_index_) };
 
 public:
        impl(int channel_index, spl::shared_ptr<diagnostics::graph> graph, spl::shared_ptr<image_mixer> image_mixer) 
index e855dd41b9346ed37da00d26b7db06e4a52c770d..f94bd5de437706f9aeda355ccfc172cfcc820388 100644 (file)
@@ -255,9 +255,9 @@ public:
                if (boost::iequals(params.at(1), L"speed"))
                {
                        auto destination_user_speed = boost::rational<std::int64_t>(
-                                       static_cast<std::int64_t>(boost::lexical_cast<double>(params.at(2)) * 1000000.0),
+                                       static_cast<std::int64_t>(std::stod(params.at(2)) * 1000000.0),
                                        1000000);
-                       auto frames = params.size() > 3 ? boost::lexical_cast<int>(params.at(3)) : 0;
+                       auto frames = params.size() > 3 ? std::stoi(params.at(3)) : 0;
                        auto easing = params.size() > 4 ? params.at(4) : L"linear";
 
                        user_speed_ = speed_tweener(user_speed_.fetch(), destination_user_speed, frames, tweener(easing));
index cef464d0a22c8fd5d1b3ec826464b4d6a3c868be..15ec752b45b19e6100efea4cf0227b03e3fda228 100644 (file)
@@ -45,7 +45,7 @@ struct layer::impl
 public:
        impl(int index)
                : monitor_subject_(spl::make_shared<monitor::subject>(
-                               "/layer/" + boost::lexical_cast<std::string>(index)))
+                               "/layer/" + std::to_string(index)))
 //             , foreground_event_subject_("")
 //             , background_event_subject_("background")
        {
@@ -163,7 +163,7 @@ public:
        boost::property_tree::wptree info() const
        {
                boost::property_tree::wptree info;
-               info.add(L"auto_delta", (auto_play_delta_ ? boost::lexical_cast<std::wstring>(*auto_play_delta_) : L"null"));
+               info.add(L"auto_delta", (auto_play_delta_ ? std::to_wstring(*auto_play_delta_) : L"null"));
                info.add(L"frame-number", foreground_->frame_number());
 
                auto nb_frames = foreground_->nb_frames();
index a0153af1bc7f901be612751d4fff45db052d0cbe..7719b8f7216c8402a5b94f55b70293390e333a32 100644 (file)
@@ -68,7 +68,7 @@ std::wstring at_position(
 {
        int index = static_cast<int>(cursor - str.begin());
 
-       return L" at index " + boost::lexical_cast<std::wstring>(index)
+       return L" at index " + std::to_wstring(index)
                        + L" in " + str;
 }
 
@@ -285,7 +285,7 @@ double parse_constant(
                ++cursor;
        }
 
-       return boost::lexical_cast<double>(constant);
+       return std::stod(constant);
 }
 
 std::wstring parse_string_literal(
index b6339e85af612f96f52ec2967cea141b074a1404..fdc595b15ac2795060e1ef516955497b21dcfe89 100644 (file)
@@ -176,7 +176,7 @@ struct scene_producer::impl
                frame_number_ = frame_variable->value();
 
                auto fps = format_desc_.fps * format_desc_.field_count;
-               auto fps_variable = std::make_shared<core::variable_impl<double>>(boost::lexical_cast<std::wstring>(fps), false, fps);
+               auto fps_variable = std::make_shared<core::variable_impl<double>>(std::to_wstring(fps), false, fps);
                store_variable(L"fps", fps_variable);
 
                auto timeline_frame_variable = std::make_shared<core::variable_impl<int64_t>>(L"-1", false, -1);
@@ -192,8 +192,8 @@ struct scene_producer::impl
                m_x_ = 0;
                m_y_ = 0;
 
-               auto scene_width = std::make_shared<core::variable_impl<double>>(boost::lexical_cast<std::wstring>(width), false, width);
-               auto scene_height = std::make_shared<core::variable_impl<double>>(boost::lexical_cast<std::wstring>(height), false, height);
+               auto scene_width = std::make_shared<core::variable_impl<double>>(std::to_wstring(width), false, width);
+               auto scene_height = std::make_shared<core::variable_impl<double>>(std::to_wstring(height), false, height);
                store_variable(L"scene_width", scene_width);
                store_variable(L"scene_height", scene_height);
                pixel_constraints_.width = scene_width->value();
index 5e5231ba6aceb551e5cc84b04830ccc48b0ee7e6..e3d427725e63eb4ebd9805af31f782169506d988 100644 (file)
@@ -255,7 +255,7 @@ spl::shared_ptr<core::frame_producer> create_xml_scene_producer(
                                auto easing     = k.second.get(L"<xmlattr>.easing", L"");
                                auto at         = ptree_get<int64_t>(k.second, L"<xmlattr>.at");
 
-                               auto keyframe_variable_name = L"timeline." + variable_name + L"." + boost::lexical_cast<std::wstring>(at);
+                               auto keyframe_variable_name = L"timeline." + variable_name + L"." + std::to_wstring(at);
 
                                if (variable.is<double>())
                                        scene->add_keyframe(variable.as<double>(), scene->create_variable<double>(keyframe_variable_name, false, ptree_get_value<std::wstring>(k.second)), at, easing);
@@ -283,7 +283,7 @@ spl::shared_ptr<core::frame_producer> create_xml_scene_producer(
                        if (at_frame)
                                condition = scene->timeline_frame() == *at_frame;
                        else if (when)
-                               condition = scene->create_variable<bool>(L"tasks.task_" + boost::lexical_cast<std::wstring>(task_id), false, *when);
+                               condition = scene->create_variable<bool>(L"tasks.task_" + std::to_wstring(task_id), false, *when);
                        else
                                CASPAR_THROW_EXCEPTION(user_error() << msg_info(L"Task elements must have either an at attribute or a when attribute"));
 
index a0b16806d5aa03c348c696d7f191ba7b76aa0187..327e763667fdbef5570ae5a490aed1e58842c42b 100644 (file)
@@ -58,7 +58,7 @@ struct stage::impl : public std::enable_shared_from_this<impl>
        interaction_aggregator                                                                                                  aggregator_;
        // map of layer -> map of tokens (src ref) -> layer_consumer
        std::map<int, std::map<void*, spl::shared_ptr<write_frame_consumer>>>   layer_consumers_;
-       executor                                                                                                                                executor_                       { L"stage " + boost::lexical_cast<std::wstring>(channel_index_) };
+       executor                                                                                                                                executor_                       { L"stage " + std::to_wstring(channel_index_) };
 public:
        impl(int channel_index, spl::shared_ptr<diagnostics::graph> graph)
                : channel_index_(channel_index)
index dc7e0e0774ea8b479b9602e02231f0b5b2768643..2578553f7fe806153e2814fb18d048d4e097dd66 100644 (file)
@@ -351,8 +351,8 @@ spl::shared_ptr<frame_producer> create_text_producer(const frame_producer_depend
        int x = 0, y = 0;
        if(params.size() >= 4)
        {
-               x = boost::lexical_cast<int>(params.at(2));
-               y = boost::lexical_cast<int>(params.at(3));
+               x = std::stoi(params.at(2));
+               y = std::stoi(params.at(3));
        }
 
        text::text_info text_info;
index a0ac2c2012fd249ac76d0fcd85a8483826ee7e86..8feb35e77420bda09cdf94f330d6b81a73e1963f 100644 (file)
@@ -46,7 +46,6 @@
 #include <tbb/spin_mutex.h>
 
 #include <boost/property_tree/ptree.hpp>
-#include <boost/lexical_cast.hpp>
 
 #include <string>
 #include <unordered_map>
@@ -81,7 +80,7 @@ struct video_channel::impl final
        int64_t                                                                                         last_tick_listener_id   = 0;
        std::unordered_map<int64_t, std::function<void ()>>     tick_listeners_;
 
-       executor                                                                                        executor_                               { L"video_channel " + boost::lexical_cast<std::wstring>(index_) };
+       executor                                                                                        executor_                               { L"video_channel " + std::to_wstring(index_) };
 public:
        impl(
                        int index,
@@ -89,7 +88,7 @@ public:
                        const core::audio_channel_layout& channel_layout,
                        std::unique_ptr<image_mixer> image_mixer)
                : monitor_subject_(spl::make_shared<monitor::subject>(
-                               "/channel/" + boost::lexical_cast<std::string>(index)))
+                               "/channel/" + std::to_string(index)))
                , index_(index)
                , format_desc_(format_desc)
                , channel_layout_(channel_layout)
@@ -208,7 +207,7 @@ public:
 
        std::wstring print() const
        {
-               return L"video_channel[" + boost::lexical_cast<std::wstring>(index_) + L"|" +  video_format_desc().name + L"]";
+               return L"video_channel[" + std::to_wstring(index_) + L"|" +  video_format_desc().name + L"]";
        }
 
        int index() const
index cf50a7b2407e96c608c6ab9dc285328d283dd0b4..2cd101367d95510a033e897c1b83bb805cb80b2b 100644 (file)
@@ -33,7 +33,6 @@
 #include <core/consumer/frame_consumer.h>
 #include <core/system_info_provider.h>
 
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 
 namespace caspar { namespace bluefish {
@@ -64,7 +63,7 @@ std::vector<std::wstring> device_list()
                for(int n = 1; n < (numCards+1); n++)
                {                               
                        blue.attach(n);
-                       devices.push_back(std::wstring(get_card_desc(blue, n)) + L" [" + boost::lexical_cast<std::wstring>(n) + L"]");  
+                       devices.push_back(std::wstring(get_card_desc(blue, n)) + L" [" + std::to_wstring(n) + L"]");    
                        blue.detach();
                }
        }
index ef0898a03c516b178f744216f88c245d8b922070..c10231448067634f2b55c48620529b5c1b0b4535 100644 (file)
@@ -44,7 +44,6 @@
 #include <tbb/atomic.h>
 
 #include <common/assert.h>
-#include <boost/lexical_cast.hpp>
 #include <boost/timer.hpp>
 #include <boost/range/algorithm.hpp>
 #include <boost/property_tree/ptree.hpp>
@@ -622,8 +621,8 @@ public:
 
        std::wstring print() const
        {
-               return model_name_ + L" [" + boost::lexical_cast<std::wstring>(channel_index_) + L"-" +
-                       boost::lexical_cast<std::wstring>(device_index_) + L"|" +  format_desc_.name + L"]";
+               return model_name_ + L" [" + std::to_wstring(channel_index_) + L"-" +
+                       std::to_wstring(device_index_) + L"|" +  format_desc_.name + L"]";
        }
 
        int64_t presentation_delay_millis() const
@@ -782,7 +781,7 @@ spl::shared_ptr<core::frame_consumer> create_consumer(      const std::vector<std::ws
        if(params.size() < 1 || !boost::iequals(params.at(0), L"BLUEFISH"))
                return core::frame_consumer::empty();
 
-       const auto device_index                 = params.size() > 1 ? boost::lexical_cast<int>(params.at(1)) : 1;
+       const auto device_index                 = params.size() > 1 ? std::stoi(params.at(1)) : 1;
        const auto device_stream                = contains_param(       L"SDI-STREAM", params);
        const auto embedded_audio               = contains_param(       L"EMBEDDED_AUDIO",      params);
        const auto key_only                             = contains_param(       L"KEY_ONLY",            params);
index 3e880adc6f9d80e05474ca2a63c40174f07ce976..b6a96a5f49e7ab57add7af5cfb68a0784a031e7d 100644 (file)
@@ -52,7 +52,6 @@
 #include <tbb/concurrent_queue.h>
 
 #include <common/assert.h>
-#include <boost/lexical_cast.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/property_tree/ptree.hpp>
 
@@ -650,15 +649,15 @@ public:
        std::wstring print() const
        {
                if (config_.keyer == configuration::keyer_t::external_separate_device_keyer)
-                       return model_name_ + L" [" + boost::lexical_cast<std::wstring>(channel_index_)+L"-" +
-                               boost::lexical_cast<std::wstring>(config_.device_index) +
+                       return model_name_ + L" [" + std::to_wstring(channel_index_)+L"-" +
+                               std::to_wstring(config_.device_index) +
                                L"&&" +
-                               boost::lexical_cast<std::wstring>(config_.key_device_index()) +
+                               std::to_wstring(config_.key_device_index()) +
                                L"|" +
                                format_desc_.name + L"]";
                else
-                       return model_name_ + L" [" + boost::lexical_cast<std::wstring>(channel_index_)+L"-" +
-                               boost::lexical_cast<std::wstring>(config_.device_index) + L"|" + format_desc_.name + L"]";
+                       return model_name_ + L" [" + std::to_wstring(channel_index_)+L"-" +
+                               std::to_wstring(config_.device_index) + L"|" + format_desc_.name + L"]";
        }
 };
 
@@ -674,7 +673,7 @@ public:
 
        decklink_consumer_proxy(const configuration& config)
                : config_(config)
-               , executor_(L"decklink_consumer[" + boost::lexical_cast<std::wstring>(config.device_index) + L"]")
+               , executor_(L"decklink_consumer[" + std::to_wstring(config.device_index) + L"]")
        {
                auto ctx = core::diagnostics::call_context::for_thread();
                executor_.begin_invoke([=]
@@ -818,7 +817,7 @@ spl::shared_ptr<core::frame_consumer> create_consumer(
        configuration config;
 
        if (params.size() > 1)
-               config.device_index = boost::lexical_cast<int>(params.at(1));
+               config.device_index = std::stoi(params.at(1));
 
        if (contains_param(L"INTERNAL_KEY", params))
                config.keyer = configuration::keyer_t::internal_keyer;
index bf6de45bea995c7ab9a0184972e83a4ea4edb369..ca4d44e65a0bedc63547127b9a0a3a7499c69676 100644 (file)
@@ -72,7 +72,7 @@ std::vector<std::wstring> device_list()
             if (success)
                 model_name = u16(m_name);
 
-            devices.push_back(model_name + L" [" + boost::lexical_cast<std::wstring>(n)+L"]");
+            devices.push_back(model_name + L" [" + std::to_wstring(n)+L"]");
         }
        }
        catch (...){}
index a6ead70661933b9bf96cc44f518ccd0ff0bc96da..27096819abd37770735344f8cd34a30963538624 100644 (file)
@@ -90,7 +90,7 @@ core::audio_channel_layout get_adjusted_channel_layout(core::audio_channel_layou
 template <typename T>
 std::wstring to_string(const T& cadence)
 {
-       return boost::join(cadence | boost::adaptors::transformed([](size_t i) { return boost::lexical_cast<std::wstring>(i); }), L", ");
+       return boost::join(cadence | boost::adaptors::transformed([](size_t i) { return std::to_wstring(i); }), L", ");
 }
 
 class decklink_producer : boost::noncopyable, public IDeckLinkInputCallback
@@ -335,7 +335,7 @@ public:
 
        std::wstring print() const
        {
-               return model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"|" + in_format_desc_.name + L"]";
+               return model_name_ + L" [" + std::to_wstring(device_index_) + L"|" + in_format_desc_.name + L"]";
        }
 
        boost::rational<int> get_out_framerate() const
@@ -363,7 +363,7 @@ public:
                        int device_index,
                        const std::wstring& filter_str,
                        uint32_t length)
-               : executor_(L"decklink_producer[" + boost::lexical_cast<std::wstring>(device_index) + L"]")
+               : executor_(L"decklink_producer[" + std::to_wstring(device_index) + L"]")
                , length_(length)
        {
                auto ctx = core::diagnostics::call_context::for_thread();
@@ -454,7 +454,7 @@ spl::shared_ptr<core::frame_producer> create_producer(const core::frame_producer
 
        auto device_index       = get_param(L"DEVICE", params, -1);
        if(device_index == -1)
-               device_index = boost::lexical_cast<int>(params.at(1));
+               device_index = std::stoi(params.at(1));
 
        auto filter_str         = get_param(L"FILTER", params);
        auto length                     = get_param(L"LENGTH", params, std::numeric_limits<uint32_t>::max());
index b6aab14618bf2b899eb68011266d581866aa58f4..7c6f25c33460f79cf7df39f6b867810ddf1d01bf 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "../decklink_api.h"
 
-#include <boost/lexical_cast.hpp>
-
 #include <string>
 
 namespace caspar { namespace decklink {
@@ -145,7 +143,7 @@ BMDDisplayMode get_display_mode(const T& device, BMDDisplayMode format, BMDPixel
        }
 
     if(!m)
-               CASPAR_THROW_EXCEPTION(user_error() << msg_info("Device could not find requested video-format: " + boost::lexical_cast<std::string>(format)));
+               CASPAR_THROW_EXCEPTION(user_error() << msg_info("Device could not find requested video-format: " + std::to_string(format)));
 
        com_ptr<IDeckLinkDisplayMode> mode = wrap_raw<com_ptr>(m, true);
 
@@ -198,7 +196,7 @@ static com_ptr<IDeckLink> get_device(size_t device_index)
     }
 
        if(n != device_index || !decklink)
-               CASPAR_THROW_EXCEPTION(user_error() << msg_info("Decklink device " + boost::lexical_cast<std::string>(device_index) + " not found."));
+               CASPAR_THROW_EXCEPTION(user_error() << msg_info("Decklink device " + std::to_string(device_index) + " not found."));
                
        return decklink;
 }
index b009dbb1cdb969ed504f381e1a2a9af42503bb7b..f05d71044a420295b04a3575f6a52b95b3ab66de 100644 (file)
@@ -35,7 +35,6 @@
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/range/adaptors.hpp>
index 1e58c6b515436e96d6646482a193aec916ce55d3..9497c744a8d98071975fec377356782074b94338 100644 (file)
@@ -101,7 +101,7 @@ std::wstring generate_pan_filter_str(
 
                // Replace each occurance of each channel name with c<index>
                for (int i = 0; i < input.channel_order.size(); ++i)
-                       boost::replace_all(mix_spec, input.channel_order.at(i), L"c" + boost::lexical_cast<std::wstring>(i));
+                       boost::replace_all(mix_spec, input.channel_order.at(i), L"c" + std::to_wstring(i));
 
                auto output_name = boost::trim_copy(output_and_spec.at(0));
                auto actual_output_indexes = output.indexes_of(output_name);
index 702ebdfad472cb3407a700aeadd695ef4b721523..723805dec7ecfea7278ffab27e8c2e5a78598756 100644 (file)
@@ -368,13 +368,13 @@ public:
                                CASPAR_THROW_EXCEPTION(user_error() << msg_info(
                                                "Failed to find video codec " + (video_codec_name
                                                                ? *video_codec_name
-                                                               : "with id " + boost::lexical_cast<std::string>(
+                                                               : "with id " + std::to_string(
                                                                                oc_->oformat->video_codec))));
                        if (!audio_codec)
                                CASPAR_THROW_EXCEPTION(user_error() << msg_info(
                                                "Failed to find audio codec " + (audio_codec_name
                                                                ? *audio_codec_name
-                                                               : "with id " + boost::lexical_cast<std::string>(
+                                                               : "with id " + std::to_string(
                                                                                oc_->oformat->audio_codec))));
 
                        // Filters
@@ -763,7 +763,7 @@ private:
                        splitfilter += (boost::format("0x%|1$x|") % create_channel_layout_bitmask(in_channel_layout_.num_channels)).str();
 
                        for (int i = 0; i < num_output_pads; ++i)
-                               splitfilter += "[aout:" + boost::lexical_cast<std::string>(i) + "]";
+                               splitfilter += "[aout:" + std::to_string(i) + "]";
 
                        filtergraph = u8(append_filter(u16(filtergraph), u16(splitfilter)));
                }
index 1c57509b9979b23ad3bc5969479cb20617982cec..bde85e29b484f09b4af0d734222593cf0f7f1ebb 100644 (file)
@@ -433,25 +433,25 @@ public:
                {
                        if (!value.empty())
                                input_.loop(boost::lexical_cast<bool>(value));
-                       result = boost::lexical_cast<std::wstring>(input_.loop());
+                       result = std::to_wstring(input_.loop());
                }
                else if (boost::iequals(cmd, L"in") || boost::iequals(cmd, L"start"))
                {
                        if (!value.empty())
                                input_.in(boost::lexical_cast<uint32_t>(value));
-                       result = boost::lexical_cast<std::wstring>(input_.in());
+                       result = std::to_wstring(input_.in());
                }
                else if (boost::iequals(cmd, L"out"))
                {
                        if (!value.empty())
                                input_.out(boost::lexical_cast<uint32_t>(value));
-                       result = boost::lexical_cast<std::wstring>(input_.out());
+                       result = std::to_wstring(input_.out());
                }
                else if (boost::iequals(cmd, L"length"))
                {
                        if (!value.empty())
                                input_.length(boost::lexical_cast<uint32_t>(value));
-                       result = boost::lexical_cast<std::wstring>(input_.length());
+                       result = std::to_wstring(input_.length());
                }
                else if (boost::iequals(cmd, L"seek") && !value.empty())
                {
@@ -489,7 +489,7 @@ public:
        {
                return L"ffmpeg[" + (is_url() ? filename_ : boost::filesystem::path(filename_).filename().wstring()) + L"|"
                                                  + print_mode() + L"|"
-                                                 + boost::lexical_cast<std::wstring>(file_frame_number_) + L"/" + boost::lexical_cast<std::wstring>(file_nb_frames()) + L"]";
+                                                 + std::to_wstring(file_frame_number_) + L"/" + std::to_wstring(file_nb_frames()) + L"]";
        }
 
        std::wstring name() const override
index 0478eef13a7424a5bd35044b6bb9135efb0ad3f8..68608a0b2c057c53695336423c0a1a68ecb9529e 100644 (file)
@@ -112,7 +112,7 @@ struct audio_filter::implementation
                {
                        int i = 0;
                        for (auto& input_pad : input_pads_)
-                               complete_filter_graph.push_back(create_sourcefilter_str(input_pad, "a:" + boost::lexical_cast<std::string>(i++)));
+                               complete_filter_graph.push_back(create_sourcefilter_str(input_pad, "a:" + std::to_string(i++)));
                }
 
                if (filtergraph_.empty())
@@ -124,7 +124,7 @@ struct audio_filter::implementation
                        int i = 0;
                        for (auto& output_pad : output_pads)
                        {
-                               complete_filter_graph.push_back(create_sinkfilter_str(output_pad, "aout:" + boost::lexical_cast<std::string>(i++)));
+                               complete_filter_graph.push_back(create_sinkfilter_str(output_pad, "aout:" + std::to_string(i++)));
 
                                output_pad.sample_fmts.push_back(AVSampleFormat::AV_SAMPLE_FMT_NONE);
                                output_pad.audio_channel_layouts.push_back(0);
index 0a1039f51160497a92dce38feff90b78281a9568..5542652cf1ae507781e9f1597aa401ed232c26a6 100644 (file)
@@ -311,8 +311,8 @@ struct input::impl : boost::noncopyable
                                try
                                {
                                        auto meta = read_flv_meta_info(context.filename);
-                                       double fps = boost::lexical_cast<double>(meta["framerate"]);
-                                       video_stream->nb_frames = static_cast<int64_t>(boost::lexical_cast<double>(meta["duration"])*fps);
+                                       double fps = std::stod(meta["framerate"]);
+                                       video_stream->nb_frames = static_cast<int64_t>(std::stod(meta["duration"])*fps);
                                }
                                catch (...) {}
                        }
index 81c25ba9e6ed7d581238760b3354a7ff6b934fa0..dd81a117a1da94c29cec41ba9fbdf20603b455a2 100644 (file)
@@ -111,9 +111,9 @@ std::unique_ptr<audio_filter> create_amerge_filter(std::vector<audio_input_pad>
        if (input_pads.size() > 1)
        {
                for (int i = 0; i < input_pads.size(); ++i)
-                       amerge += L"[a:" + boost::lexical_cast<std::wstring>(i) + L"]";
+                       amerge += L"[a:" + std::to_wstring(i) + L"]";
 
-               amerge += L"amerge=inputs=" + boost::lexical_cast<std::wstring>(input_pads.size());
+               amerge += L"amerge=inputs=" + std::to_wstring(input_pads.size());
        }
 
        std::wstring afilter;
@@ -397,8 +397,8 @@ private:
                {
                        if (mode == core::field_mode::lower && format_desc_.field_mode == core::field_mode::upper)
                        {
-                               filter_str = append_filter(filter_str, L"CROP=h=" + boost::lexical_cast<std::wstring>(frame->height - 1) + L":y=0");
-                               filter_str = append_filter(filter_str, L"PAD=0:" + boost::lexical_cast<std::wstring>(frame->height) + L":0:1:black");
+                               filter_str = append_filter(filter_str, L"CROP=h=" + std::to_wstring(frame->height - 1) + L":y=0");
+                               filter_str = append_filter(filter_str, L"PAD=0:" + std::to_wstring(frame->height) + L":0:1:black");
                                filter_str = append_filter(filter_str, L"SETFIELD=tff");
                        }
                        else if (mode == core::field_mode::upper && format_desc_.field_mode == core::field_mode::lower)
@@ -415,7 +415,7 @@ private:
 
                if (frame->height == 480) // NTSC DV
                {
-                       auto pad_str = L"PAD=" + boost::lexical_cast<std::wstring>(frame->width) + L":486:0:2:black";
+                       auto pad_str = L"PAD=" + std::to_wstring(frame->width) + L":486:0:2:black";
                        filter_str = append_filter(filter_str, pad_str);
                }
 
index 362af475defa65cfc5e16b7ae91ef5d74558846d..3142aaa301294957eaf29fa374bb981180c098e0 100644 (file)
@@ -77,14 +77,14 @@ std::map<std::string, std::string> read_flv_meta_info(const std::string& filenam
                                        {
                                                static_assert(sizeof(double) == 8, "");
                                                std::reverse(ptr, ptr+8);
-                                               values[name] = boost::lexical_cast<std::string>(*(double*)(ptr));
+                                               values[name] = std::to_string(*(double*)(ptr));
                                                ptr += 9;
 
                                                break;
                                        }
                                case 1: // bool
                                        {
-                                               values[name] = boost::lexical_cast<std::string>(*ptr != 0);
+                                               values[name] = std::to_string(*ptr != 0);
                                                ptr += 2;
 
                                                break;
index e57ddd91befeda912406480f149675a0d52a96c1..bf997cfe0764175ce0f457589916486e5301f60c 100644 (file)
@@ -46,7 +46,6 @@
 
 #include <common/assert.h>
 #include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/rational.hpp>
 
 #include <fstream>
@@ -387,7 +386,7 @@ boost::rational<int> read_framerate(AVFormatContext& context, const boost::ratio
                        try
                        {
                                auto meta = read_flv_meta_info(context.filename);
-                               return boost::rational<int>(static_cast<int>(boost::lexical_cast<double>(meta["framerate"]) * 1000000.0), 1000000);
+                               return boost::rational<int>(static_cast<int>(std::stod(meta["framerate"]) * 1000000.0), 1000000);
                        }
                        catch (...)
                        {
@@ -449,8 +448,8 @@ void fix_meta_data(AVFormatContext& context)
                        try
                        {
                                auto meta = read_flv_meta_info(context.filename);
-                               double fps = boost::lexical_cast<double>(meta["framerate"]);
-                               video_stream->nb_frames = static_cast<int64_t>(boost::lexical_cast<double>(meta["duration"])*fps);
+                               double fps = std::stod(meta["framerate"]);
+                               video_stream->nb_frames = static_cast<int64_t>(std::stod(meta["duration"])*fps);
                        }
                        catch(...){}
                }
@@ -541,7 +540,7 @@ std::wstring print_mode(int width, int height, double fps, bool interlaced)
        std::wostringstream fps_ss;
        fps_ss << std::fixed << std::setprecision(2) << (!interlaced ? fps : 2.0 * fps);
 
-       return boost::lexical_cast<std::wstring>(width) + L"x" + boost::lexical_cast<std::wstring>(height) + (!interlaced ? L"p" : L"i") + fps_ss.str();
+       return std::to_wstring(width) + L"x" + std::to_wstring(height) + (!interlaced ? L"p" : L"i") + fps_ss.str();
 }
 
 bool is_valid_file(const std::wstring& filename, bool only_video)
@@ -787,8 +786,8 @@ std::uint64_t create_channel_layout_bitmask(int num_channels)
 
 std::string to_string(const boost::rational<int>& framerate)
 {
-       return boost::lexical_cast<std::string>(framerate.numerator())
-               + "/" + boost::lexical_cast<std::string>(framerate.denominator()) + " (" + boost::lexical_cast<std::string>(static_cast<double>(framerate.numerator()) / static_cast<double>(framerate.denominator())) + ") fps";
+       return std::to_string(framerate.numerator())
+               + "/" + std::to_string(framerate.denominator()) + " (" + std::to_string(static_cast<double>(framerate.numerator()) / static_cast<double>(framerate.denominator())) + ") fps";
 }
 
 std::vector<int> find_audio_cadence(const boost::rational<int>& framerate)
index 7a127961e8a8787d63a7ad2fc540f9022f3d4448..1a32ac84e1686caabe557e7acece27821a3255e7 100644 (file)
@@ -331,8 +331,8 @@ public:
        std::wstring print()
        {
                return L"flash-player[" + boost::filesystem::path(filename_).filename().wstring()
-                                 + L"|" + boost::lexical_cast<std::wstring>(width_)
-                                 + L"x" + boost::lexical_cast<std::wstring>(height_)
+                                 + L"|" + std::to_wstring(width_)
+                                 + L"x" + std::to_wstring(height_)
                                  + L"]";               
        }
 };
@@ -470,7 +470,7 @@ public:
                
        std::wstring print() const override
        { 
-               return L"flash[" + boost::filesystem::path(filename_).wstring() + L"|" + boost::lexical_cast<std::wstring>(fps_) + L"]";                
+               return L"flash[" + boost::filesystem::path(filename_).wstring() + L"|" + std::to_wstring(fps_) + L"]";          
        }       
 
        std::wstring name() const override
index 1ca1e5bd8f131aa7f947f500456c5f7336fc49fb..28e54c9d75fc4adb30b90bb6ff5c16d2c2121ef1 100644 (file)
@@ -35,7 +35,6 @@
 #include <boost/foreach.hpp>
 #include <boost/timer.hpp>
 #include <boost/range/algorithm/remove_if.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/log/trivial.hpp>
 #include <boost/property_tree/ptree.hpp>
 
@@ -113,7 +112,7 @@ public:
        {
                caspar_log(browser, boost::log::trivial::trace,
                                "context for frame "
-                               + boost::lexical_cast<std::string>(frame->GetIdentifier())
+                               + std::to_string(frame->GetIdentifier())
                                + " created");
                contexts_.push_back(context);
 
@@ -170,12 +169,12 @@ public:
                if (removed != contexts_.end())
                        caspar_log(browser, boost::log::trivial::trace,
                                        "context for frame "
-                                       + boost::lexical_cast<std::string>(frame->GetIdentifier())
+                                       + std::to_string(frame->GetIdentifier())
                                        + " released");
                else
                        caspar_log(browser, boost::log::trivial::warning,
                                        "context for frame "
-                                       + boost::lexical_cast<std::string>(frame->GetIdentifier())
+                                       + std::to_string(frame->GetIdentifier())
                                        + " released, but not found");
        }
 
@@ -277,12 +276,12 @@ void init(core::module_dependencies dependencies)
                        false
        );
 
-       auto cef_version_major =        boost::lexical_cast<std::wstring>(cef_version_info(0));
-       auto cef_revision =                     boost::lexical_cast<std::wstring>(cef_version_info(1));
-       auto chrome_major =                     boost::lexical_cast<std::wstring>(cef_version_info(2));
-       auto chrome_minor =                     boost::lexical_cast<std::wstring>(cef_version_info(3));
-       auto chrome_build =                     boost::lexical_cast<std::wstring>(cef_version_info(4));
-       auto chrome_patch =                     boost::lexical_cast<std::wstring>(cef_version_info(5));
+       auto cef_version_major =        std::to_wstring(cef_version_info(0));
+       auto cef_revision =                     std::to_wstring(cef_version_info(1));
+       auto chrome_major =                     std::to_wstring(cef_version_info(2));
+       auto chrome_minor =                     std::to_wstring(cef_version_info(3));
+       auto chrome_build =                     std::to_wstring(cef_version_info(4));
+       auto chrome_patch =                     std::to_wstring(cef_version_info(5));
 
        dependencies.system_info_provider_repo->register_version_provider(L"cef", [=]
        {
index 25f59893169e877174604501e7e7e4faab04f3b3..11fc4073861027cc9e45e4f309ba7a2adcef0573 100644 (file)
@@ -48,7 +48,6 @@
 #include <common/future.h>
 
 #include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/scoped_array.hpp>
 #include <boost/date_time.hpp>
@@ -302,10 +301,10 @@ struct image_scroll_producer : public core::frame_producer_base
                if (boost::iequals(cmd, L"SPEED"))
                {
                        if (params.size() == 1)
-                               return make_ready_future(boost::lexical_cast<std::wstring>(-speed_.fetch()));
+                               return make_ready_future(std::to_wstring(-speed_.fetch()));
 
-                       auto val = boost::lexical_cast<double>(params.at(1));
-                       int duration = params.size() > 2 ? boost::lexical_cast<int>(params.at(2)) : 0;
+                       auto val = std::stod(params.at(1));
+                       int duration = params.size() > 2 ? std::stoi(params.at(2)) : 0;
                        std::wstring tween = params.size() > 3 ? params.at(3) : L"linear";
                        speed_ = speed_tweener(speed_.fetch(), -val, duration, tween);
                }
index b2af5fb4b21e0e6cce72b794879631bfbd11f188..0cc16bd16fbe8bf0f3e4b0d09290e672880c8336 100644 (file)
@@ -40,7 +40,6 @@
 #include <core/help/help_repository.h>
 
 #include <boost/circular_buffer.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/timer.hpp>
 #include <boost/algorithm/string.hpp>
@@ -238,7 +237,7 @@ public:
 
        std::wstring print() const override
        {
-               return L"oal[" + boost::lexical_cast<std::wstring>(channel_index_) + L"|" + format_desc_.name + L"]";
+               return L"oal[" + std::to_wstring(channel_index_) + L"|" + format_desc_.name + L"]";
        }
 
        std::wstring name() const override
index d62cf5119b83e9ff98c4383a5490af5cfb0cd2d5..b389b5fac2a70f2fac4fafd02b947c3f4ffca549 100644 (file)
 \r
 #include <boost/property_tree/ptree.hpp>\r
 #include <boost/algorithm/string.hpp>\r
-#include <boost/lexical_cast.hpp>\r
 \r
 #include <algorithm>\r
+#include <cmath>\r
+#include <cstdlib>\r
 \r
 namespace caspar { namespace psd {\r
 \r
@@ -443,20 +444,20 @@ public:
 \r
                auto c = cos(angle);\r
                auto s = sin(angle);\r
-               auto scale_x = (abs(c) > 0.1) ? xx / c : xy / s;\r
+               auto scale_x = (std::abs(c) > 0.1) ? xx / c : xy / s;\r
 \r
                if (xx / scale_x < 0) { //fel kvadrant\r
                        angle += PI;\r
                        c = cos(angle);\r
                        s = sin(angle);\r
-                       scale_x = (abs(c) > 0.1) ? xx / c : xy / s;\r
+                       scale_x = (std::abs(c) > 0.1) ? xx / c : xy / s;\r
                }\r
 \r
                auto shear_factor = (yx*c + yy*s) / (yy*c - yx * s);\r
                auto scale_y = 1.0;\r
-               if (abs(shear_factor) < 0.0001 || std::isnan(shear_factor)) {\r
+               if (std::abs(shear_factor) < 0.0001 || std::isnan(shear_factor)) {\r
                        shear_factor = 0;\r
-                       scale_y = (abs(c) > 0.1) ? yy / c : yx / -s;\r
+                       scale_y = (std::abs(c) > 0.1) ? yy / c : yx / -s;\r
                }\r
                else {\r
                        scale_y = yx / (c*shear_factor - s);\r
@@ -542,7 +543,7 @@ public:
                                        else if(encoding == 1)\r
                                                read_rle_image_data(stream, target, offset);\r
                                        else\r
-                                               CASPAR_THROW_EXCEPTION(psd_file_format_exception() << msg_info("Unhandled image data encoding: " + boost::lexical_cast<std::string>(encoding)));\r
+                                               CASPAR_THROW_EXCEPTION(psd_file_format_exception() << msg_info("Unhandled image data encoding: " + std::to_string(encoding)));\r
                                }\r
                        }\r
                        stream.set_position(end_of_data);\r
index 3cb9fa2433e7106bfc49e5a05fcf55b88773f9a0..a5706afe0c93dd3bd04fbebbd6059ff479654652 100644 (file)
@@ -29,8 +29,6 @@
 #include <boost/spirit/home/qi.hpp>
 #pragma warning(pop)
 
-#include <boost/lexical_cast.hpp>
-
 #include <cstdint>
 
 namespace qi = boost::spirit::qi;
@@ -103,7 +101,7 @@ struct pdf_context
        }
        void set_value(double val)
        {
-               value = boost::lexical_cast<std::wstring>(val);
+               value = std::to_wstring(val);
                set_value();
        }
 
index aea1a73d59ba7c6c91d25f3431202212e5732aca..6e8b1ed5c9ae6f5935e18c1c0d72fe9997804210 100644 (file)
@@ -37,7 +37,6 @@
 #include <core/frame/frame_factory.h>
 #include <core/video_format.h>
 
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/range/algorithm/copy.hpp>
 
@@ -144,7 +143,7 @@ public:
 
        std::wstring print() const override
        {
-               return L"[channel-consumer|" + boost::lexical_cast<std::wstring>(channel_index_) + L"]";
+               return L"[channel-consumer|" + std::to_wstring(channel_index_) + L"]";
        }
 
        boost::property_tree::wptree info() const override
index 5e264cd2900a0f4ec269df4e1d9e468228c10e2e..eae832d06e9136e3a925d9949ecf172d9a960641 100644 (file)
@@ -213,7 +213,7 @@ public:
 
        std::wstring print() const override
        {
-               return L"layer-producer[" + boost::lexical_cast<std::wstring>(layer_) + L"]";
+               return L"layer-producer[" + std::to_wstring(layer_) + L"]";
        }
 
        std::wstring name() const override
index d334a4365e0494e1132503b7c7f9fd53fa25b7ab..7483e4b2afed9e8c30e276da3362afa03bd915f1 100644 (file)
@@ -86,14 +86,14 @@ spl::shared_ptr<core::frame_producer> create_producer(
        int channel_id;
 
        if (has_layer_spec)
-               channel_id = boost::lexical_cast<int>(channel_layer_spec.substr(0, dash));
+               channel_id = std::stoi(channel_layer_spec.substr(0, dash));
        else
-               channel_id = boost::lexical_cast<int>(channel_layer_spec);
+               channel_id = std::stoi(channel_layer_spec);
 
        auto found_channel = boost::find_if(dependencies.channels, [=](spl::shared_ptr<core::video_channel> ch) { return ch->index() == channel_id; });
 
        if (found_channel == dependencies.channels.end())
-               CASPAR_THROW_EXCEPTION(user_error() << msg_info(L"No channel with id " + boost::lexical_cast<std::wstring>(channel_id)));
+               CASPAR_THROW_EXCEPTION(user_error() << msg_info(L"No channel with id " + std::to_wstring(channel_id)));
 
        auto params2 = params;
        params2.erase(params2.begin());
@@ -103,7 +103,7 @@ spl::shared_ptr<core::frame_producer> create_producer(
 
        if (has_layer_spec)
        {
-               auto layer = boost::lexical_cast<int>(channel_layer_spec.substr(dash + 1));
+               auto layer = std::stoi(channel_layer_spec.substr(dash + 1));
 
                return create_layer_producer(*found_channel, layer, frames_delay, dependencies.format_desc);
        }
index 6713f26aac76ed7f145c1d3464f99d4c171535a1..87fbe132fc125ac4fe7a35d1a6c47e055beb2236 100644 (file)
@@ -51,7 +51,6 @@
 #include <core/help/help_repository.h>
 
 #include <boost/circular_buffer.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/algorithm/string.hpp>
 
@@ -533,7 +532,7 @@ public:
 
        std::wstring channel_and_format() const
        {
-               return L"[" + boost::lexical_cast<std::wstring>(channel_index_) + L"|" + format_desc_.name + L"]";
+               return L"[" + std::to_wstring(channel_index_) + L"|" + format_desc_.name + L"]";
        }
 
        std::wstring print() const
@@ -711,7 +710,7 @@ spl::shared_ptr<core::frame_consumer> create_consumer(
        configuration config;
 
        if (params.size() > 1)
-               config.screen_index = boost::lexical_cast<int>(params.at(1));
+               config.screen_index = std::stoi(params.at(1));
 
        config.windowed                 = !contains_param(L"FULLSCREEN", params);
        config.key_only                 =  contains_param(L"KEY_ONLY", params);
index e1b60b9f85e869e35aa7fcf1ba946dfdd18a53d3..a731dcce8dcfaa8b64cca721274d0fdcee0cf6dd 100644 (file)
@@ -132,7 +132,7 @@ void AMCPCommandQueue::AddCommand(AMCPCommand::ptr_type pCurrentCommand)
                                CASPAR_LOG(error) << L"Missing parameter. Check syntax. Turn on log level debug for stacktrace.";
                                pCurrentCommand->SetReplyString(L"402 " + pCurrentCommand->print() + L" FAILED\r\n");
                        }
-                       catch (boost::bad_lexical_cast&)
+                       catch (std::invalid_argument&)
                        {
                                CASPAR_LOG_CURRENT_EXCEPTION_AT_LEVEL(debug);
                                CASPAR_LOG(error) << L"Invalid parameter. Check syntax. Turn on log level debug for stacktrace.";
index 69826476d6e7c443c2ede347314a0bd5c3c0589f..aaf771631a6459b7dfe73f8091ed838dd17e555c 100644 (file)
@@ -213,7 +213,7 @@ std::wstring MediaInfo(const boost::filesystem::path& path, const spl::shared_pt
        writeTimeStr.erase(std::remove_if(writeTimeStr.begin(), writeTimeStr.end(), is_not_digit), writeTimeStr.end());
        auto writeTimeWStr = std::wstring(writeTimeStr.begin(), writeTimeStr.end());
 
-       auto sizeStr = boost::lexical_cast<std::wstring>(boost::filesystem::file_size(path));
+       auto sizeStr = std::to_wstring(boost::filesystem::file_size(path));
        sizeStr.erase(std::remove_if(sizeStr.begin(), sizeStr.end(), is_not_digit), sizeStr.end());
        auto sizeWStr = std::wstring(sizeStr.begin(), sizeStr.end());
 
@@ -228,8 +228,8 @@ std::wstring MediaInfo(const boost::filesystem::path& path, const spl::shared_pt
                + L"\" " + media_info->clip_type +
                + L" " + sizeStr +
                + L" " + writeTimeWStr +
-               + L" " + boost::lexical_cast<std::wstring>(media_info->duration) +
-               + L" " + boost::lexical_cast<std::wstring>(media_info->time_base.numerator()) + L"/" + boost::lexical_cast<std::wstring>(media_info->time_base.denominator())
+               + L" " + std::to_wstring(media_info->duration) +
+               + L" " + std::to_wstring(media_info->time_base.numerator()) + L"/" + std::to_wstring(media_info->time_base.denominator())
                + L"\r\n";
 }
 
@@ -269,7 +269,7 @@ std::wstring ListTemplates(const spl::shared_ptr<core::cg_producer_registry>& cg
                        writeTimeStr.erase(std::remove_if(writeTimeStr.begin(), writeTimeStr.end(), [](char c){ return std::isdigit(c) == 0;}), writeTimeStr.end());
                        auto writeTimeWStr = std::wstring(writeTimeStr.begin(), writeTimeStr.end());
 
-                       auto sizeStr = boost::lexical_cast<std::string>(boost::filesystem::file_size(itr->path()));
+                       auto sizeStr = std::to_string(boost::filesystem::file_size(itr->path()));
                        sizeStr.erase(std::remove_if(sizeStr.begin(), sizeStr.end(), [](char c){ return std::isdigit(c) == 0;}), sizeStr.end());
 
                        auto sizeWStr = std::wstring(sizeStr.begin(), sizeStr.end());
@@ -597,17 +597,17 @@ std::wstring swap_command(command_context& ctx)
                boost::split(strs, ctx.parameters[0], boost::is_any_of("-"));
 
                auto ch1 = ctx.channel.channel;
-               auto ch2 = ctx.channels.at(boost::lexical_cast<int>(strs.at(0)) - 1);
+               auto ch2 = ctx.channels.at(std::stoi(strs.at(0)) - 1);
 
                int l1 = ctx.layer_index();
-               int l2 = boost::lexical_cast<int>(strs.at(1));
+               int l2 = std::stoi(strs.at(1));
 
                ch1->stage().swap_layer(l1, l2, ch2.channel->stage(), swap_transforms);
        }
        else
        {
                auto ch1 = ctx.channel.channel;
-               auto ch2 = ctx.channels.at(boost::lexical_cast<int>(ctx.parameters[0]) - 1);
+               auto ch2 = ctx.channels.at(std::stoi(ctx.parameters[0]) - 1);
                ch1->stage().swap_layers(ch2.channel->stage(), swap_transforms);
        }
 
@@ -966,7 +966,7 @@ std::wstring cg_add_command(command_context& ctx)
 {
        //CG 1 ADD 0 "template_folder/templatename" [STARTLABEL] 0/1 [DATA]
 
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
        std::wstring label;             //_parameters[2]
        bool bDoStart = false;          //_parameters[2] alt. _parameters[3]
        unsigned int dataIndex = 3;
@@ -1035,7 +1035,7 @@ void cg_play_describer(core::help_sink& sink, const core::help_repository& repo)
 
 std::wstring cg_play_command(command_context& ctx)
 {
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
        ctx.cg_registry->get_proxy(spl::make_shared_ptr(ctx.channel.channel), ctx.layer_index(core::cg_proxy::DEFAULT_LAYER))->play(layer);
 
        return L"202 CG OK\r\n";
@@ -1064,7 +1064,7 @@ void cg_stop_describer(core::help_sink& sink, const core::help_repository& repo)
 
 std::wstring cg_stop_command(command_context& ctx)
 {
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
        get_expected_cg_proxy(ctx)->stop(layer, 0);
 
        return L"202 CG OK\r\n";
@@ -1083,7 +1083,7 @@ void cg_next_describer(core::help_sink& sink, const core::help_repository& repo)
 
 std::wstring cg_next_command(command_context& ctx)
 {
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
        get_expected_cg_proxy(ctx)->next(layer);
 
        return L"202 CG OK\r\n";
@@ -1100,7 +1100,7 @@ void cg_remove_describer(core::help_sink& sink, const core::help_repository& rep
 
 std::wstring cg_remove_command(command_context& ctx)
 {
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
        get_expected_cg_proxy(ctx)->remove(layer);
 
        return L"202 CG OK\r\n";
@@ -1131,7 +1131,7 @@ void cg_update_describer(core::help_sink& sink, const core::help_repository& rep
 
 std::wstring cg_update_command(command_context& ctx)
 {
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
 
        std::wstring dataString = ctx.parameters.at(1);
        if (dataString.at(0) != L'<' && dataString.at(0) != L'{')
@@ -1161,7 +1161,7 @@ std::wstring cg_invoke_command(command_context& ctx)
 {
        std::wstringstream replyString;
        replyString << L"201 CG OK\r\n";
-       int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int layer = std::stoi(ctx.parameters.at(0));
        auto result = get_expected_cg_proxy(ctx)->invoke(layer, ctx.parameters.at(1));
        replyString << result << L"\r\n";
 
@@ -1188,7 +1188,7 @@ std::wstring cg_info_command(command_context& ctx)
        }
        else
        {
-               int layer = boost::lexical_cast<int>(ctx.parameters.at(0));
+               int layer = std::stoi(ctx.parameters.at(0));
                auto desc = get_expected_cg_proxy(ctx)->description(layer);
 
                replyString << desc << L"\r\n";
@@ -1278,7 +1278,7 @@ std::wstring mixer_keyer_command(command_context& ctx)
                return reply_value(ctx, [](const frame_transform& t) { return t.image_transform.is_key ? 1 : 0; });
 
        transforms_applier transforms(ctx);
-       bool value = boost::lexical_cast<int>(ctx.parameters.at(0));
+       bool value = std::stoi(ctx.parameters.at(0));
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
        {
                transform.image_transform.is_key = value;
@@ -1330,13 +1330,13 @@ std::wstring mixer_chroma_command(command_context& ctx)
                auto chroma = get_current_transform(ctx).image_transform.chroma;
                return L"201 MIXER OK\r\n"
                        + std::wstring(chroma.enable ? L"1 " : L"0 ")
-                       + boost::lexical_cast<std::wstring>(chroma.target_hue) + L" "
-                       + boost::lexical_cast<std::wstring>(chroma.hue_width) + L" "
-                       + boost::lexical_cast<std::wstring>(chroma.min_saturation) + L" "
-                       + boost::lexical_cast<std::wstring>(chroma.min_brightness) + L" "
-                       + boost::lexical_cast<std::wstring>(chroma.softness) + L" "
-                       + boost::lexical_cast<std::wstring>(chroma.spill_suppress) + L" "
-                       + boost::lexical_cast<std::wstring>(chroma.spill_suppress_saturation) + L" "
+                       + std::to_wstring(chroma.target_hue) + L" "
+                       + std::to_wstring(chroma.hue_width) + L" "
+                       + std::to_wstring(chroma.min_saturation) + L" "
+                       + std::to_wstring(chroma.min_brightness) + L" "
+                       + std::to_wstring(chroma.softness) + L" "
+                       + std::to_wstring(chroma.spill_suppress) + L" "
+                       + std::to_wstring(chroma.spill_suppress_saturation) + L" "
                        + std::wstring(chroma.show_mask ? L"1" : L"0") + L"\r\n";
        }
 
@@ -1351,7 +1351,7 @@ std::wstring mixer_chroma_command(command_context& ctx)
        if (legacy_mode)
        {
 
-               duration = ctx.parameters.size() > 4 ? boost::lexical_cast<int>(ctx.parameters.at(4)) : 0;
+               duration = ctx.parameters.size() > 4 ? std::stoi(ctx.parameters.at(4)) : 0;
                tween = ctx.parameters.size() > 5 ? ctx.parameters.at(5) : L"linear";
 
                if (*legacy_mode == chroma::legacy_type::none)
@@ -1361,11 +1361,11 @@ std::wstring mixer_chroma_command(command_context& ctx)
                else
                {
                        chroma.enable                                           = true;
-                       chroma.hue_width                                        = 0.5 - boost::lexical_cast<double>(ctx.parameters.at(1)) * 0.5;
-                       chroma.min_brightness                           = boost::lexical_cast<double>(ctx.parameters.at(1));
-                       chroma.min_saturation                           = boost::lexical_cast<double>(ctx.parameters.at(1));
-                       chroma.softness                                         = boost::lexical_cast<double>(ctx.parameters.at(2)) - boost::lexical_cast<double>(ctx.parameters.at(1));
-                       chroma.spill_suppress                           = 180.0 - boost::lexical_cast<double>(ctx.parameters.at(3)) * 180.0;
+                       chroma.hue_width                                        = 0.5 - std::stod(ctx.parameters.at(1)) * 0.5;
+                       chroma.min_brightness                           = std::stod(ctx.parameters.at(1));
+                       chroma.min_saturation                           = std::stod(ctx.parameters.at(1));
+                       chroma.softness                                         = std::stod(ctx.parameters.at(2)) - std::stod(ctx.parameters.at(1));
+                       chroma.spill_suppress                           = 180.0 - std::stod(ctx.parameters.at(3)) * 180.0;
                        chroma.spill_suppress_saturation        = 1;
 
                        if (*legacy_mode == chroma::legacy_type::green)
@@ -1376,21 +1376,21 @@ std::wstring mixer_chroma_command(command_context& ctx)
        }
        else
        {
-               duration = ctx.parameters.size() > 9 ? boost::lexical_cast<int>(ctx.parameters.at(9)) : 0;
+               duration = ctx.parameters.size() > 9 ? std::stoi(ctx.parameters.at(9)) : 0;
                tween = ctx.parameters.size() > 10 ? ctx.parameters.at(10) : L"linear";
 
                chroma.enable = ctx.parameters.at(0) == L"1";
 
                if (chroma.enable)
                {
-                       chroma.target_hue                                       = boost::lexical_cast<double>(ctx.parameters.at(1));
-                       chroma.hue_width                                        = boost::lexical_cast<double>(ctx.parameters.at(2));
-                       chroma.min_saturation                           = boost::lexical_cast<double>(ctx.parameters.at(3));
-                       chroma.min_brightness                           = boost::lexical_cast<double>(ctx.parameters.at(4));
-                       chroma.softness                                         = boost::lexical_cast<double>(ctx.parameters.at(5));
-                       chroma.spill_suppress                           = boost::lexical_cast<double>(ctx.parameters.at(6));
-                       chroma.spill_suppress_saturation        = boost::lexical_cast<double>(ctx.parameters.at(7));
-                       chroma.show_mask                                        = boost::lexical_cast<double>(ctx.parameters.at(8));
+                       chroma.target_hue                                       = std::stod(ctx.parameters.at(1));
+                       chroma.hue_width                                        = std::stod(ctx.parameters.at(2));
+                       chroma.min_saturation                           = std::stod(ctx.parameters.at(3));
+                       chroma.min_brightness                           = std::stod(ctx.parameters.at(4));
+                       chroma.softness                                         = std::stod(ctx.parameters.at(5));
+                       chroma.spill_suppress                           = std::stod(ctx.parameters.at(6));
+                       chroma.spill_suppress_saturation        = std::stod(ctx.parameters.at(7));
+                       chroma.show_mask                                        = std::stod(ctx.parameters.at(8));
                }
        }
 
@@ -1450,8 +1450,8 @@ std::wstring single_double_animatable_mixer_command(command_context& ctx, const
                return reply_value(ctx, getter);
 
        transforms_applier transforms(ctx);
-       double value = boost::lexical_cast<double>(ctx.parameters.at(0));
-       int duration = ctx.parameters.size() > 1 ? boost::lexical_cast<int>(ctx.parameters[1]) : 0;
+       double value = std::stod(ctx.parameters.at(0));
+       int duration = ctx.parameters.size() > 1 ? std::stoi(ctx.parameters[1]) : 0;
        std::wstring tween = ctx.parameters.size() > 2 ? ctx.parameters[2] : L"linear";
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
@@ -1578,21 +1578,21 @@ std::wstring mixer_levels_command(command_context& ctx)
        {
                auto levels = get_current_transform(ctx).image_transform.levels;
                return L"201 MIXER OK\r\n"
-                       + boost::lexical_cast<std::wstring>(levels.min_input) + L" "
-                       + boost::lexical_cast<std::wstring>(levels.max_input) + L" "
-                       + boost::lexical_cast<std::wstring>(levels.gamma) + L" "
-                       + boost::lexical_cast<std::wstring>(levels.min_output) + L" "
-                       + boost::lexical_cast<std::wstring>(levels.max_output) + L"\r\n";
+                       + std::to_wstring(levels.min_input) + L" "
+                       + std::to_wstring(levels.max_input) + L" "
+                       + std::to_wstring(levels.gamma) + L" "
+                       + std::to_wstring(levels.min_output) + L" "
+                       + std::to_wstring(levels.max_output) + L"\r\n";
        }
 
        transforms_applier transforms(ctx);
        levels value;
-       value.min_input = boost::lexical_cast<double>(ctx.parameters.at(0));
-       value.max_input = boost::lexical_cast<double>(ctx.parameters.at(1));
-       value.gamma = boost::lexical_cast<double>(ctx.parameters.at(2));
-       value.min_output = boost::lexical_cast<double>(ctx.parameters.at(3));
-       value.max_output = boost::lexical_cast<double>(ctx.parameters.at(4));
-       int duration = ctx.parameters.size() > 5 ? boost::lexical_cast<int>(ctx.parameters[5]) : 0;
+       value.min_input = std::stod(ctx.parameters.at(0));
+       value.max_input = std::stod(ctx.parameters.at(1));
+       value.gamma = std::stod(ctx.parameters.at(2));
+       value.min_output = std::stod(ctx.parameters.at(3));
+       value.max_output = std::stod(ctx.parameters.at(4));
+       int duration = ctx.parameters.size() > 5 ? std::stoi(ctx.parameters[5]) : 0;
        std::wstring tween = ctx.parameters.size() > 6 ? ctx.parameters[6] : L"linear";
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
@@ -1644,19 +1644,19 @@ std::wstring mixer_fill_command(command_context& ctx)
                auto translation = transform.fill_translation;
                auto scale = transform.fill_scale;
                return L"201 MIXER OK\r\n"
-                       + boost::lexical_cast<std::wstring>(translation[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(translation[1]) + L" "
-                       + boost::lexical_cast<std::wstring>(scale[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(scale[1]) + L"\r\n";
+                       + std::to_wstring(translation[0]) + L" "
+                       + std::to_wstring(translation[1]) + L" "
+                       + std::to_wstring(scale[0]) + L" "
+                       + std::to_wstring(scale[1]) + L"\r\n";
        }
 
        transforms_applier transforms(ctx);
-       int duration = ctx.parameters.size() > 4 ? boost::lexical_cast<int>(ctx.parameters[4]) : 0;
+       int duration = ctx.parameters.size() > 4 ? std::stoi(ctx.parameters[4]) : 0;
        std::wstring tween = ctx.parameters.size() > 5 ? ctx.parameters[5] : L"linear";
-       double x = boost::lexical_cast<double>(ctx.parameters.at(0));
-       double y = boost::lexical_cast<double>(ctx.parameters.at(1));
-       double x_s = boost::lexical_cast<double>(ctx.parameters.at(2));
-       double y_s = boost::lexical_cast<double>(ctx.parameters.at(3));
+       double x = std::stod(ctx.parameters.at(0));
+       double y = std::stod(ctx.parameters.at(1));
+       double x_s = std::stod(ctx.parameters.at(2));
+       double y_s = std::stod(ctx.parameters.at(3));
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) mutable -> frame_transform
        {
@@ -1701,19 +1701,19 @@ std::wstring mixer_clip_command(command_context& ctx)
                auto scale = transform.clip_scale;
 
                return L"201 MIXER OK\r\n"
-                       + boost::lexical_cast<std::wstring>(translation[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(translation[1]) + L" "
-                       + boost::lexical_cast<std::wstring>(scale[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(scale[1]) + L"\r\n";
+                       + std::to_wstring(translation[0]) + L" "
+                       + std::to_wstring(translation[1]) + L" "
+                       + std::to_wstring(scale[0]) + L" "
+                       + std::to_wstring(scale[1]) + L"\r\n";
        }
 
        transforms_applier transforms(ctx);
-       int duration = ctx.parameters.size() > 4 ? boost::lexical_cast<int>(ctx.parameters[4]) : 0;
+       int duration = ctx.parameters.size() > 4 ? std::stoi(ctx.parameters[4]) : 0;
        std::wstring tween = ctx.parameters.size() > 5 ? ctx.parameters[5] : L"linear";
-       double x = boost::lexical_cast<double>(ctx.parameters.at(0));
-       double y = boost::lexical_cast<double>(ctx.parameters.at(1));
-       double x_s = boost::lexical_cast<double>(ctx.parameters.at(2));
-       double y_s = boost::lexical_cast<double>(ctx.parameters.at(3));
+       double x = std::stod(ctx.parameters.at(0));
+       double y = std::stod(ctx.parameters.at(1));
+       double x_s = std::stod(ctx.parameters.at(2));
+       double y_s = std::stod(ctx.parameters.at(3));
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
        {
@@ -1754,15 +1754,15 @@ std::wstring mixer_anchor_command(command_context& ctx)
                auto transform = get_current_transform(ctx).image_transform;
                auto anchor = transform.anchor;
                return L"201 MIXER OK\r\n"
-                       + boost::lexical_cast<std::wstring>(anchor[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(anchor[1]) + L"\r\n";
+                       + std::to_wstring(anchor[0]) + L" "
+                       + std::to_wstring(anchor[1]) + L"\r\n";
        }
 
        transforms_applier transforms(ctx);
-       int duration = ctx.parameters.size() > 2 ? boost::lexical_cast<int>(ctx.parameters[2]) : 0;
+       int duration = ctx.parameters.size() > 2 ? std::stoi(ctx.parameters[2]) : 0;
        std::wstring tween = ctx.parameters.size() > 3 ? ctx.parameters[3] : L"linear";
-       double x = boost::lexical_cast<double>(ctx.parameters.at(0));
-       double y = boost::lexical_cast<double>(ctx.parameters.at(1));
+       double x = std::stod(ctx.parameters.at(0));
+       double y = std::stod(ctx.parameters.at(1));
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) mutable -> frame_transform
        {
@@ -1802,19 +1802,19 @@ std::wstring mixer_crop_command(command_context& ctx)
        {
                auto crop = get_current_transform(ctx).image_transform.crop;
                return L"201 MIXER OK\r\n"
-                       + boost::lexical_cast<std::wstring>(crop.ul[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(crop.ul[1]) + L" "
-                       + boost::lexical_cast<std::wstring>(crop.lr[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(crop.lr[1]) + L"\r\n";
+                       + std::to_wstring(crop.ul[0]) + L" "
+                       + std::to_wstring(crop.ul[1]) + L" "
+                       + std::to_wstring(crop.lr[0]) + L" "
+                       + std::to_wstring(crop.lr[1]) + L"\r\n";
        }
 
        transforms_applier transforms(ctx);
-       int duration = ctx.parameters.size() > 4 ? boost::lexical_cast<int>(ctx.parameters[4]) : 0;
+       int duration = ctx.parameters.size() > 4 ? std::stoi(ctx.parameters[4]) : 0;
        std::wstring tween = ctx.parameters.size() > 5 ? ctx.parameters[5] : L"linear";
-       double ul_x = boost::lexical_cast<double>(ctx.parameters.at(0));
-       double ul_y = boost::lexical_cast<double>(ctx.parameters.at(1));
-       double lr_x = boost::lexical_cast<double>(ctx.parameters.at(2));
-       double lr_y = boost::lexical_cast<double>(ctx.parameters.at(3));
+       double ul_x = std::stod(ctx.parameters.at(0));
+       double ul_y = std::stod(ctx.parameters.at(1));
+       double lr_x = std::stod(ctx.parameters.at(2));
+       double lr_y = std::stod(ctx.parameters.at(3));
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
        {
@@ -1880,27 +1880,27 @@ std::wstring mixer_perspective_command(command_context& ctx)
                auto perspective = get_current_transform(ctx).image_transform.perspective;
                return
                        L"201 MIXER OK\r\n"
-                       + boost::lexical_cast<std::wstring>(perspective.ul[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.ul[1]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.ur[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.ur[1]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.lr[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.lr[1]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.ll[0]) + L" "
-                       + boost::lexical_cast<std::wstring>(perspective.ll[1]) + L"\r\n";
+                       + std::to_wstring(perspective.ul[0]) + L" "
+                       + std::to_wstring(perspective.ul[1]) + L" "
+                       + std::to_wstring(perspective.ur[0]) + L" "
+                       + std::to_wstring(perspective.ur[1]) + L" "
+                       + std::to_wstring(perspective.lr[0]) + L" "
+                       + std::to_wstring(perspective.lr[1]) + L" "
+                       + std::to_wstring(perspective.ll[0]) + L" "
+                       + std::to_wstring(perspective.ll[1]) + L"\r\n";
        }
 
        transforms_applier transforms(ctx);
-       int duration = ctx.parameters.size() > 8 ? boost::lexical_cast<int>(ctx.parameters[8]) : 0;
+       int duration = ctx.parameters.size() > 8 ? std::stoi(ctx.parameters[8]) : 0;
        std::wstring tween = ctx.parameters.size() > 9 ? ctx.parameters[9] : L"linear";
-       double ul_x = boost::lexical_cast<double>(ctx.parameters.at(0));
-       double ul_y = boost::lexical_cast<double>(ctx.parameters.at(1));
-       double ur_x = boost::lexical_cast<double>(ctx.parameters.at(2));
-       double ur_y = boost::lexical_cast<double>(ctx.parameters.at(3));
-       double lr_x = boost::lexical_cast<double>(ctx.parameters.at(4));
-       double lr_y = boost::lexical_cast<double>(ctx.parameters.at(5));
-       double ll_x = boost::lexical_cast<double>(ctx.parameters.at(6));
-       double ll_y = boost::lexical_cast<double>(ctx.parameters.at(7));
+       double ul_x = std::stod(ctx.parameters.at(0));
+       double ul_y = std::stod(ctx.parameters.at(1));
+       double ur_x = std::stod(ctx.parameters.at(2));
+       double ur_y = std::stod(ctx.parameters.at(3));
+       double lr_x = std::stod(ctx.parameters.at(4));
+       double lr_y = std::stod(ctx.parameters.at(5));
+       double ll_x = std::stod(ctx.parameters.at(6));
+       double ll_y = std::stod(ctx.parameters.at(7));
 
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
        {
@@ -1941,7 +1941,7 @@ std::wstring mixer_mipmap_command(command_context& ctx)
                return reply_value(ctx, [](const frame_transform& t) { return t.image_transform.use_mipmap ? 1 : 0; });
 
        transforms_applier transforms(ctx);
-       bool value = boost::lexical_cast<int>(ctx.parameters.at(0));
+       bool value = std::stoi(ctx.parameters.at(0));
        transforms.add(stage::transform_tuple_t(ctx.layer_index(), [=](frame_transform transform) -> frame_transform
        {
                transform.image_transform.use_mipmap = value;
@@ -1991,10 +1991,10 @@ std::wstring mixer_mastervolume_command(command_context& ctx)
        if (ctx.parameters.empty())
        {
                auto volume = ctx.channel.channel->mixer().get_master_volume();
-               return L"201 MIXER OK\r\n" + boost::lexical_cast<std::wstring>(volume)+L"\r\n";
+               return L"201 MIXER OK\r\n" + std::to_wstring(volume)+L"\r\n";
        }
 
-       float master_volume = boost::lexical_cast<float>(ctx.parameters.at(0));
+       float master_volume = std::stof(ctx.parameters.at(0));
        ctx.channel.channel->mixer().set_master_volume(master_volume);
 
        return L"202 MIXER OK\r\n";
@@ -2020,7 +2020,7 @@ std::wstring mixer_straight_alpha_command(command_context& ctx)
        if (ctx.parameters.empty())
        {
                bool state = ctx.channel.channel->mixer().get_straight_alpha_output();
-               return L"201 MIXER OK\r\n" + boost::lexical_cast<std::wstring>(state) + L"\r\n";
+               return L"201 MIXER OK\r\n" + std::to_wstring(state) + L"\r\n";
        }
 
        bool state = boost::lexical_cast<bool>(ctx.parameters.at(0));
@@ -2043,9 +2043,9 @@ void mixer_grid_describer(core::help_sink& sink, const core::help_repository& re
 std::wstring mixer_grid_command(command_context& ctx)
 {
        transforms_applier transforms(ctx);
-       int duration = ctx.parameters.size() > 1 ? boost::lexical_cast<int>(ctx.parameters[1]) : 0;
+       int duration = ctx.parameters.size() > 1 ? std::stoi(ctx.parameters[1]) : 0;
        std::wstring tween = ctx.parameters.size() > 2 ? ctx.parameters[2] : L"linear";
-       int n = boost::lexical_cast<int>(ctx.parameters.at(0));
+       int n = std::stoi(ctx.parameters.at(0));
        double delta = 1.0 / static_cast<double>(n);
        for (int x = 0; x < n; ++x)
        {
@@ -2145,7 +2145,7 @@ std::wstring channel_grid_command(command_context& ctx)
                if (channel.channel != self.channel)
                {
                        core::diagnostics::call_context::for_thread().layer = index;
-                       auto producer = ctx.producer_registry->create_producer(get_producer_dependencies(self.channel, ctx), L"route://" + boost::lexical_cast<std::wstring>(channel.channel->index()) + L" NO_AUTO_DEINTERLACE");
+                       auto producer = ctx.producer_registry->create_producer(get_producer_dependencies(self.channel, ctx), L"route://" + std::to_wstring(channel.channel->index()) + L" NO_AUTO_DEINTERLACE");
                        self.channel->stage().load(index, producer, false);
                        self.channel->stage().play(index);
                        index++;
@@ -2158,7 +2158,7 @@ std::wstring channel_grid_command(command_context& ctx)
        ctx.channel_index = self.channel->index();
        ctx.channel = self;
        ctx.parameters.clear();
-       ctx.parameters.push_back(boost::lexical_cast<std::wstring>(square_side_length));
+       ctx.parameters.push_back(std::to_wstring(square_side_length));
        mixer_grid_command(ctx);
 
        return L"202 CHANNEL_GRID OK\r\n";
@@ -2954,7 +2954,7 @@ void lock_describer(core::help_sink& sink, const core::help_repository& repo)
 
 std::wstring lock_command(command_context& ctx)
 {
-       int channel_index = boost::lexical_cast<int>(ctx.parameters.at(0)) - 1;
+       int channel_index = std::stoi(ctx.parameters.at(0)) - 1;
        auto lock = ctx.channels.at(channel_index).lock;
        auto command = boost::to_upper_copy(ctx.parameters.at(1));
 
index 4b7907c3d3c15c10e27e68d5d100b8c9a8930ee5..778b39cc90c2304efeaf113212b10429181f4bdd 100644 (file)
@@ -77,7 +77,7 @@ public:
                for (int i = 0; i < repo_->channels().size(); ++i)
                {
                        commandQueues_.push_back(spl::make_shared<AMCPCommandQueue>(
-                                       L"Channel " + boost::lexical_cast<std::wstring>(i + 1) + L" for " + name));
+                                       L"Channel " + std::to_wstring(i + 1) + L" for " + name));
                }
        }
 
@@ -143,7 +143,7 @@ public:
                                break;
                        default:
                                CASPAR_THROW_EXCEPTION(programming_error()
-                                               << msg_info(L"Unhandled error_state enum constant " + boost::lexical_cast<std::wstring>(static_cast<int>(result.error))));
+                                               << msg_info(L"Unhandled error_state enum constant " + std::to_wstring(static_cast<int>(result.error))));
                        }
                        client->send(answer.str());
                }
index 2457ec72d5b0f847897fe5b204ef65b53f02e27c..0bcb63003109d5c6f7b5e4cca5215f411e09df74 100644 (file)
@@ -101,7 +101,7 @@ struct amcp_command_repository::impl
                int index = 0;
                for (const auto& channel : channels)
                {
-                       std::wstring lifecycle_key = L"lock" + boost::lexical_cast<std::wstring>(index);
+                       std::wstring lifecycle_key = L"lock" + std::to_wstring(index);
                        this->channels.push_back(channel_context(channel, lifecycle_key));
                        ++index;
                }
index 30f24252bfdee648f067cacd56d62bcb4365efc8..6cebf94144df7b33152eae938ac1cd5fc2278497 100644 (file)
@@ -35,7 +35,6 @@
 #include <boost/locale.hpp>
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/split.hpp>
-#include <boost/lexical_cast.hpp>
 
 namespace caspar { namespace protocol { namespace cii {
 
@@ -118,7 +117,7 @@ void MiscellaneousCommand::Setup(const std::vector<std::wstring>& parameters)
        //                      Add Template to layer X in the active templatehost
        if((parameters.size() > 5) && parameters[1] == L"5" && parameters[2] == L"13")
        {
-               layer_ = boost::lexical_cast<int>(parameters[4]);
+               layer_ = std::stoi(parameters[4]);
                filename_ = parameters[5];
                if(filename_.find(L"PK/") == std::wstring::npos && filename_.find(L"PK\\") == std::wstring::npos)
                        filename_ = L"PK/" + filename_;
@@ -215,10 +214,10 @@ void KeydataCommand::Setup(const std::vector<std::wstring>& parameters) {
                
                try
                {
-                       casparLayer_ = boost::lexical_cast<int>(split[0]);
+                       casparLayer_ = std::stoi(split[0]);
 
                        if(split.size() > 1)
-                               layer_ = boost::lexical_cast<int>(split[1]);
+                               layer_ = std::stoi(split[1]);
                }
                catch(...)
                { 
index 4add2e7496ab967dc3ec2ac9c4066081f0036fd4..dad1ce84e27fef541d8695af62f778b7878dd5df 100644 (file)
@@ -31,7 +31,6 @@
 #include <functional>
 
 #include <boost/asio.hpp>
-#include <boost/lexical_cast.hpp>
 
 #include <tbb/mutex.h>
 #include <tbb/concurrent_hash_map.h>
@@ -212,7 +211,7 @@ private:
     connection(const std::shared_ptr<boost::asio::io_service>& service, const spl::shared_ptr<tcp::socket>& socket, const protocol_strategy_factory<char>::ptr& protocol_factory, const spl::shared_ptr<connection_set>& connection_set)
                : socket_(socket)
                , service_(service)
-               , listen_port_(socket_->is_open() ? boost::lexical_cast<std::wstring>(socket_->local_endpoint().port()) : L"no-port")
+               , listen_port_(socket_->is_open() ? std::to_wstring(socket_->local_endpoint().port()) : L"no-port")
                , connection_set_(connection_set)
                , protocol_factory_(protocol_factory)
                , is_writing_(false)
@@ -349,7 +348,7 @@ struct AsyncEventServer::implementation : public spl::enable_shared_from_this<im
 
        std::wstring print() const
        {
-               return L"async_event_server[:" + boost::lexical_cast<std::wstring>(acceptor_.local_endpoint().port()) + L"]";
+               return L"async_event_server[:" + std::to_wstring(acceptor_.local_endpoint().port()) + L"]";
        }
 
        void add_client_lifecycle_object_factory(const lifecycle_factory_t& factory)
index 48537fb51194af938fe88c4e3edceb99c654129c..6bf7c5ac9cd021e7b2a5fcf5cb35c8456259edc7 100644 (file)
@@ -56,7 +56,6 @@
 #include <boost/property_tree/detail/file_parser_error.hpp>
 #include <boost/property_tree/xml_parser.hpp>
 #include <boost/locale.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -171,12 +170,12 @@ void do_run(
                                std::wstring file;
                                try
                                {
-                                       num = boost::lexical_cast<int>(wcmd.substr(1, 2));
+                                       num = std::stoi(wcmd.substr(1, 2));
                                        file = wcmd.substr(4, wcmd.length()-1);
                                }
                                catch(...)
                                {
-                                       num = boost::lexical_cast<int>(wcmd.substr(1, 1));
+                                       num = std::stoi(wcmd.substr(1, 1));
                                        file = wcmd.substr(3, wcmd.length()-1);
                                }
 
@@ -188,10 +187,10 @@ void do_run(
                                        n++;
                                }
 
-                               wcmd = L"MIXER 1 GRID " + boost::lexical_cast<std::wstring>(n);
+                               wcmd = L"MIXER 1 GRID " + std::to_wstring(n);
 
                                for(int i = 1; i <= num; ++i)
-                                       wcmd += L"\r\nPLAY 1-" + boost::lexical_cast<std::wstring>(i) + L" " + file + L" LOOP";// + L" SLIDE 100 LOOP";
+                                       wcmd += L"\r\nPLAY 1-" + std::to_wstring(i) + L" " + file + L" LOOP";// + L" SLIDE 100 LOOP";
                        }
                }
                catch (...)
index 7fc1a1edc6d3a518aaf3e5c4d7e10ba75ff9bc04..d21835787fe6e7df4f77927b373218bbbceaa1f4 100644 (file)
@@ -72,7 +72,6 @@
 #include <protocol/log/tcp_logger_protocol_strategy.h>
 
 #include <boost/algorithm/string.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/property_tree/xml_parser.hpp>
 #include <boost/asio.hpp>
@@ -419,7 +418,7 @@ struct server::impl : boost::noncopyable
                                auto port = ptree_get<unsigned int>(xml_controller.second, L"port");
                                auto asyncbootstrapper = spl::make_shared<IO::AsyncEventServer>(
                                                io_service_,
-                                               create_protocol(protocol, L"TCP Port " + boost::lexical_cast<std::wstring>(port)),
+                                               create_protocol(protocol, L"TCP Port " + std::to_wstring(port)),
                                                port);
                                async_servers_.push_back(asyncbootstrapper);