From: Helge Norberg Date: Tue, 5 Jan 2016 21:53:30 +0000 (+0100) Subject: promoted no_init_proxy to own file under common X-Git-Tag: 2.1.0_Beta1~121 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8c563cbeaf8c567f9906e5fbe1c1bd9bdc6459f0;p=casparcg promoted no_init_proxy to own file under common --- diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 6c5057ebe..7136354d3 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -78,6 +78,7 @@ set(HEADERS memcpy.h memset.h memshfl.h + no_init_proxy.h param.h polling_filesystem_monitor.h prec_timer.h diff --git a/common/no_init_proxy.h b/common/no_init_proxy.h new file mode 100644 index 000000000..8c139976e --- /dev/null +++ b/common/no_init_proxy.h @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2011 Sveriges Television AB +* +* This file is part of CasparCG (www.casparcg.com). +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + +#pragma once + +namespace caspar { + +template +struct no_init_proxy +{ + T value; + + no_init_proxy() + { + static_assert(sizeof(no_init_proxy) == sizeof(T), "invalid size"); + static_assert(__alignof(no_init_proxy) == __alignof(T), "invalid alignment"); + } +}; + +} diff --git a/protocol/osc/client.cpp b/protocol/osc/client.cpp index be4c76c3a..6c99cf4ad 100644 --- a/protocol/osc/client.cpp +++ b/protocol/osc/client.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -49,18 +50,6 @@ using namespace boost::asio::ip; namespace caspar { namespace protocol { namespace osc { -template -struct no_init_proxy -{ - T value; - - no_init_proxy() - { - static_assert(sizeof(no_init_proxy) == sizeof(T), "invalid size"); - static_assert(__alignof(no_init_proxy) == __alignof(T), "invalid alignment"); - } -}; - typedef cache_aligned_vector> byte_vector; template