summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2016-08-26 02:06:27 +0800
committerLogan Chien <tzuhsiang.chien@gmail.com>2016-08-26 02:06:27 +0800
commiteb15a35ecbe2acd3437cff474686df8fde9bf42a (patch)
tree49fed51a2d20c30ce4377edbab83c9251d399388 /src/asm2wasm.h
parente168e2b9b6dd099c97c7ec313c3062d80fa1a9a8 (diff)
downloadbinaryen-eb15a35ecbe2acd3437cff474686df8fde9bf42a.tar.gz
binaryen-eb15a35ecbe2acd3437cff474686df8fde9bf42a.tar.bz2
binaryen-eb15a35ecbe2acd3437cff474686df8fde9bf42a.zip
Replace std::unique<T>(new T()) with make_unique<T>().
This commit modernize the code base by replacing: std::unique_ptr<T>(new T(...)) with: make_unique<T>(...) or: wasm::make_unique<T>(...) This is a step closer to adopt C++14 std::make_unique<T>(...).
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index a5754f725..ce3c0749d 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -537,7 +537,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) {
for (unsigned i = 1; i < body->size(); i++) {
if (body[i][0] == DEFUN) numFunctions++;
}
- optimizingBuilder = std::unique_ptr<OptimizingIncrementalModuleBuilder>(new OptimizingIncrementalModuleBuilder(&wasm, numFunctions));
+ optimizingBuilder = make_unique<OptimizingIncrementalModuleBuilder>(&wasm, numFunctions);
}
// first pass - do almost everything, but function imports and indirect calls