From f92e87a8f85915e8e0cbd39d0ca7fb004c0da05e Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 4 Oct 2016 17:47:19 -0400 Subject: [PATCH] Fix compilation errors when building inside Chromium Example of an error: spirv-tools/source/validate_cfg.cpp:516:45: error: chosen constructor is explicit in copy-initialization: _.current_function().RegisterBlockEnd({}, opcode); --- source/val/BasicBlock.h | 2 +- source/val/Construct.h | 2 +- source/validate_cfg.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/val/BasicBlock.h b/source/val/BasicBlock.h index d44b76f..29d730c 100644 --- a/source/val/BasicBlock.h +++ b/source/val/BasicBlock.h @@ -108,7 +108,7 @@ class BasicBlock { void RegisterBranchInstruction(SpvOp branch_instruction); /// Adds @p next BasicBlocks as successors of this BasicBlock - void RegisterSuccessors(const std::vector& next = {}); + void RegisterSuccessors(const std::vector& next = std::vector()); /// Returns true if the id of the BasicBlock matches bool operator==(const BasicBlock& other) const { return other.id_ == id_; } diff --git a/source/val/Construct.h b/source/val/Construct.h index 06a0c0d..09cf9df 100644 --- a/source/val/Construct.h +++ b/source/val/Construct.h @@ -46,7 +46,7 @@ class Construct { public: Construct(ConstructType type, BasicBlock* dominator, BasicBlock* exit = nullptr, - std::vector constructs = {}); + std::vector constructs = std::vector()); /// Returns the type of the construct ConstructType type() const; diff --git a/source/validate_cfg.cpp b/source/validate_cfg.cpp index ac81f75..7843697 100644 --- a/source/validate_cfg.cpp +++ b/source/validate_cfg.cpp @@ -513,7 +513,7 @@ spv_result_t CfgPass(ValidationState_t& _, case SpvOpReturn: case SpvOpReturnValue: case SpvOpUnreachable: - _.current_function().RegisterBlockEnd({}, opcode); + _.current_function().RegisterBlockEnd(vector(), opcode); break; default: break; -- 2.7.4