From 93d42e62da8913267ba0fa724553078869aebf7d Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 16 Nov 2018 04:21:37 -0300 Subject: [PATCH] Remove WriteEnum abstraction --- src/sirit.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/sirit.cpp b/src/sirit.cpp index a3007c6..89df604 100644 --- a/src/sirit.cpp +++ b/src/sirit.cpp @@ -13,13 +13,6 @@ namespace Sirit { -template -static void WriteEnum(Stream& stream, spv::Op opcode, T value) { - Op op{opcode}; - op.Add(static_cast(value)); - op.Write(stream); -} - template static void WriteSet(Stream& stream, const T& set) { for (const auto& item : set) { item->Write(stream); @@ -41,7 +34,9 @@ std::vector Module::Assemble() const { stream.Write(static_cast(0)); for (const auto capability : capabilities) { - WriteEnum(stream, spv::Op::OpCapability, capability); + Op op(spv::Op::OpCapability); + op.Add(static_cast(capability)); + op.Write(stream); } if (glsl_std_450) { glsl_std_450->Write(stream);