]> git.sesse.net Git - casparcg/commitdiff
promoted no_init_proxy to own file under common
authorHelge Norberg <helge.norberg@svt.se>
Tue, 5 Jan 2016 21:53:30 +0000 (22:53 +0100)
committerHelge Norberg <helge.norberg@svt.se>
Tue, 5 Jan 2016 21:53:30 +0000 (22:53 +0100)
common/CMakeLists.txt
common/no_init_proxy.h [new file with mode: 0644]
protocol/osc/client.cpp

index 6c5057ebe9faf0cb63ae3474923e4ecaaafb3c96..7136354d30e23e48bcdc34cb0342db099672dd94 100644 (file)
@@ -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 (file)
index 0000000..8c13997
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+*
+* 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 <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+
+#pragma once
+
+namespace caspar {
+
+template<typename T>
+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");
+       }
+};
+
+}
index be4c76c3a60b9f2e27a8a35b101279ecea2090cb..6c99cf4ada55b7a6dcf2d3e4f1d6b72844d3a996 100644 (file)
@@ -32,6 +32,7 @@
 #include <common/endian.h>
 #include <common/cache_aligned_vector.h>
 #include <common/os/general_protection_fault.h>
+#include <common/no_init_proxy.h>
 
 #include <core/monitor/monitor.h>
 
@@ -49,18 +50,6 @@ using namespace boost::asio::ip;
 
 namespace caspar { namespace protocol { namespace osc {
 
-template<typename T>
-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<no_init_proxy<char>> byte_vector;
 
 template<typename T>