From 6a2d1da742cb7bd9aac73ac63e600d9f9fa895d0 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 23 Oct 2018 05:05:40 -0300 Subject: [PATCH] Replace "auto const" with "auto" --- src/insts/annotation.cpp | 2 +- src/insts/constant.cpp | 6 +++--- src/insts/debug.cpp | 2 +- src/insts/flow.cpp | 8 ++++---- src/insts/function.cpp | 2 +- src/insts/memory.cpp | 2 +- src/insts/type.cpp | 24 ++++++++++++------------ 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/insts/annotation.cpp b/src/insts/annotation.cpp index ab23013..28b354e 100644 --- a/src/insts/annotation.cpp +++ b/src/insts/annotation.cpp @@ -11,7 +11,7 @@ namespace Sirit { Ref Module::Decorate(Ref target, spv::Decoration decoration, const std::vector& literals) { - auto const op{new Op(spv::Op::OpDecorate)}; + auto op{new Op(spv::Op::OpDecorate)}; op->Add(target); AddEnum(op, decoration); op->Sink(literals); diff --git a/src/insts/constant.cpp b/src/insts/constant.cpp index 5bae45e..3360603 100644 --- a/src/insts/constant.cpp +++ b/src/insts/constant.cpp @@ -19,13 +19,13 @@ Ref Module::ConstantFalse(Ref result_type) { } Ref Module::Constant(Ref result_type, Operand* literal) { - auto const op{new Op(spv::Op::OpConstant, bound, result_type)}; + auto op{new Op(spv::Op::OpConstant, bound, result_type)}; op->Add(literal); return AddDeclaration(op); } Ref Module::ConstantComposite(Ref result_type, const std::vector& constituents) { - auto const op{new Op(spv::Op::OpConstantComposite, bound, result_type)}; + auto op{new Op(spv::Op::OpConstantComposite, bound, result_type)}; op->Add(constituents); return AddDeclaration(op); } @@ -34,7 +34,7 @@ Ref Module::ConstantSampler(Ref result_type, spv::SamplerAddressingMode addressi bool normalized, spv::SamplerFilterMode filter_mode) { AddCapability(spv::Capability::LiteralSampler); AddCapability(spv::Capability::Kernel); - auto const op{new Op(spv::Op::OpConstantSampler, bound, result_type)}; + auto op{new Op(spv::Op::OpConstantSampler, bound, result_type)}; AddEnum(op, addressing_mode); op->Add(normalized ? 1 : 0); AddEnum(op, filter_mode); diff --git a/src/insts/debug.cpp b/src/insts/debug.cpp index 974dde1..c557511 100644 --- a/src/insts/debug.cpp +++ b/src/insts/debug.cpp @@ -10,7 +10,7 @@ namespace Sirit { Ref Module::Name(Ref target, const std::string& name) { - auto const op{new Op(spv::Op::OpName)}; + auto op{new Op(spv::Op::OpName)}; op->Add(target); op->Add(name); debug.push_back(std::unique_ptr(op)); diff --git a/src/insts/flow.cpp b/src/insts/flow.cpp index 9f0fbb4..056e82e 100644 --- a/src/insts/flow.cpp +++ b/src/insts/flow.cpp @@ -11,7 +11,7 @@ namespace Sirit { Ref Module::LoopMerge(Ref merge_block, Ref continue_target, spv::LoopControlMask loop_control, const std::vector& literals) { - auto const op{new Op(spv::Op::OpLoopMerge)}; + auto op{new Op(spv::Op::OpLoopMerge)}; op->Add(merge_block); op->Add(continue_target); AddEnum(op, loop_control); @@ -20,7 +20,7 @@ Ref Module::LoopMerge(Ref merge_block, Ref continue_target, spv::LoopControlMask } Ref Module::SelectionMerge(Ref merge_block, spv::SelectionControlMask selection_control) { - auto const op{new Op(spv::Op::OpSelectionMerge)}; + auto op{new Op(spv::Op::OpSelectionMerge)}; op->Add(merge_block); AddEnum(op, selection_control); return AddCode(op); @@ -31,14 +31,14 @@ Ref Module::Label() { } Ref Module::Branch(Ref target_label) { - auto const op{new Op(spv::Op::OpBranch)}; + auto op{new Op(spv::Op::OpBranch)}; op->Add(target_label); return AddCode(op); } Ref Module::BranchConditional(Ref condition, Ref true_label, Ref false_label, std::uint32_t true_weight, std::uint32_t false_weight) { - auto const op{new Op(spv::Op::OpBranchConditional)}; + auto op{new Op(spv::Op::OpBranchConditional)}; op->Add(condition); op->Add(true_label); op->Add(false_label); diff --git a/src/insts/function.cpp b/src/insts/function.cpp index f49ea99..9b8ee0f 100644 --- a/src/insts/function.cpp +++ b/src/insts/function.cpp @@ -10,7 +10,7 @@ namespace Sirit { Ref Module::Function(Ref result_type, spv::FunctionControlMask function_control, Ref function_type) { - auto const op{new Op{spv::Op::OpFunction, bound++, result_type}}; + auto op{new Op{spv::Op::OpFunction, bound++, result_type}}; op->Add(static_cast(function_control)); op->Add(function_type); return AddCode(op); diff --git a/src/insts/memory.cpp b/src/insts/memory.cpp index 14525ab..502f949 100644 --- a/src/insts/memory.cpp +++ b/src/insts/memory.cpp @@ -11,7 +11,7 @@ namespace Sirit { Ref Module::Variable(Ref result_type, spv::StorageClass storage_class, Ref initializer) { - auto const op{new Op(spv::Op::OpVariable, bound++, result_type)}; + auto op{new Op(spv::Op::OpVariable, bound++, result_type)}; AddEnum(op, storage_class); if (initializer) { op->Add(initializer); diff --git a/src/insts/type.cpp b/src/insts/type.cpp index 3eac6b7..4a2e1a5 100644 --- a/src/insts/type.cpp +++ b/src/insts/type.cpp @@ -28,7 +28,7 @@ Ref Module::TypeInt(int width, bool is_signed) { } else if (width == 64) { AddCapability(spv::Capability::Int64); } - auto const op{new Op(spv::Op::OpTypeInt, bound)}; + auto op{new Op(spv::Op::OpTypeInt, bound)}; op->Add(width); op->Add(is_signed ? 1 : 0); return AddDeclaration(op); @@ -40,14 +40,14 @@ Ref Module::TypeFloat(int width) { } else if (width == 64) { AddCapability(spv::Capability::Float64); } - auto const op{new Op(spv::Op::OpTypeFloat, bound)}; + auto op{new Op(spv::Op::OpTypeFloat, bound)}; op->Add(width); return AddDeclaration(op); } Ref Module::TypeVector(Ref component_type, int component_count) { assert(component_count >= 2); - auto const op{new Op(spv::Op::OpTypeVector, bound)}; + auto op{new Op(spv::Op::OpTypeVector, bound)}; op->Add(component_type); op->Add(component_count); return AddDeclaration(op); @@ -125,7 +125,7 @@ Ref Module::TypeImage(Ref sampled_type, spv::Dim dim, int depth, bool arrayed, b AddCapability(spv::Capability::StorageImageExtendedFormats); break; } - auto const op{new Op(spv::Op::OpTypeImage, bound)}; + auto op{new Op(spv::Op::OpTypeImage, bound)}; op->Add(sampled_type); op->Add(static_cast(dim)); op->Add(depth); @@ -145,13 +145,13 @@ Ref Module::TypeSampler() { } Ref Module::TypeSampledImage(Ref image_type) { - auto const op{new Op(spv::Op::OpTypeSampledImage, bound)}; + auto op{new Op(spv::Op::OpTypeSampledImage, bound)}; op->Add(image_type); return AddDeclaration(op); } Ref Module::TypeArray(Ref element_type, Ref length) { - auto const op{new Op(spv::Op::OpTypeArray, bound)}; + auto op{new Op(spv::Op::OpTypeArray, bound)}; op->Add(element_type); op->Add(length); return AddDeclaration(op); @@ -159,20 +159,20 @@ Ref Module::TypeArray(Ref element_type, Ref length) { Ref Module::TypeRuntimeArray(Ref element_type) { AddCapability(spv::Capability::Shader); - auto const op{new Op(spv::Op::OpTypeRuntimeArray, bound)}; + auto op{new Op(spv::Op::OpTypeRuntimeArray, bound)}; op->Add(element_type); return AddDeclaration(op); } Ref Module::TypeStruct(const std::vector& members) { - auto const op{new Op(spv::Op::OpTypeStruct, bound)}; + auto op{new Op(spv::Op::OpTypeStruct, bound)}; op->Add(members); return AddDeclaration(op); } Ref Module::TypeOpaque(const std::string& name) { AddCapability(spv::Capability::Kernel); - auto const op{new Op(spv::Op::OpTypeOpaque, bound)}; + auto op{new Op(spv::Op::OpTypeOpaque, bound)}; op->Add(name); return AddDeclaration(op); } @@ -193,14 +193,14 @@ Ref Module::TypePointer(spv::StorageClass storage_class, Ref type) { AddCapability(spv::Capability::AtomicStorage); break; } - auto const op{new Op(spv::Op::OpTypePointer, bound)}; + auto op{new Op(spv::Op::OpTypePointer, bound)}; op->Add(static_cast(storage_class)); op->Add(type); return AddDeclaration(op); } Ref Module::TypeFunction(Ref return_type, const std::vector& arguments) { - auto const op{new Op(spv::Op::OpTypeFunction, bound)}; + auto op{new Op(spv::Op::OpTypeFunction, bound)}; op->Add(return_type); op->Add(arguments); return AddDeclaration(op); @@ -228,7 +228,7 @@ Ref Module::TypeQueue() { Ref Module::TypePipe(spv::AccessQualifier access_qualifier) { AddCapability(spv::Capability::Pipes); - auto const op{new Op(spv::Op::OpTypePipe, bound)}; + auto op{new Op(spv::Op::OpTypePipe, bound)}; op->Add(static_cast(access_qualifier)); return AddDeclaration(op); }